Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
curl --request POST \
--url https://api.orq.ai/v2/router/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>",
"encoding_format": "float",
"dimensions": 123,
"user": "<string>",
"name": "<string>",
"fallbacks": [
{
"model": "openai/text-embedding-3-small"
}
],
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"orq": {
"name": "<string>",
"fallbacks": [
{
"model": "openai/gpt-4o-mini"
}
],
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"load_balancer": {
"type": "weight_based",
"models": [
{
"model": "openai/gpt-4o",
"weight": 0.7
},
{
"model": "anthropic/claude-3-5-sonnet",
"weight": 0.3
}
]
}
}
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
123
],
"index": 123
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 123,
"total_tokens": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
input
Input text to embed, encoded as a string or array of tokens.
1ID of the model to use
Type of the document element
base64, float The number of dimensions the resulting output embeddings should have.
A unique identifier representing your end-user
The name to display on the trace. If not specified, the default system name will be used.
Array of fallback models to use if primary model fails
Show child attributes
Retry configuration for the request
Show child attributes
Cache configuration for the request.
Show child attributes
Load balancer configuration for the request.
Show child attributes
Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.orq.ai/v2/router/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>",
"encoding_format": "float",
"dimensions": 123,
"user": "<string>",
"name": "<string>",
"fallbacks": [
{
"model": "openai/text-embedding-3-small"
}
],
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"orq": {
"name": "<string>",
"fallbacks": [
{
"model": "openai/gpt-4o-mini"
}
],
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"load_balancer": {
"type": "weight_based",
"models": [
{
"model": "openai/gpt-4o",
"weight": 0.7
},
{
"model": "anthropic/claude-3-5-sonnet",
"weight": 0.3
}
]
}
}
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
123
],
"index": 123
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 123,
"total_tokens": 123
}
}