API v1 · OpenAI-compatible

Build with Anthypa

One endpoint, every flagship model. If you have used the OpenAI SDK before, you already know ours — change the base URL, swap the key, ship.

Quickstart

  1. Subscribe to any paid plan (Chat Lite or higher) and create a key in your account. Keys look like ah-… — store them safely; the full key is shown once.
  2. Point your client at https://anthypa.com/api/v1.
  3. Send a chat completion (below) — that's it.
curl https://anthypa.com/api/v1/chat/completions   -H "Authorization: Bearer ah-YOUR_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "gpt-5.6-sol",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Authentication

All requests use Authorization: Bearer <key>. Keys are created per account in the dashboard, can be revoked at any time, and inherit your plan limits. Never ship keys in client-side code.

Authorization: Bearer ah-YOUR_KEY

Chat Completions

POST /api/v1/chat/completions mirrors the OpenAI schema: model, messages, optional max_tokens, temperature, stream.

{
  "model": "claude-opus-5",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "Explain SSE in two lines." }
  ],
  "max_tokens": 200,
  "temperature": 0.7,
  "stream": false
}

Response shape is standard:

{
  "id": "resp_…",
  "object": "chat.completion",
  "created": 1788133261,
  "model": "gpt-5.6-sol",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "…" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 21, "completion_tokens": 48, "total_tokens": 69 }
}

Streaming

Set "stream": true to receive Server-Sent Events — the same chunks the OpenAI SDK parses transparently.

from openai import OpenAI

client = OpenAI(
    api_key="ah-YOUR_KEY",
    base_url="https://anthypa.com/api/v1",
)

stream = client.chat.completions.create(
    model="gemini-3.1-pro",
    messages=[{"role": "user", "content": "Write a haiku about APIs"}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")

Models

Fetch the live list with GET /api/v1/models. Popular picks:

claude-opus-5Anthropic flagshipgpt-5.6-solOpenAI flagshipgpt-5.6-terraOpenAI, fastgemini-3.1-proGoogle flagshipglm-5.2Z.ai, value

Errors

StatusMeaningWhat to do
401UnauthorizedMissing or invalid API key. Check the Authorization header and that the key starts with ah-.
402Payment RequiredQuota exhausted or API access locked on the Free plan. Upgrade or wait for the daily reset.
404Not FoundUnknown model id. Fetch GET /api/v1/models for the live list.
429Rate LimitedRPM or concurrency limit hit. Back off and retry; limits are per plan.
500Upstream ErrorThe model provider failed. Retry once; the chat fallback may route to a sibling model.

Limits

  • Rate limits are per plan (RPM) — Developer plans get higher concurrency (5 on Dev, 15 on Dev Pro).
  • No auto-renewal: every purchase opens 30 days of access, then simply buy again.
  • Free plan: unlimited base models in chat, API access requires a paid plan.

SDKs & tools

Because the API is OpenAI-compatible, any tool that accepts a custom base URL works — OpenAI SDK (Python / Node / Go), LangChain, LlamaIndex, Cursor, Continue, Swagger UI, Postman, Insomnia. Load the machine-readable spec from /openapi.json (OpenAPI 3.1).

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "ah-YOUR_KEY",
  baseURL: "https://anthypa.com/api/v1",
});

const res = await client.chat.completions.create({
  model: "gpt-5.6-terra",
  messages: [{ role: "user", content: "Ship it." }],
});
console.log(res.choices[0].message.content);