BETA
Getting Started
Apily is one OpenAI-compatible API for models from Anthropic, OpenAI, Google, DeepSeek, xAI and more — one key, one endpoint, and every request routes to whichever provider currently serves that model at the best price.
https://apily.pro/v1Authorization: Bearer apily_your-api-key — x-api-key also acceptedGET /v1/modelsWhat is the Apily API?
Apily is an OpenAI-compatible gateway. Point any official OpenAI SDK, or any client that accepts a custom base URL, at https://apily.pro/v1 and it works against whichever model you pick from the catalog — no per-provider integration code.
Get an API key
- Sign in at apily.pro (Telegram, Google or email).
- Open API in the sidebar and press Generate.
- Copy the key whole, including the
apily_prefix — it's shown once.
Recommended path
- Quick Start — a working chat completion in under 5 minutes.
- Python, Node.js or PHP setup for your language.
- Chat Completions API reference once you're past the basics.
Relationship to the official provider APIs
Request and response bodies follow the same convention as the official OpenAI API (model, messages, choices, usage), so the official Python / Node.js / PHP HTTP clients work unmodified — just swap base_url and the key. Non-OpenAI models (Anthropic, Google, DeepSeek, xAI, …) are also reachable through this same OpenAI-compatible protocol. Apily additionally serves a native Anthropic Messages endpoint (POST /v1/messages) for Anthropic-protocol clients such as Claude Code — Apily has no Gemini-native endpoint.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
401 Missing API key | No auth header was sent. | Apily accepts Authorization: Bearer … and x-api-key: …. |
401 Invalid API key | Key copied with stray spaces, truncated, or revoked. | Copy the key whole from the API page in your Apily account, the apily_ prefix included. |
403 Email not verified | Your Apily account's email address isn't verified yet. | Verify your email from the banner in the Apily app, then retry. |
404 Model not found | The model ID isn't in the Apily catalog. | Copy the exact ID from GET /v1/models or the Models page in your account. |
503 Model temporarily unavailable | The model exists, but no upstream provider is reachable right now. | Retry in a moment — it usually recovers within a minute. Switch models if it keeps happening. |
402 Insufficient balance | Your token balance can't cover the request's estimated cost. | Top up your balance on the Billing page in your Apily account. |
429 Too many requests | Your account sent more than 600 /v1/* requests in a minute — all of your API keys share one budget. The body is { error: { message, type: "rate_limit_error", code: "rate_limit_exceeded" }, retryAfterSeconds }. | Wait the Retry-After header (or retryAfterSeconds) before retrying, and lower request concurrency. |
502 Upstream error | The upstream provider returned an unexpected error. | Retry the request; try a different model if it persists. |
https://apily.pro/v1 shares a per-account limit of 600 requests per minute; above it Apily answers 429 with a Retry-After header — see HTTP Status Codes.