Search docs...

Start typing to search documentation

Platform Guide

Quickstart

From buying a pack to your first successful request.

OAO AI Gateway is an OpenAI-compatible API for using many AI models through a single API key. You buy a pack through the Telegram bot, the key is issued automatically, and then you use that key in any app that speaks the OpenAI format.

Nothing to install, no dashboard required. One key works for the API, the dashboard, and the examples on this page.

Every request goes to one base URL. You never need a provider-specific host.

VariableValue
BASE_URLhttps://oao.ai.id
API_KEYThe key the bot delivers after your purchase. It starts with oao-store-.

Three endpoints are live, all with the same key:

EndpointFormat
/v1/chat/completionsOpenAI Chat Completions. Supports stream: true.
/v1/messagesNative Anthropic Messages. Works with the Anthropic SDK and Claude clients.
/v1/responsesNative OpenAI Responses, converted automatically at the gateway. Streaming emits response.* events.

Routers and agents: enter the base URL without any endpoint path. The router appends the path itself.

Send the key in the Authorization header on every request:

text
Authorization: Bearer oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Sign in to auto-fill your API key

For /v1/messages you may also use x-api-key, the Anthropic SDK style.

The key is the only credential. It is delivered once, so store it safely. You cannot view it again in full afterwards, but you can reveal it from the dashboard or revoke it and issue a new one.

The smallest possible request with curl:

bash
curl https://oao.ai.id/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -d '{
    "model": "glm-5.3",
    "messages": [{ "role": "user", "content": "Halo" }]
  }'

Sign in to auto-fill your API key

Streaming: set "stream": true and read the Server-Sent Events stream in the usual OpenAI format.

Anthropic format

bash
curl https://oao.ai.id/v1/messages \
  -H "x-api-key: oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3",
    "max_tokens": 256,
    "messages": [{ "role": "user", "content": "Halo" }]
  }'

Sign in to auto-fill your API key

Plain-text responses carry a small attribution footer. Responses that already contain it are never stamped twice.

Any OpenAI-compatible SDK works. Only the base URL and the API key change.

Python

python
from openai import OpenAI

client = OpenAI(
    base_url="https://oao.ai.id/v1",
    api_key="oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
)

completion = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "Halo"}],
)
print(completion.choices[0].message.content)

Sign in to auto-fill your API key

Node.js

typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://oao.ai.id/v1",
  apiKey: "oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
});

const completion = await client.chat.completions.create({
  model: "glm-5.3",
  messages: [{ role: "user", content: "Halo" }],
});
console.log(completion.choices[0].message.content);

Sign in to auto-fill your API key

Which models you can use, what VIP means, and how quota is counted: Models, VIP and packs

Connecting your router or agent (9router, Cline, and friends): Routers and agents

When something fails, the status codes are explained here: Errors and rate limits