Rerank documents
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
Model name as registered in the gateway config (e.g. vercel_rerank_2_5).
Documents to rank. Each item is a plain string or an object with a text field.
Maximum results to return.
int321 <= valueInclude document text in results.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.gateway.orgn.com/v1/rerank" \ -H "Content-Type: application/json" \ -d '{ "model": "vercel_rerank_2_5", "query": "What is the capital of France?", "documents": [ "Paris is the capital of France.", "Berlin is in Germany." ], "top_n": 1 }'{
"id": "string",
"results": [
{
"document": {},
"index": 0,
"relevance_score": 1
}
],
"meta": {}
}{
"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 embeddings POST
Generate embedding vectors for input text. Model names should be prefixed with `ollm::embedding_model_name::` (an unprefixed name is accepted but emits a deprecation warning).
Transcribe audio POST
Transcribe an audio file (OpenAI-compatible `multipart/form-data`). The gateway re-streams the form to the model's first provider, which must be an OpenAI-type provider exposing an `/audio/transcriptions` endpoint. Maximum request body size is 100 MB.