AI gateway · 240+ models

One API,
every model.

Send one request and n4n AI routes it to the best healthy provider — with automatic fallback, per-token metering, and one credit balance across every model.

No subscription · pay per token · works with every OpenAI SDK

POST https://n4n.ai/api/v1/chat/completions
$ curl https://n4n.ai/api/v1/chat/completions \
  -H "Authorization: Bearer n4n_…" \
  -d '{
    "model": "anthropic/claude-sonnet-4-5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

→ routed to anthropic · first token 412 ms
← streamed · 384 tokens · $0.006112 metered

Why n4n AI

Built for production traffic

Routing and fallback

Requests land on the cheapest healthy provider. Rate limits and outages reroute automatically — failed attempts cost nothing.

Usage-based billing

Every token is metered in micro-dollars against one credit balance. No subscription, no minimums, credits never expire.

One key for every provider

Keep your OpenAI client — change the base URL and the key. One n4n key unlocks Anthropic, OpenAI, Google, Meta, and more.

Catalog

One id per model, priced per 1M tokens

Full catalog in the console
Model Context Input /1M Output /1M Providers

Claude Haiku 4.5

anthropic/claude-haiku-4-5

200K $1.00 $5.00
anthropic

Claude Sonnet 4.5

anthropic/claude-sonnet-4-5

200K $3.00 $15.00
anthropicopenrouter

GPT-4o

openai/gpt-4o

128K $2.50 $10.00
openaiopenrouter

GPT-4o mini

openai/gpt-4o-mini

128K $0.15 $0.60
openaiopenrouter

Pricing

Credits in, tokens out. Nothing else.

01 · top up

Load credits from $1

Pay with PayPal or crypto. Credits never expire and there is no monthly fee.

02 · send requests

Every token is metered

Each response is billed as prompt + completion tokens at the model's listed price, accounted in micro-dollars.

03 · fallback included

Pay only for what lands

Rate limits and outages reroute to the next provider automatically. Failed attempts cost nothing.

Point your SDK at n4n.ai/api/v1

Keep your OpenAI client. Change the base URL and the key, pick any model id from the catalog, and stream as usual.

Create an API key