Create embeddings
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
Prefix with ollm::embedding_model_name::. An unprefixed name is accepted but deprecated.
A single string or an array of strings to embed.
Optional output dimensionality.
int321 <= value"float""float" | "base64"Tags written verbatim to spend logs.
Inference cache control.
falseResponse 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"
}
}Create a chat completion POST
Generate a model response for a conversation. Set `stream: true` to receive Server-Sent Events. Only `model` and `messages` are required. `n` must be `1` (or omitted); other values are rejected. `stop` accepts an array of strings only (a bare string is not supported).
Rerank documents POST
Rank a list of documents by relevance to a query (Cohere-compatible shape). The gateway proxies the request to the model's first provider, which must be an OpenAI-type provider exposing a `/rerank` endpoint.