Skip to main content
POST
/
v2
/
router
/
embeddings
curl --request POST \ --url https://api.orq.ai/v2/router/embeddings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "input": [ "The food was delicious", "And the waiter was friendly" ], "model": "openai/text-embedding-3-small" } '
{
  "data": [
    {
      "embedding": "<unknown>",
      "index": 123
    }
  ],
  "model": "<string>",
  "usage": {
    "prompt_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
input
required

Input text to embed, encoded as a string or array of tokens.

Minimum string length: 1
model
string
required

ID of the model to use.

cache
object

Cache configuration for the request.

dimensions
integer<int64>

The number of dimensions the resulting output embeddings should have.

encoding_format
enum<string>

The format to return the embeddings in. Can be either float or base64.

Available options:
float,
base64
fallbacks
object[] | null

Array of fallback models to use if primary model fails.

load_balancer
object

Load balancer configuration for the request.

name
string

The name to display on the trace. If not specified, the default system name will be used.

orq
object

Orq platform extension parameters. Top-level equivalents take priority when both are set.

retry
object

Retry configuration for the request.

timeout
object

Timeout configuration to apply to the request.

user
string

A unique identifier representing your end-user.

Response

200 - application/json

Returns the embedding vector.

data
object[] | null
required

List of embedding objects.

model
string
required

ID of the model used.

object
enum<string>
required

Always "list".

Available options:
list
usage
object
required

The usage information for the request.