API reference
Every route of the Albastar API, with its parameters, responses and errors.
The base URL is https://api.albastov.com/v1. Authentication, errors and rate limits apply to every route and have a
page each; each other page covers one route or one group of routes.
Quick example
GET /v1/models lists the chat models with their state; the request needs a key with the scope llm and loads no
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"],
)
print([m.id for m in client.models.list().data])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()}`);
console.log((await res.json()).data.map((m) => m.id));The response, shortened to one model without its facts:
{
"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
}
}
]
}Pages
Authentication
API keys, their scopes and the Authorization header.
Errors
Error shapes, status codes, key errors and retry rules.
Rate limits
Call, token, size and wait limits, with the error each returns.
Chat completions
POST /v1/chat/completions parameters, headers, response and errors.
List models
GET /v1/models response fields and errors.
Speech
POST /v1/audio/speech, an audio file of the text in a built-in or saved voice.
Transcriptions
POST /v1/audio/transcriptions, the transcript of an audio file.
Voices
Saved voices: list, create, design, read, change, copy and delete.
Media jobs
Speech and transcription jobs, the wait for a result and the model list.
Uploads
POST /v1/media/uploads, an audio or image file stored on the account.
Samples
GET /v1/media/samples, the reference clip and one sample clip per text-to-speech model.
Events
Publish, list, stream and dismiss events, and receive webhooks.
Docs
The documentation as JSON, as markdown, as llms.txt and its images.
Status
GET /v1/status, the state of the API and of each product, with 90 days of history.
Key concepts
- Base URL
https://api.albastov.com/v1. Request and response bodies are JSON, except audio files and multipart uploads where a route says so.- Authentication
Authorization: Bearer $ALBASTAR_API_KEY. An account keyabk_opens the routes of its scopes:llm,media:read,media:generate,events:publishandevents:read.- Errors
- Every JSON error body carries a
codeand amessage. Branch on the HTTP status andcode; themessagetext may change. - Rate limits
- An account key makes 60 calls per minute and 5,000 per 24 hours by default; a call over the limit fails with
429 rate_limited. Both windows roll, so the per-minute limit frees calls within 60 s. - Request ids
- Every response carries an
X-Request-Idheader. Include the value in a bug report. - User-Agent
- A request with the default
Python-urllibUser-Agent is refused with403and the plain-text bodyerror code: 1010. Every Python example that usesurllibsends"User-Agent": "my-app/1.0"for that reason; send your own program's name. - Versioning
- Every route path starts with
/v1. A breaking change to a stable route appears in the changelog before release; every change to a beta route gets a changelog line; an experimental route may change without notice.
Next steps
Quick start
A key, a first chat completion and a first speech file.
Changelog
Every change to the Albastar API, newest first.
Introduction
The products, their statuses and the conventions every route follows.