PineRouterDocs
GuidesModelsAPI referenceApps

Embeddings

POST
/v1/embeddings

Authorization

BearerAuth

AuthorizationBearer <token>

Bearer token authentication. Format: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model*string
input*string|

Text to embed

encoding_format?string
Default"float"
Value in"float" | "base64"
dimensions?integer

Output vector dimensions

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://pinerouter.ai/v1/embeddings" \  -H "Content-Type: application/json" \  -d '{    "model": "text-embedding-ada-002",    "input": "string"  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0
      ]
    }
  ],
  "model": "string",
  "usage": {
    "prompt_tokens": 0,
    "total_tokens": 0
  }
}
{
  "error": {
    "code": "",
    "message": "Invalid token (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error"
  }
}
{
  "error": {
    "code": "",
    "message": "This token has no access to model gpt-5-2 (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error"
  }
}
{
  "error": {
    "code": "",
    "message": "You have reached the request limit: maximum 60 requests in 1 minutes (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error"
  }
}
{
  "error": {
    "code": "bad_response_status_code",
    "message": "bad response status code 500 (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error",
    "param": ""
  }
}