Docs
OAO Documentation
How to use OAO products and services, from your first key to your first request.
Overview
OAO AI Gateway is an OpenAI-compatible API for using a wide range of AI models with a single API Key. Buy a pack via the Telegram bot, get your key automatically, and use it in any app that speaks the OpenAI format.
- Base URL:
https://oao.ai.id/v1 - Endpoints (all three are live):
POST /v1/chat/completions: OpenAI Chat Completions format, supportsstream: truePOST /v1/messages: native Anthropic Messages format, compatible with the Anthropic SDK / Claude clientsPOST /v1/responses: native OpenAI Responses format (auto-converted to Chat Completions at the gateway, works for every model including VIP; streams emitresponse.*events)POST /v1/images/generations: image generation with thedavinci-1model (Davinci Pack only; see Image generation)
Getting started
- Open @OaoStore_bot on Telegram and pick the AI Gateway menu.
- Buy a pack (Token or Unlimited). QRIS and USDT (BSC) payments verify automatically.
- Your API Key is created with your first purchase and delivered once via Telegram; store it safely.
- Log in to the Dashboard to monitor quota, validity, and the model catalog.
Authentication
Send your API Key in the header of every request:
Authorization: Bearer oao-store-XXXX
For /v1/messages, the header x-api-key: oao-store-XXXX is also accepted (Anthropic SDK style).
The key is your only credential, used for both the API and Dashboard login. The full key can never be viewed again after delivery (revoking the old key and issuing a new one is available in the Dashboard, max 2x per week).
Calling the API
curl https://oao.ai.id/v1/chat/completions \
-H "Authorization: Bearer oao-store-XXXX" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'
For streaming, set "stream": true and read the Server-Sent Events (SSE) response in the OpenAI format.
Using the Anthropic format (the /v1/messages endpoint):
curl https://oao.ai.id/v1/messages \
-H "x-api-key: oao-store-XXXX" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello"}]
}'
Plain-text responses from OAO carry a small attribution footer. Responses that already contain it are never double-stamped.
Using routers / agents (9router, Cline, etc.)
Point your router or agent harness at the base URL above. The three things that most often break the connection test:
- The base URL must NOT end with
/messagesor/chat/completions. Enter the base URL ashttps://oao.ai.id/v1; the router appends endpoint paths itself. A base URL ending in/v1/messagesmakes the router post to a nonexistent/v1/v1/messages. - The connection-test model must be in your pack. Routers probe the connection with a tiny request using the provider's "default model". If that model is not in your pack's list (see Model Square), the test fails with something like "Invalid API key or base URL" even though the key is correct. Set the default model to a name exactly matching your pack's model list.
- "Invalid API key or base URL" is a catch-all for every 401/403 rejection - it does not always mean the key is wrong. Also check: the key is not revoked (Auth section of the Dashboard), and the key has not been used from too many IP locations within 24 hours (location rules are in the Packs section). A router running on a VPS + VPN/WARP + a laptop can exceed the location limit; run the router from one fixed location without WARP.
Image generation
The davinci-1 model is an image model - exclusive to Davinci Pack holders and served only through the image endpoint, never /chat/completions. Image generation does not consume chat token quota; usage is still governed by your pack's RPM and concurrency limits.
curl https://oao.ai.id/v1/images/generations \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"model":"davinci-1","prompt":"your image description"}'
- Response:
{"object":"list","data":[{"b64_json":"..."}]}- images arrive as raw base64 (no URL/CDN); save them or render directly asdata:image/png;base64,<b64>. - One request yields 2 images; 12-17 seconds is normal.
- An occasional 500 means upstream rate limiting (not your key) - wait a moment and retry.
- Chat requests to
davinci-*models are always rejected with a message pointing here; the image endpoint rejects any model other thandavinci-*.
Packs & quota rules
| Pack | Quota | Validity |
|---|---|---|
| Token | A token balance (e.g. 5M) that decreases with usage | Has an expiry |
| Unlimited | No token cap during the validity period | Has an expiry |
| VIP Unlimited | No token cap + premium access to VIP models | Has an expiry |
| Pack | RPM/key | Concurrent/key |
|---|---|---|
| VIP | 100 | 4 |
| Unlimited | 15 | 2 |
| Token | 60 | 3 |
Figures come from admin pack settings (rpm, max_concurrent). The 1 Year pack (promo) behaves like Unlimited. The gateway also enforces 120 global active requests: excess gets 503 gateway_busy.
Plain-language definitions of RPM, concurrency, IP limits, and context window are in the Service Terms.
- Your token balance is consumed first before unlimited; paid tokens are never wasted while valid.
- Privileges (models, RPM, context limit) follow the highest pack still active.
- If the token balance runs out before expiry, the Token pack ends. Buy again to top up.
- One key may be used from at most 3 distinct IPs per 24 hours (phone + laptop + office is fine). Beyond that →
403 key_too_many_locations, the sign of a shared key.
Context window limits
Oversized requests are rejected before reaching the provider (your quota is untouched). The estimate is computed from your messages.
| Pack class | Context limit (default) |
|---|---|
| Token | 192,000 tokens |
| Unlimited | 192,000 tokens |
| VIP | 256,000 tokens |
Model catalog
The live, full list of models is on the Model Square page. Each pack also has its own list; your Dashboard shows exactly the models your pack can use.
Every model is the genuine model from its original provider, with automatic fallback routing: if one route hiccups, your request is rerouted and still completes, with results close to the original.
Tip: set up a "combo" (fallback list) in your API router: one primary model plus 2–3 backups from the catalog; if the primary fails, the router switches automatically. Hiccups never interrupt your work.
VIP models & multiplier
Some models carry a ✦ VIP badge (see Model Square): every Claude variant, gpt-6-astra, gpt-5.6-sol, and other premium models.
- VIP packs: all VIP models included freely, no multiplier.
- Token packs: VIP models are already part of your access. Usage is metered with a multiplier: ×1.3 for all Claude + gpt-6-astra + gpt-5.6-sol, ×1.2 for other VIP models. Regular models are always 1:1.
- Unlimited packs: VIP models not included.
Example: a 1,000-token answer from Claude is recorded as 1,300 tokens against a Token pack quota. The small chip on each model card shows the applicable multiplier.
Error codes
| Status | Code | Meaning & fix |
|---|---|---|
| 400 | invalid_body / invalid_model | Invalid JSON or missing model field. Check your payload. |
| 400 | context_length_exceeded | The conversation exceeds your pack's context limit. Shorten it or start a new session. |
| 401 | invalid_api_key | Key is invalid, revoked, or expired. |
| 402 | quota_exhausted | Token balance is empty and no other pack is active. Buy a pack to continue. |
| 403 | model_not_allowed | Model not available to your pack. Check the Dashboard for your model list. |
| 403 | key_too_many_locations | The key was used from too many distinct IPs within 24 hours. Stop sharing it across devices/people. |
| 429 | rate_limited / concurrency_limited | Per-key RPM or parallel-request limit reached. Wait a moment and retry (honor the Retry-After header). |
| 502 | upstream_unavailable | The gateway could not reach the upstream service. Retry shortly. |
| 502 | upstream_error | The upstream service returned an unexpected error. Internal details are hidden; public message: Upstream request failed. |
| 503 | gateway_busy | The gateway's global concurrency is saturated. Retry shortly. |
| 503 | maintenance | The gateway is under scheduled maintenance. Retry shortly; announcements go out on Telegram. |
Note: the only message you will ever receive for a hiccup on OAO's side is Upstream request failed. together with a request_id; internal details are never included in the response. Wait a moment and retry; if it persists, share the request_id with support on Telegram for a quick trace.
Dashboard
- Model Catalog: only the models your pack can use.
- Guide: ready-to-run code samples with your base URL and models.
- History: purchases and referral rewards.
- Live Traffic: anonymous request activity across the gateway.
FAQ
Why is the VIP model missing from my Dashboard?
Because your pack is not VIP yet. The Dashboard catalog only shows models you can actually use.
Does a 503 mean I hit my limit?
No. 503 means the model's provider is having an issue on the router side. Your limits are signaled with 429. Retry in a bit.
My router says "Invalid API key or base URL" even though my key is correct?
That message is your router's catch-all for every 401/403 rejection from OAO - it does not always mean the key is wrong. Most common causes: the base URL was entered down to /v1/messages (https://oao.ai.id/v1 is enough), the router's default model is not in your pack's list, or the key was used from too many IP locations within 24 hours. Details in the Routers & agents section.
I lost my key. What now?
The key is delivered once; keep it safe. If it is truly lost, use Revoke in the Dashboard to issue a new one (pack and quota stay intact), max 2x per week.
How do I get a free key?
Invite friends via Referral: you get +1,000,000 tokens and they get +500,000 tokens after qualifying. Plus 30% commission from every purchase they make.
Support
Need help? Chat CS on Telegram: @Diskotax. Include your Order ID (OAO-XXXX format) for faster handling.