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.
| Variable | Value |
|---|---|
BASE_URL | https://oao.ai.id |
API_KEY | The key the bot delivers after your purchase. It starts with oao-store-. |
Three endpoints are live, all with the same key:
| Endpoint | Format |
|---|---|
/v1/chat/completions | OpenAI Chat Completions. Supports stream: true. |
/v1/messages | Native Anthropic Messages. Works with the Anthropic SDK and Claude clients. |
/v1/responses | Native 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:
Authorization: Bearer oao-store-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXFor /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:
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" }]
}'Streaming: set "stream": true and read the Server-Sent Events stream in the usual OpenAI format.
Anthropic format
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" }]
}'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
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)Node.js
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);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

