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 $ALBASTOV_API_KEY"

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.albastov.com/v1", api_key=os.environ["ALBASTOV_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.ALBASTOV_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
for (const model of data) console.log(model.id, model.state, model.context_length);

Response

200, Content-Type: application/json, an OpenAI model list. The example shows one model.

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",
        "quantization": "W4A16 AutoRound",
        "bits": 4,
        "size": "about 14 GB",
        "context_tokens": 150000,
        "speed": {"min_tok_s": 41, "max_tok_s": 41}
      }
    }
  ]
}
FieldValue
idThe value for model in a chat completion
stateloaded, starting, stopped or unavailable
loadedtrue when state is loaded
context_lengthPrompt plus output token limit; null when not set
createdUnix seconds
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; false for every current model
capabilities.max_parallelRequests one account runs at once on the model
facts.nameDisplay name
facts.paramsParameter count
facts.quantizationWeight format
facts.bitsBits per weight
facts.sizeSize of the weights
facts.context_tokensContext length in tokens
facts.speedOutput tokens per second for one request: min_tok_s, max_tok_s

Any facts field except name may be missing. Entries and facts carry further fields (owned_by, engine, mode, cold_start_s, notes, speed.note); their values may change without notice.

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 language model service is offline