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.
- 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
- 01
Create an account and generate an API key.
- 02
Purchase prepaid credits.
- 03
Send requests through the unified API.
- 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.
| Endpoint | Model | Requests | Input tokens | Output tokens | Charged |
|---|---|---|---|---|---|
| /v1/chat/completions | sample/chat-standard | 42,180 | 31,250,000 | 9,840,000 | €30.39 |
| /v1/chat/completions | sample/reason-pro | 3,120 | 4,100,000 | 1,520,000 | €50.90 |
| /v1/responses | sample/chat-large | 8,640 | 6,900,000 | 2,310,000 | €40.35 |
| /v1/embeddings | sample/embed-small | 96,400 | 48,200,000 | 0 | €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.