Retrieval
L2-normalize vector API
Returns the unit-length (L2-normalized) vector plus its original magnitude. Answers 'How do I normalize this embedding to unit length?', 'What is the unit vector?'.
Price$0.01per request
MethodPOST
Route/v1/retrieval/normalize-vector
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
normalizel2unit-vectorembeddingpreprocessvectorretrievalrag
API URL
Integration docshttps://x402.hexl.dev/v1/retrieval/normalize-vectorExample request
{
"vector": [
3,
4
]
}Example response
{
"unitVector": [
0.6,
0.8
],
"originalMagnitude": 5,
"isZeroVector": false,
"dimensions": 2
}Input schema
{
"type": "object",
"required": [
"vector"
],
"properties": {
"vector": {
"type": "array",
"items": {
"type": "number"
}
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}