Oneledger

OpenAI-compatible LLM gateway

One API key for GPT, Claude, Gemini and DeepSeek.

Keep the OpenAI SDK you already use and change one line: base_url. Oneledger routes each request to the right provider, bills tokens at list price from prepaid credits, and retries on another provider when one fails.

app.py

from openai import OpenAI
import os

client = OpenAI(
    base_url=os.environ["ONELEDGER_BASE_URL"],  # Oneledger /v1 endpoint
    api_key=os.environ["ONELEDGER_API_KEY"],
)

resp = client.chat.completions.create(
    model="anthropic/claude-sonnet-5.5",
    messages=[{"role": "user", "content": "Summarize this invoice."}],
)
print(resp.choices[0].message.content)
Illustrative product interface

OpenAI

gpt-6-astra · gpt-6.1-sol · gpt-6-luna

Anthropic

Claude Fable 5.1 · Opus 5.5 · Sonnet 5.5 · Haiku 5.5

Google

gemini-4-argon · gemini-3.8-flash

DeepSeek

deepseek-v4-pro · deepseek-flash

From signup to first token in four steps

  1. 01

    Add credits

    Top up a prepaid balance from $5. Every request is deducted at the provider's list price per token.

  2. 02

    Create a key

    Issue one key per app or environment and give each a monthly spend cap.

  3. 03

    Change base_url

    Point the OpenAI SDK you already use at Oneledger. Model IDs follow provider/model.

  4. 04

    Watch usage

    See tokens, spend and errors per key, model and provider in the console.

One bill for every model you call

Instead of four provider invoices and four dashboards, every request draws from one credit balance. Spend is broken down by key, model and provider, with input, output and cached tokens counted separately, so you can see which feature is driving the bill.

  • Per-key monthly spend caps that stop requests at the limit
  • Balance alerts by email at the threshold you choose
  • CSV export of daily usage per key and model
Illustrative product interface
Illustrative product interface

Rate limits and outages handled in the same call

When a provider returns a 429, a 5xx or times out, Oneledger retries on another provider serving the same model, up to 2 times, before your client sees an error. Your code makes one request. If you need a specific provider for compliance, pin it and the request will never be rerouted.

Also included

SSE streaming
stream: true works for every model, including tool calls.
Anthropic-format endpoint
/v1/messages for clients built on the Anthropic SDK.
Prompt caching pass-through
Cache writes and hits billed at the provider's cache rates.
Batch jobs
Submit JSONL batches to OpenAI and Gemini at their 50% batch price.
Bring your own key
Attach your own provider keys; that usage is billed by the provider directly.
Team workspaces
Shared credits, member roles and an audit trail of key changes.

Built for teams shipping on more than one model

Independent developers

Try Claude, GPT and Gemini on the same prompt without opening three provider accounts. Start with $5 and no monthly fee.

AI product teams

Route cheap traffic to deepseek-flash or gemini-3.8-flash and hard tasks to Opus 5.5, with one key per service and a cap on each.

Platform and IT teams

Give internal teams model access through one gateway with SSO, roles, audit logs and provider rules you control.

Data handling and service commitments

What happens to your traffic, written plainly.

Metadata-only logging by default
We record timestamp, key, model, provider, token counts, latency and status. Prompt and completion bodies are not stored unless you turn on logging for a key.
Encrypted in transit and at rest
All API traffic uses TLS 1.2 or higher. API keys are stored as hashes and shown once at creation.
Provider rules
Restrict a key to providers that meet your requirements, such as no training on API data or a specific processing region.
Export and deletion
Export usage as CSV at any time. Closing an account deletes stored logs within 30 days.
Support response
Pay as you go within 2 business days, Team within 1 business day, Enterprise per contract.
Instant key revocation
Revoke or rotate any key from the console. Revoked keys are rejected on the next request.

Frequently asked questions

Do you mark up provider prices?

No. Tokens are billed at each provider's published list price. Our revenue is the top-up fee on credits (5% on Pay as you go, 3% on Team) and the Team subscription.

Do you store my prompts and completions?

Not by default. We log request metadata only: timestamp, key, model, provider, token counts, latency and status. Prompt logging is opt-in per key, for debugging.

Which SDKs work?

Any client that speaks the OpenAI Chat Completions format, including the official OpenAI Python and Node SDKs, LangChain and LlamaIndex. Anthropic-format clients can use the /v1/messages endpoint.

What happens when a provider is down or rate-limited?

If the model is served by more than one provider, the request is retried on the next provider, up to 2 times, inside the same call. Requests pinned to one provider are not rerouted.

What happens when my credits run out?

Requests return HTTP 402 until you top up. You can set an email alert at any balance threshold so this does not catch you in production.

Can I get a refund on unused credits?

Unused credits can be refunded under the terms in our Refund Policy, linked in the footer.

Start with $5 in credits and the SDK you already have.