List models
GET /v1/models response fields and errors.
GET /v1/models
Returns the installed chat models with their state, context length, capabilities and facts.
Request
The request does not load a model.
curl
curl https://api.albastov.com/v1/models \
-H "Authorization: Bearer $ALBASTAR_API_KEY"Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.albastov.com/v1",
api_key=os.environ["ALBASTAR_API_KEY"],
)
for model in client.models.list():
print(model.id, model.state, model.context_length)JavaScript
const res = await fetch("https://api.albastov.com/v1/models", {
headers: { Authorization: `Bearer ${process.env.ALBASTAR_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
for (const m of data) console.log(m.id, m.state, m.context_length);Response
200, Content-Type: application/json, an OpenAI model list. The example shows one model and the fields in the
table below.
Response
{
"object": "list",
"data": [
{
"id": "qwen3.8-27b",
"object": "model",
"created": 1793304723,
"loaded": true,
"state": "loaded",
"context_length": 150000,
"capabilities": {
"parallel": true,
"thinking": true,
"vision": false,
"max_parallel": 64
},
"facts": {
"name": "Qwen3.8 27B",
"params": "27B",
"context_tokens": 150000
}
}
]
}| Field | Value |
|---|---|
id | The value for model in a chat completion |
object | model |
created | Unix seconds |
state | loaded, starting, stopped or unavailable |
loaded | true when state is loaded |
context_length | Prompt plus output token limit; null when not set |
capabilities.parallel | true when the model runs many requests at once |
capabilities.thinking | true when the model reasons before answering |
capabilities.vision | true when the model reads images |
capabilities.max_parallel | Requests one account runs at once on the model |
facts.name | Display name; the model id when the model has none |
facts.params | Parameter count, such as 27B; may be missing |
facts.context_tokens | Context length in tokens; may be missing |
Entries and facts carry further fields that are not part of this contract: their names and values may change or
disappear without notice. Read only the fields in the table, and ignore unknown fields.
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No Authorization header |
| 401 | invalid_api_key | Unknown or revoked key |
| 403 | insufficient_scope | The key does not carry the scope llm |
| 429 | rate_limited | The key's calls per minute or per day are used up |
| 500 | internal | Server error |
| 502 | edge_error | No valid answer from the model service |
| 503 | device_offline | The model service is offline |