API Reference
LinaliAPI is fully OpenAI-compatible. Point any OpenAI SDK at our base URL.
Base URL
https://api.linaliapi.com/v1Authentication
Pass your API key via the standard Bearer header:
Authorization: Bearer wf-...Create keys in Dashboard → API Keys.
List models
curl https://api.linaliapi.com/v1/models \
-H "Authorization: Bearer wf-..."Chat completion (non-stream)
curl https://api.linaliapi.com/v1/chat/completions \
-H "Authorization: Bearer wf-..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4.7",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Streaming (SSE)
Set stream: true. We automatically request usage in the final chunk.
{
"model": "claude-sonnet-4.6",
"stream": true,
"messages": [...]
}OpenAI Python SDK
from openai import OpenAI
client = OpenAI(
base_url="https://api.linaliapi.com/v1",
api_key="wf-..."
)
resp = client.chat.completions.create(
model="claude-opus-4.7",
messages=[{"role": "user", "content": "Hi"}],
)
print(resp.choices[0].message.content)Pricing
Flat $0.3 per 1M tokens, input and output, every model.
Errors
401 invalid_api_key— missing or revoked key402 insufficient_balance— top up at /dashboard/billing404 model_not_found— unknown model id429 rate_limited— 600 req/min per key502 upstream_error— upstream provider failed