Aireadify Gateway · API reference · early access

Docs

The Gateway is OpenAI-compatible. If your code already talks to an OpenAI-style endpoint, changing the base URL and the key is the whole migration.

Quickstart

Base URL: https://api.aireadify.ai/v1. Get a key from the console, then:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aireadify.ai/v1",  # the only line that changes
    api_key=AIREADIFY_API_KEY,
)
r = client.chat.completions.create(
    model="groq/llama-3.3-70b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)

Model ids follow provider/model. The full list with prices is on the Gateway page and from GET /v1/models.

Authentication

Send your key as a bearer token: Authorization: Bearer ak_live_…. Keys are shown once at creation and stored hashed. Test keys start with ak_test_ and are billed the same but are easy to tell apart in logs.

Never ship a key to a browser or a mobile app. Call the Gateway from your backend, or issue a short-lived key per user from the console API.

Chat completions

POST /v1/chat/completions accepts the OpenAI request schema: model, messages, temperature, max_tokens, stream, tools where the upstream supports them. max_tokens is capped at 8192 per request.

The response is the OpenAI response schema. model in the response is the id you requested, not the upstream name.

Streaming

Set "stream": true to receive server-sent events. The final chunk carries a usage block; the Gateway sets stream_options.include_usage for you, and billing is settled from that block. If a stream ends without a usage block, the request is held as unsettled with its reservation and reconciled against provider logs rather than billed as zero.

Models

GET /v1/models returns every enabled model with context_window, data_region and zero_retention so you can pick by policy, not only by price.

ModelProviderContextData regionZero retentionInput / 1MOutput / 1M
deepseek/deepseek-chatDeepSeek128kCNNo$0.34$1.38
deepseek/deepseek-reasonerDeepSeek128kCNNo$0.69$2.74
groq/llama-3.3-70bGroq128kUSYes$0.74$0.99
groq/llama-3.1-8bGroq128kUSYes$0.06$0.10
mistral/mistral-largeMistral128kEUOn request$2.50$7.50
mistral/mistral-smallMistral128kEUOn request$0.25$0.75
xai/grok-4xAI256kUSYes$3.75$18.75

Prices are upstream list price + 25%, in USD per million tokens, billed per token with no per-request minimum. Balances are kept in credits (1 credit = $0.001); fractions of a credit carry over to your next request, never rounded away. Confirmed at launch; DeepSeek requests are processed in China and are not eligible for zero-retention.

Errors

Errors use the OpenAI error envelope: {"error": {"message", "type", "code"}}.

StatuscodeMeaning
401invalid_api_keyMissing, malformed or revoked key.
402insufficient_quotaAccount balance is zero. Top up in the console.
402key_budget_exceededThis key reached its monthly budget.
404model_not_foundUnknown or disabled model id.
429rate_limit_exceededPer-key requests per minute exceeded. See retry-after.
502 / 503upstream_error, provider_unavailableUpstream failed after failover. Not billed.

Upstream 4xx errors (for example a content-policy rejection) are passed through with the provider's status and body, and are not billed.

Rate limits

Each key has a requests-per-minute limit, 60 by default and adjustable in the console. Every response carries an RFC 9331 RateLimit header: limit, remaining, reset (seconds).

Billing

  • Price per token is upstream list price × 1.25, settled exactly from the usage block. No per-request minimum: fractions of a credit carry over to the next request.
  • Before each request the gateway reserves credits up to the request ceiling (estimated input tokens plus max_tokens, times n). A 402 with insufficient_quota means the reservation could not be covered; nothing was sent upstream.
  • Upstream errors are not billed. Streams are billed from the final chunk.
  • Balance and per-key spend are visible in the console and via the account API.
  • Credits do not expire. See the refund policy.

Response headers

HeaderMeaning
x-request-idId to quote in support requests and to find the call in logs.
x-aireadify-modelThe model id that served the request.
x-aireadify-providerThe upstream provider that served it, useful after failover.
ratelimitPer-key limit, remaining and reset.

Scan API

The agent-readiness scanner is public and free: GET https://aireadify.ai/api/scan?url=example.com. No key needed; 10 scans per 10 minutes per IP. The response includes the 0–100 score, category scores, 20 checks with fix prompts, and a markdown summary. OpenAPI: /openapi.json.