DocsAPI reference
Models
GET /v1/models — the models your API key can reach right now, with their context windows, readiness and instances.
HTTP
GET https://osarai.xyz/v1/modelsLists the models your running instances serve. Tools call it to fill their model pickers; you can use it to check that an instance is Ready before sending work.
Terminal
curl "https://osarai.xyz/v1/models" -H "Authorization: Bearer $OSARAI_API_KEY"Python
from openai import OpenAI
import os
client = OpenAI(base_url="https://osarai.xyz/v1", api_key=os.environ["OSARAI_API_KEY"])
for model in client.models.list():
print(model.id)TypeScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://osarai.xyz/v1", apiKey: process.env.OSARAI_API_KEY });
for await (const model of client.models.list()) console.log(model.id);Response
JSON
{
"object": "list",
"data": [
{
"id": "qwen3.8-27b",
"object": "model",
"created": 1793952000,
"owned_by": "osarai",
"display_name": "qwen3.8-27b",
"type": "model",
"max_model_len": 131072,
"ready": true,
"instances": [{ "id": "a1b2c3d4e5", "ready": true, "max_model_len": 131072 }]
}
]
}| Field | Meaning |
|---|---|
id | The model id to send as model |
display_name, type | For Anthropic clients such as Claude Code's model picker |
max_model_len | Context window in tokens; with several instances, the smallest among the ready ones |
ready | true when at least one instance answers requests |
instances | Each instance with its id (for X-Instance-Id), readiness and context window |
An instance appears from the moment you deploy it, with ready: false until it finishes starting. With no instance running, data is empty and requests answer 503.