Base URL and auth
Create an API key in the customer console, then use it as a bearer token. The base URL is stable for OpenAI-compatible clients.
Base URL
https://subaxis.dev/v1
Authorization
Bearer sk-subaxis...
Documentation
Use Subaxis as an OpenAI-compatible API gateway. Bring your Subaxis API key, point your client at the base URL, and keep using familiar chat, model, usage, and billing endpoints.
Create an API key in the customer console, then use it as a bearer token. The base URL is stable for OpenAI-compatible clients.
Base URL
https://subaxis.dev/v1
Authorization
Bearer sk-subaxis...
Send requests to the OpenAI-compatible chat endpoint. Subaxis handles routing and fallback behind the scenes.
curl https://subaxis.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_SUBAXIS_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [
{ "role": "user", "content": "Write a short launch checklist." }
]
}'
The models endpoint returns the public model IDs, capability metadata, fallback grouping, and current Subaxis pricing per 1M tokens.
GET /v1/models
{
"object": "list",
"data": [{
"id": "glm-5.2",
"object": "model",
"supports_image_input": true,
"supports_tool_calling": true,
"pricing": {
"input": 0.546,
"output": 1.72,
"currency": "usd",
"label": "Per 1M tokens"
}
}]
}
Vision input and tool calling are supported where the routed model/provider supports them. Check /v1/models for model capability metadata.
{
"model": "glm-5.2",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "Read this image and return a JSON summary." },
{ "type": "image_url", "image_url": { "url": "data:image/png;base64,..." } }
]
}],
"tools": [{
"type": "function",
"function": {
"name": "save_summary",
"description": "Save the image summary",
"parameters": {
"type": "object",
"properties": { "summary": { "type": "string" } },
"required": ["summary"]
}
}
}]
}
Use the same Subaxis API key to inspect your account, balance, usage logs, spend, model totals, key totals, and daily GLM 5.2 allowance state.
GET /v1/me
GET /v1/balance
GET /v1/usage?period=30d
GET /v1/usage/logs?limit=100
GET /v1/usage/summary?period=7d
GET /v1/usage/costs?period=30d
GET /v1/usage/models?period=30d
GET /v1/usage/keys?period=30d
GET /v1/daily-free-allowance
Usage endpoints accept period and exact time filters. Times can be Unix seconds, Unix milliseconds, or parseable date strings.
period=24h|7d|30d|90d
start_time=2026-07-01T00:00:00Z
end_time=2026-07-06T00:00:00Z
model=glm-5.2
key_id=ck-...
endpoint=/v1/chat/completions
limit=100
{
"object": "usage.summary",
"total_requests": 42,
"successful_requests": 40,
"failed_requests": 2,
"input_tokens": 120000,
"output_tokens": 45000,
"total_tokens": 165000,
"total_cost": 0.81,
"currency": "usd",
"daily_free_allowance": {
"model": "glm-5.2",
"limit_tokens": 1000000,
"remaining_tokens": 1850000,
"eligible": true
}
}
Billing history returns balance transactions for the authenticated customer, including top-ups, credits, usage deductions, and metadata.
GET /v1/billing/history?limit=100
{
"object": "list",
"data": [{
"object": "balance_transaction",
"id": "txn-...",
"created": 1783296000,
"type": "credit",
"amount": 20,
"currency": "usd",
"metadata": {}
}],
"has_more": false
}
Errors use an OpenAI-style JSON object with clear status codes, messages, and request details your app can handle safely.
{
"error": {
"message": "Insufficient balance. Please add credits to continue.",
"type": "payment_required"
}
}
Subaxis AI is operated by an EU-based company.
Subaxis stores operational metadata such as timestamps, selected model, endpoint, token counts, status code, cost, balance changes, API-key metadata, and latest error metadata. Subaxis does not store, save, sell, or train on prompts, messages, image content, tool-call payloads, or model responses.
Request content is forwarded only to trusted first-party providers or carefully selected provider networks so the model can process the request. Subaxis prioritizes providers with strong privacy commitments and does not intentionally route requests through unknown or low-trust providers. Review the Privacy Policy for the full details.
Read privacy policy