Quickstart
Aperture exposes an OpenAI-compatible API at https://34.179.237.55.nip.io/v1. If your code speaks to OpenAI, it speaks to Aperture by changing one line: the base URL.
Three steps
- Create an account — it comes with $0.20 of free credit.
- Mint an API key at
/keys. The fullsk-ap-live-…value is shown exactly once, at creation — store it somewhere safe. - Point the official
openaiSDK (or curl) athttps://34.179.237.55.nip.io/v1and stream.
curl https://34.179.237.55.nip.io/v1/chat/completions \
-H "Authorization: Bearer sk-ap-live-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-20b",
"messages": [{ "role": "user", "content": "hello" }],
"stream": true
}'from openai import OpenAI
client = OpenAI(
api_key="sk-ap-live-YOUR_KEY",
base_url="https://34.179.237.55.nip.io/v1",
)
stream = client.chat.completions.create(
model="gpt-oss-20b",
messages=[{"role": "user", "content": "hello"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-ap-live-YOUR_KEY",
baseURL: "https://34.179.237.55.nip.io/v1",
});
const stream = await client.chat.completions.create({
model: "gpt-oss-20b",
messages: [{ role: "user", content: "hello" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Authentication
Every request carries your key as a bearer token: Authorization: Bearer sk-ap-live-YOUR_KEY. Keys are secrets — server-side only, never in a browser bundle or a public repo. Revoke a leaked key at /keys; revocation is immediate. Usage is billed to your prepaid balance and attributed to the key, so /usage can split spend per key.
Streaming
With stream: true the response is server-sent events in OpenAI's chat.completion.chunk shape, terminated by data: [DONE] — the official SDKs parse it natively.
# Drop "stream": true for a single JSON response with a usage object:
# { "choices": [...], "usage": { "prompt_tokens": n, "completion_tokens": n, ... } }
# When streaming, request usage on the final chunk with:
# "stream_options": { "include_usage": true }Listing models
GET /v1/models returns the active catalog in OpenAI's list shape, with a non-standard pricing object (µUSD per 1M tokens) the SDKs ignore and humans appreciate. A valid key is required. The same catalog, with licenses, is on the models page.
curl https://34.179.237.55.nip.io/v1/models \
-H "Authorization: Bearer sk-ap-live-YOUR_KEY"Errors
Errors use OpenAI's envelope, byte for byte, so SDK error handling just works:
{
"error": {
"message": "...",
"type": "insufficient_quota",
"code": "insufficient_quota",
"param": null
}
}| HTTP | type | When |
|---|---|---|
| 401 | invalid_request_error / invalid_api_key | missing, malformed, revoked, or expired key |
| 402 | insufficient_quota | balance ≤ 0 — top up at /billing |
| 400 | invalid_request_error | unknown model, bad messages, over context |
| 429 | rate_limit_exceeded | too many requests — honor the Retry-After header |
| 502 | api_error | upstream died before the first token |
Rate-limit headers
Every /v1 response carries these headers; on a 429 you also get Retry-After in seconds. Per-key limits are configurable at /keys.
- x-request-id
- x-ratelimit-limit-requests
- x-ratelimit-remaining-requests
- x-ratelimit-reset-requests
One base URL away
Create an account$0.20 free credit · keys at /keys · openai-compatible