Oneledger

A gateway layer between your code and every model provider

Oneledger sits in front of OpenAI, Anthropic, Google and DeepSeek. It speaks their API formats, decides where each request goes, meters every token, and keeps the keys and limits in one place.

01

Drop-in compatible endpoints

Oneledger implements the OpenAI Chat Completions specification, so the official OpenAI SDKs for Python and Node, LangChain, LlamaIndex and most agent frameworks work after changing the base URL and key.

  • POST /v1/chat/completions
  • POST /v1/messages (Anthropic format)
  • GET  /v1/models
  • POST /v1/batches

Streaming uses server-sent events with stream: true. Tool calling, JSON mode and image inputs are passed through for models that support them.

stream.ts

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: process.env.ONELEDGER_BASE_URL, // Oneledger /v1 endpoint
  apiKey: process.env.ONELEDGER_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "openai/gpt-6.1-sol",
  messages: [{ role: "user", content: "Draft a release note." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
Illustrative product interface
02

Routing and provider fallback

Model IDs use the provider/model format. When a model is available from more than one provider, Oneledger sends the request to the healthiest one and retries on the next, up to 2 times, after a 429, a 5xx or a timeout.

Pin a key to a provider or region when a contract requires it. Pinned requests are never rerouted, and the response header tells you which provider served each call.

03

Spend caps on every key

Create separate keys for production, staging and each internal tool. Each key gets a monthly cap in dollars, an optional model allow-list and a rate limit (600 requests per minute by default). When a key reaches its cap, it returns HTTP 429 with a clear error until the next cycle or until you raise the limit.

Balance alerts email the account owner at the threshold you set, before credits run out.

Illustrative product interface
Illustrative product interface
04

Usage you can actually read

Every request is logged with key, model, provider, input, output and cached tokens, cost, latency and status code. Filter by any of them, compare weeks, and export daily totals as CSV for finance.

Prompt and completion bodies are not stored unless you enable request logging on a specific key for debugging.

05

Team and enterprise controls

Run one workspace for the whole company with shared credits and clear ownership of each key.

Roles
Owner, admin, developer and billing roles per workspace and project.
Audit log
Who created, changed, rotated or revoked each key, and when.
Bring your own key
Attach existing OpenAI, Anthropic or Google keys and keep your negotiated rates; that usage is billed by the provider.
SSO (Enterprise)
SAML 2.0 single sign-on with Okta or Microsoft Entra ID, plus SCIM provisioning.

See what each model costs per million tokens.

View pricing