Embeddings API

Convert text into numerical vectors for semantic search, clustering, and RAG applications.

https://api.qorebit.ai/v1/embeddings

Request Body

ParameterTypeRequiredDescription
modelstringYesThe ID of the model to use. e.g., openai/text-embedding-3-small
inputstring or arrayYesInput text to embed, encoded as a string or array of tokens.

Example Request

cURL
curl https://api.qorebit.ai/v1/embeddings \
  -H "Authorization: Bearer qb_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-small",
    "input": "Qorebit is the best AI gateway."
  }'

Response Example

JSON Response
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.0023064255,
        -0.009327292,
        ...
      ]
    }
  ],
  "model": "openai/text-embedding-3-small",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}