API Reference
Apollohub provides an OpenAI-compatible API. Use any OpenAI SDK with your Apollohub key.
https://apollohub.me/Authentication
OpenAI-compatible clients use bearer authentication. Include your API key in the Authorization header:
Anthropic-compatible clients can send the same key in the x-api-key header:
Keep your API key secure. Never expose it in client-side code or public repositories. Load it from environment variables or a secure key store.
Quickstart
1. Get your API key
Go to API keys and create a key. It starts with sk-ah- and is shown only once. Save it immediately.
2. Make your first request
Use the chat completions endpoint to send messages to any supported model:
Endpoints
OpenAI-compatible clients should use https://apollohub.me/v1 as their base URL.
POST /v1/chat/completionsfor chat completionsPOST /v1/responsesfor the Responses APIPOST /v1/messagesfor Anthropic-compatible messagesGET /v1/modelsfor the live model catalog
Streaming
Enable streaming by setting stream: true in your request. The API will return server-sent events as the model generates tokens.
Models
Model availability can change. View the live catalog with pricing on the Models page, or request it from the API:
Use a model ID exactly as returned, for example gpt-5.6-luna or deepseek-v4-flash.
Billing
Apollohub bills by token usage. Input and output tokens are priced separately per model. Check your balance and add funds from the Dashboard.
Usage is deducted after each successful metered response. Requests made without a positive balance return a 402 error.
Error Codes
| Code | Meaning |
|---|---|
400 | Bad request: invalid JSON, missing fields, or unavailable model |
401 | Missing, invalid, disabled, or expired API key |
402 | Insufficient balance: top up your account to continue |
429 | Rate limit exceeded: reduce your request rate |
500 | Unexpected server error: try again later |
502 | Upstream model provider error: try again later |