BETA

Docs
Documentation

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.

Base URL
https://apily.pro/v1
Auth header
Authorization: Bearer apily_your-api-key — x-api-key also accepted
Models
GET /v1/models

What 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

  1. Sign in at apily.pro (Telegram, Google or email).
  2. Open API in the sidebar and press Generate.
  3. Copy the key whole, including the apily_ prefix — it's shown once.

Recommended path

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

SymptomCauseFix
401 Missing API keyNo auth header was sent.Apily accepts Authorization: Bearer … and x-api-key: ….
401 Invalid API keyKey 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 verifiedYour Apily account's email address isn't verified yet.Verify your email from the banner in the Apily app, then retry.
404 Model not foundThe 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 unavailableThe 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 balanceYour 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 requestsYour 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 errorThe upstream provider returned an unexpected error.Retry the request; try a different model if it persists.
Every route on 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.