Skip to content

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
      }
    }
  ]
}
FieldValue
idThe value for model in a chat completion
objectmodel
createdUnix seconds
stateloaded, starting, stopped or unavailable
loadedtrue when state is loaded
context_lengthPrompt plus output token limit; null when not set
capabilities.paralleltrue when the model runs many requests at once
capabilities.thinkingtrue when the model reasons before answering
capabilities.visiontrue when the model reads images
capabilities.max_parallelRequests one account runs at once on the model
facts.nameDisplay name; the model id when the model has none
facts.paramsParameter count, such as 27B; may be missing
facts.context_tokensContext 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

StatusCodeMeaning
401missing_api_keyNo Authorization header
401invalid_api_keyUnknown or revoked key
403insufficient_scopeThe key does not carry the scope llm
429rate_limitedThe key's calls per minute or per day are used up
500internalServer error
502edge_errorNo valid answer from the model service
503device_offlineThe model service is offline