Origin Docs

Create embeddings

POST
/v1/embeddings
AuthorizationBearer <token>

API key as a bearer token: Authorization: Bearer sk-ollm-<public_id>-<secret>. Required on the dev gateway; the prod gateway is open and ignores this header.

In: header

modelstring

Prefix with ollm::embedding_model_name::. An unprefixed name is accepted but deprecated.

inputstring|

A single string or an array of strings to embed.

dimensions?integer

Optional output dimensionality.

Formatint32
Range1 <= value
encoding_format?string
Default"float"
Value in"float" | "base64"
ollm::tags?

Tags written verbatim to spend logs.

ollm::dryrun?boolean
ollm::cache_options?

Inference cache control.

ollm::include_raw_response?boolean
Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.gateway.orgn.com/v1/embeddings" \  -H "Content-Type: application/json" \  -d '{    "model": "ollm::embedding_model_name::vercel_text_embedding_3_small",    "input": "The quick brown fox"  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        0.1
      ],
      "index": 0
    }
  ],
  "model": "string",
  "usage": {
    "prompt_tokens": 0,
    "total_tokens": 0
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}