Skip to content

Prepaid AI routing gateway

One API. Every model. Pay only for what you use.

Route AI workloads through a single OpenAI-compatible API, control costs per endpoint and receive transparent usage-based billing.

POST /v1/chat/completionspolicy: lowest-cost
Illustrative diagram · model names are placeholders
Base URL
https://api.tokenrail.cloud/v1
Authentication
Bearer token
Protocol
OpenAI-compatible REST API

Why TokenRail

Infrastructure for teams that need control over AI spend

Smart routing

Route each request by cost, latency or availability using policies you define per endpoint or API key.

Automatic fallbacks

When a model is unavailable, requests can fall back to a compatible model you have approved in advance.

Prepaid credits

Buy credits in advance, from €25. No monthly subscription and no seat fees. Pay only for what you consume.

Real-time analytics

Track requests, tokens and spend by endpoint, model and API key as usage is recorded.

Spending controls

Set spending limits per key, scope key permissions and receive low-balance alerts before credits run out.

Transparent billing

Every invoice can include a downloadable statement by period, endpoint, model, requests, tokens and amount.

How it works

From API key to invoice in four steps

  1. 01

    Create an account and generate an API key.

  2. 02

    Purchase prepaid credits.

  3. 03

    Send requests through the unified API.

  4. 04

    Monitor consumption and download billing statements.

Transparent billing

Every euro traced to an endpoint and a model

Each invoice can be accompanied by a consumption statement. Line items reconcile exactly to the invoice total.

Sample data
Billing period: 2026-09-01 → 2026-09-30Statement ST-SAMPLE-0009
Sample monthly consumption statement
EndpointModelRequestsInput tokensOutput tokensCharged
/v1/chat/completionssample/chat-standard42,18031,250,0009,840,000€30.39
/v1/chat/completionssample/reason-pro3,1204,100,0001,520,000€50.90
/v1/responsessample/chat-large8,6406,900,0002,310,000€40.35
/v1/embeddingssample/embed-small96,40048,200,0000€0.96
Model usage€122.60
Routing fee (5%)€6.13
Total excl. VAT€128.73

Built for production workloads

Controls you can configure, not promises

Routing policies

Choose lowest cost, lowest latency or a fixed priority list per endpoint. Policies are applied consistently and logged with each request.

Spending limits

Cap daily or monthly spend per API key or project. Requests beyond the limit are rejected with a clear error instead of drawing down credits.

API-key permissions

Restrict each key to specific endpoints and model categories, and rotate or revoke keys at any time.

Fallbacks

Define an ordered list of compatible models. The model that served the request is returned in the response and recorded in usage.

Usage exports

Export usage as CSV or retrieve it through GET /v1/usage for reconciliation in your own finance tools.

Low-balance alerts

Receive email or webhook notifications when your credit balance crosses a threshold you set.

Add credits. Connect your API. Start routing.