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

  1. Create an account — it comes with $0.20 of free credit.
  2. Mint an API key at /keys. The full sk-ap-live-… value is shown exactly once, at creation — store it somewhere safe.
  3. Point the official openai SDK (or curl) at https://34.179.237.55.nip.io/v1 and stream.
curl
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
  }'
Python — pip install openai
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="")
Node — npm install openai
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.

usage and non-streaming
# 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
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 shape
{
  "error": {
    "message": "...",
    "type": "insufficient_quota",
    "code": "insufficient_quota",
    "param": null
  }
}
API error codes
HTTPtypeWhen
401invalid_request_error / invalid_api_keymissing, malformed, revoked, or expired key
402insufficient_quotabalance ≤ 0 — top up at /billing
400invalid_request_errorunknown model, bad messages, over context
429rate_limit_exceededtoo many requests — honor the Retry-After header
502api_errorupstream 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