API reference
Models
GET /v1/models returns the one model your key's allocation can call.
Lists the models your key can call. Because a key is bound to one allocation and an allocation covers one model, the list has exactly one entry.
GET
/v1/modelsRequires the inference scope.
Example
curl https://cairva.xyz/v1/models \
-H "Authorization: Bearer $CAIRVA_API_KEY"const models = await client.models.list();
for (const model of models.data) console.log(model.id, model.context_length);for model in client.models.list():
print(model.id, model.model_extra["context_length"])Response
{
"object": "list",
"data": [
{
"id": "gemma4:e2b",
"object": "model",
"created": 1793433600,
"owned_by": "cairva",
"context_length": 8192
}
]
}| Field | Meaning |
|---|---|
id | The value to send as model in chat completions |
created | When the model was added to Cairva's catalog, in Unix seconds |
owned_by | Always cairva |
context_length | The model's context limit in tokens, from Cairva's catalog |
The context_length above is an example. Read the value for your model from the response.
Calling chat completions with any other model fails with 403 model_not_permitted, and the message names the model your key can call.