ADOLA / API MANUALREVISION 01
00 / START HERE

Make your first Adola request.

Keep your OpenAI client, change the base URL and key, and start streaming responses from the model you choose.

01 / QUICKSTART

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.content
02 / COORDINATES

API endpoints

GET https://api.adola.app/v1/models
POST https://api.adola.app/v1/chat/completions

Machine-readable metadata is available at /openapi.json.

03 / ACCESS

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.

04 / INPUT

Request body

Send standard OpenAI-style chat messages and choose the model by its public id.

modelstring

Optional supported model id. Omit it to use the current default.

messagesarray

OpenAI-style chat messages, including system and tool messages.

max_tokensnumber

Completion cap. Defaults to 512; maximum 16,384.

temperaturenumber

Sampling temperature from 0 to 2. Defaults to 0.

streamboolean

Set 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

05 / OUTPUT

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].

Responseapplication/json
{
  "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.

06 / FAULTS

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.

400

Unsupported chat option.

401

Missing bearer key.

402

Workspace quota exceeded or billing disabled.

403

Invalid or revoked bearer key.

422

Malformed JSON, invalid fields, unsupported model, or request too large.

429

Project rate limit exceeded.

500

Unexpected server error.

502

Inference failed or returned an invalid response.

503

Inference is temporarily unavailable.

Adola API quickstart and reference