Skip to content
TokenCenter Get API key

Documentation

One OpenAI-compatible API for 284 models, billed from prepaid credit at the provider’s own price, with zero markup.

Base URLhttps://api.tokenctr.com/v1
AuthAuthorization: Bearer ck_…
CompatibilityOpenAI Chat Completions
Models284 OpenRouter models
PricingProvider price, zero markup
PaymentPrepaid credit via Stripe

Start here

TokenCenter is an OpenAI-compatible API. If your code or tool already talks to OpenAI or OpenRouter, point it at https://api.tokenctr.com/v1, use your TokenCenter key, and pick a model ID from the catalog.

curl
curl https://api.tokenctr.com/v1/chat/completions \
  -H "Authorization: Bearer $TOKENCENTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/ministral-3b-2512",
    "messages": [{"role": "user", "content": "Say hello in five words."}],
    "max_tokens": 100
  }'
Python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokenctr.com/v1",
    api_key=os.environ["TOKENCENTER_API_KEY"],
)

resp = client.chat.completions.create(
    model="mistralai/ministral-3b-2512",
    messages=[{"role": "user", "content": "Say hello in five words."}],
    max_tokens=100,
)
print(resp.choices[0].message.content)
print(resp.usage)
JavaScript
// npm install openai   (Node 18+, ES modules)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.tokenctr.com/v1",
  apiKey: process.env.TOKENCENTER_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "mistralai/ministral-3b-2512",
  messages: [{ role: "user", content: "Say hello in five words." }],
  max_tokens: 100,
});
console.log(resp.choices[0].message.content);
console.log(resp.usage);

New here? Follow the Quickstart. Keys cost nothing to create but start at $0, so add credit from a pack before your first call.

All documentation

Good to know

  • Prepaid, no subscription. Buy credit once; each call is deducted from your balance at the provider’s price, split into input and output tokens. See Billing.
  • Every response shows your balance. Successful calls return an x-cosmos-credit-balance header with what’s left, in US dollars.
  • Streaming isn’t available yet. Send non-streaming requests for now.
  • Limits. 60 requests per minute per key and 120 per minute per IP address. See Errors.
  • Prompts stay out of the logs. Usage records keep the model, tokens, and cost, never your prompt or the reply.