Make your first Adola request.
Keep your OpenAI client, change the base URL and key, and start streaming responses from the model you choose.
Copy the quickstart. Get a response in minutes.
Use your current OpenAI client or REST. The familiar request and response shape keeps integration work small.
from openai import OpenAI
client = OpenAI(
api_key="adola_...",
base_url="https://api.adola.app/v1",
)
response = client.chat.completions.create(
model="gpt-oss-120b",
messages=[
{"role": "system", "content": "Answer from the supplied context."},
{
"role": "user",
"content": open("retrieved_context.txt").read()
+ "\n\nWhich incident caused latency?",
},
],
)
answer = response.choices[0].message.contentAPI endpoints
GET https://api.adola.app/v1/modelsPOST https://api.adola.app/v1/chat/completionsMachine-readable metadata is available at /openapi.json.
Authentication
Add a project-scoped bearer key to every request. Revoke keys independently from the dashboard.
Authorization: Bearer adola_...Use an optional X-Request-ID header for correlation. Every response returns the accepted or generated value in the response header.
Request body
Send standard OpenAI-style chat messages and choose the model by its public id.
modelstringOptional supported model id. Omit it to use the current default.
messagesarrayOpenAI-style chat messages, including system and tool messages.
max_tokensnumberCompletion cap. Defaults to 512; maximum 16,384.
temperaturenumberSampling temperature from 0 to 2. Defaults to 0.
streambooleanSet true for OpenAI-compatible server-sent events.
Current model prices
gpt-oss-120bGPT-OSS 120B$0.14 input and $0.57 output per 1M tokens · $0.001 successful-request minimum
qwen3-30bQwen3 30B$0.11 input and $0.47 output per 1M tokens · $0.001 successful-request minimum
llama-3.3-70bLlama 3.3 70B$0.56 input and $0.75 output per 1M tokens · $0.0015 successful-request minimum
deepseek-v4-flashDeepSeek V4 Flash$0.13 input and $0.26 output per 1M tokens · $0.001 successful-request minimum
Response
Read the answer from choices[0].message.content. Standard usage reports prompt, completion, and total tokens.
adola.billing includes the published input and output rates, the model’s request minimum, whether that minimum applied, and the exact request charge before tax. adola.metering.status is persisted, degraded, or not_applicable.
Each successfully metered request costs the greater of its token subtotal or the model’s displayed request minimum.
With stream: true, content arrives as text/event-stream deltas. The final event contains aggregate usage and billing status, followed by data: [DONE].
{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "gpt-oss-120b",
"choices": [{ "message": { "role": "assistant", "content": "The incident was..." } }],
"usage": { "prompt_tokens": 980, "completion_tokens": 42, "total_tokens": 1022 },
"adola": {
"billing": {
"input_price_per_mtok": 0.14,
"output_price_per_mtok": 0.57,
"minimum_request_charge_usd": 0.001,
"minimum_applied": true,
"request_cost_usd": 0.001
},
"metering": { "persisted": true, "status": "persisted" }
}
}If metering is degraded, the answer succeeded but usage recording did not. Do not automatically retry a successful model request.
Errors
Most errors use { "detail": "message" }. Validation errors return detail as a list of field-level issues. Handle the HTTP status, detail, and response request id together.
400Unsupported chat option.
401Missing bearer key.
402Workspace quota exceeded or billing disabled.
403Invalid or revoked bearer key.
422Malformed JSON, invalid fields, unsupported model, or request too large.
429Project rate limit exceeded.
500Unexpected server error.
502Inference failed or returned an invalid response.
503Inference is temporarily unavailable.