Documentation
Loading…
Quickstart
Make your first request in under five minutes with any OpenAI-compatible client.
Base URL for this deployment: https://www.aiteraiworld.com/api/v1
Three steps
- Create an account and add credits under Billing. The free tier covers models whose id ends in
:freeonce your email is verified. - Create an API key under API keys. Keys are shown once; give each application its own key with a monthly limit and, optionally, a model allowlist.
- Point your client at the base URL below and call
/chat/completionswith a catalog model id.
text
Base URL: https://www.aiteraiworld.com/api/v1Your first request
The chat endpoint accepts the OpenAI request format. Only the base URL and the key change.
bash
curl https://www.aiteraiworld.com/api/v1/chat/completions \
-H "Authorization: Bearer $AITER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "author/model", "messages": [{"role": "user", "content": "Hello!"}]}'python
from openai import OpenAI
client = OpenAI(base_url="https://www.aiteraiworld.com/api/v1", api_key="<AITER_API_KEY>")
completion = client.chat.completions.create(
model="author/model",
messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)typescript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://www.aiteraiworld.com/api/v1", apiKey: process.env.AITER_API_KEY });
const completion = await client.chat.completions.create({
model: "author/model",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);What comes back
Responses follow the chat.completion object. Every proxied call also carries headers that identify the generation, the provider that served it and what it cost.
json
{
"id": "gen-6f1c…",
"object": "chat.completion",
"model": "author/model",
"choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello! How can I help?" }, "finish_reason": "stop" }],
"usage": { "prompt_tokens": 9, "completion_tokens": 7, "total_tokens": 16 }
}| Header | Meaning |
|---|---|
X-AiterAI-Generation-Id | Identifier for the generation record; pass it to GET /generation?id=. |
X-AiterAI-Provider | Provider that served the request after routing and fallback. |
X-AiterAI-Model | Model id after alias resolution. |
X-AiterAI-Cost | Cost in USD with six decimals. Zero on streams until the record settles. |
X-AiterAI-Cached | true when an exact cache hit answered the request at no charge. |
Next: Streaming, Provider routing and Errors and rate limits.