TokenRex
Models & PricingFeaturesIntegrationsDocsFAQ
Get API
Home/Features/OpenAI-compatible API
Feature

OpenAI-compatible API

Keep the OpenAI SDK. Swap the base URL and key. Ship in minutes.

TokenRex serves OpenAI-compatible Chat Completions for every chat model in the catalog. If your code, framework or tool already talks to OpenAI, it talks to TokenRex: change the base URL and the API key and everything else — streaming, function tools, JSON output — keeps working. Tools that require the Responses API (such as Codex) are covered by their own integration guides.

Base URL
tokenrex.ai/api/public/v1
Auth
Bearer <your key>
Streaming
Server-sent events

What you get

  • Drop-in replacement for the OpenAI base URL
  • Works with openai-python, openai-node and every compatible SDK
  • Streaming, function calling and JSON mode supported
  • One key unlocks OpenAI, Anthropic and Google chat models
  • No proprietary request shapes and no lock-in

Common use cases

ChatbotsAgentsCoding copilotsRAG pipelinesBatch jobsSupport automation

How it works

  1. 1
    Create your account
    Sign up for TokenRex — no card required, no waitlist.
  2. 2
    Top up your wallet
    Add funds through Razorpay. The confirmed amount is credited to your balance.
  3. 3
    Create an API key
    Generate a scoped key from the dashboard. Keys are shown once and stored hashed.
  4. 4
    Make your first call
    Point your SDK at the TokenRex base URL. Every request is metered against your wallet in real time.

Code examples

1
2
3
4
5
6
7
8
9
10
11
12
from openai import OpenAI

client = OpenAI(
    api_key="sk-tb-YOUR_KEY",
    base_url="https://tokenrex.ai/api/public",
)

resp = client.chat.completions.create(
    model="gpt-6-astra",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Frequently asked questions

Do I need to rewrite my code?

No. Change base_url and api_key; the rest of your code stays the same.

Are streaming and tool calls supported?

Yes. Token streaming and your own function tools are supported on chat models.

Can I call Claude and Gemini through the OpenAI format?

Yes. Every chat model in the catalog answers on the OpenAI-compatible endpoint — switch models by changing one string.

What about the Responses API?

Tools that need Responses compatibility (for example Codex) have dedicated setup guides on the Integrations page.

Related features

Every frontier model, one endpoint

GPT-6 Astra, Claude Opus 5.5, Claude Fable 5.1, Gemini 3.8 and more — one key, one wallet.

Native Claude API

Call Claude models in the Anthropic Messages format, with Claude Code support.

Low latency

Responses stream token by token as the model writes them.

Get API key Models & PricingCost calculatorAPI documentation
All featuresNext: GPT Live voice

Live pricing & comparison

Live market prices per 1M tokens for every chat model on the endpoint.

Chat

ModelInputOutput / unit
chat-latest

Latest Instant model used in ChatGPT — natural conversation

$5.00$30.00Details
claude-fable-5-1

Claude Fable 5.1 with medium thinking (default)

$10.00$50.00Details
claude-fable-5-1-high

Claude Fable 5.1 with high thinking — deeper reasoning

$10.00$50.00Details
claude-fable-5-1-low

Claude Fable 5.1 with low thinking — fastest, cheapest per answer

$10.00$50.00Details
claude-fable-5-1-xhigh

Claude Fable 5.1 with extra-high thinking — deepest reasoning

$10.00$50.00Details
claude-haiku-4-5

Claude Haiku 4.5 with medium thinking (default)

$1.00$5.00Details
claude-haiku-4-5-high

Claude Haiku 4.5 with high thinking — deeper reasoning

$1.00$5.00Details
claude-haiku-4-5-low

Claude Haiku 4.5 with low thinking — fastest, cheapest per answer

$1.00$5.00Details
claude-haiku-4-5-xhigh

Claude Haiku 4.5 with extra-high thinking — deepest reasoning

$1.00$5.00Details
claude-opus-5

Claude Opus 5 with medium thinking (default)

$5.00$25.00Details
claude-opus-5-5

Claude Opus 5.5 with medium thinking (default)

$4.00$20.00Details
claude-opus-5-5-fast

Claude Opus 5.5 fast mode (quicker output, premium rate) with medium thinking (default)

$8.00$40.00Details
claude-opus-5-5-fast-high

Claude Opus 5.5 fast mode (quicker output, premium rate) with high thinking — deeper reasoning

$8.00$40.00Details
claude-opus-5-5-fast-low

Claude Opus 5.5 fast mode (quicker output, premium rate) with low thinking — fastest, cheapest per answer

$8.00$40.00Details
claude-opus-5-5-fast-xhigh

Claude Opus 5.5 fast mode (quicker output, premium rate) with extra-high thinking — deepest reasoning

$8.00$40.00Details
claude-opus-5-5-high

Claude Opus 5.5 with high thinking — deeper reasoning

$4.00$20.00Details
claude-opus-5-5-low

Claude Opus 5.5 with low thinking — fastest, cheapest per answer

$4.00$20.00Details
claude-opus-5-5-xhigh

Claude Opus 5.5 with extra-high thinking — deepest reasoning

$4.00$20.00Details
claude-opus-5-fast

Claude Opus 5 fast mode (quicker output, premium rate) with medium thinking (default)

$10.00$50.00Details
claude-opus-5-fast-high

Claude Opus 5 fast mode (quicker output, premium rate) with high thinking — deeper reasoning

$10.00$50.00Details
claude-opus-5-fast-low

Claude Opus 5 fast mode (quicker output, premium rate) with low thinking — fastest, cheapest per answer

$10.00$50.00Details
claude-opus-5-fast-xhigh

Claude Opus 5 fast mode (quicker output, premium rate) with extra-high thinking — deepest reasoning

$10.00$50.00Details
claude-opus-5-high

Claude Opus 5 with high thinking — deeper reasoning

$5.00$25.00Details
claude-opus-5-low

Claude Opus 5 with low thinking — fastest, cheapest per answer

$5.00$25.00Details
claude-opus-5-xhigh

Claude Opus 5 with extra-high thinking — deepest reasoning

$5.00$25.00Details
claude-sonnet-5

Claude Sonnet 5 with medium thinking (default)

$2.00$10.00Details
claude-sonnet-5-high

Claude Sonnet 5 with high thinking — deeper reasoning

$2.00$10.00Details
claude-sonnet-5-low

Claude Sonnet 5 with low thinking — fastest, cheapest per answer

$2.00$10.00Details
claude-sonnet-5-xhigh

Claude Sonnet 5 with extra-high thinking — deepest reasoning

$2.00$10.00Details
gemini-2.5-flash

Balanced Gemini 2.5

$0.30$2.50Details
gemini-2.5-flash-lite

Cheapest Gemini 2.5

$0.10$0.40Details
gemini-2.5-pro

Strong multimodal reasoning

$1.25$10.00Details
gemini-3-flash-preview

Fast Gemini preview

$0.50$3.00Details
gemini-3.1-flash-lite

Cost-efficient high volume

$0.25$1.50Details
gemini-3.1-pro-preview

Next-gen Gemini Pro reasoning

$2.00$12.00Details
gemini-3.5-flash

High-efficiency Gemini 3.5

$1.50$9.00Details
gemini-3.6-flash

High-efficiency Gemini 3.6

$0.75$3.75Details
gemini-3.7-flash

Latest Gemini Flash (default)

$0.75$3.75Details
gemini-3.8-flash

Latest-generation Gemini Flash model for fast coding, reasoning, and agentic workflows.

$0.75$3.75Details
gemini-4-argon

Frontier Gemini model for long-horizon coding, reasoning and enterprise knowledge work — 1M context, text/image/audio/video input

$2.00$10.00Details
gpt-5

Powerful multimodal all-rounder

$1.25$10.00Details
gpt-5-high

GPT-5 with high thinking — deeper reasoning

$1.25$10.00Details
gpt-5-low

GPT-5 with low thinking — fastest replies, lowest cost

$1.25$10.00Details
gpt-5-mini

Fast, affordable GPT-5

$0.25$2.00Details
gpt-5-mini-high

GPT-5 Mini with high thinking — deeper reasoning

$0.25$2.00Details
gpt-5-mini-low

GPT-5 Mini with low thinking — fastest replies, lowest cost

$0.25$2.00Details
gpt-5-mini-xhigh

GPT-5 Mini with extra-high thinking — deepest reasoning

$0.25$2.00Details
gpt-5-nano

Ultra-cheap GPT-5 for simple tasks

$0.05$0.40Details
gpt-5-nano-high

GPT-5 Nano with high thinking — deeper reasoning

$0.05$0.40Details
gpt-5-nano-low

GPT-5 Nano with low thinking — fastest replies, lowest cost

$0.05$0.40Details
gpt-5-nano-xhigh

GPT-5 Nano with extra-high thinking — deepest reasoning

$0.05$0.40Details
gpt-5-xhigh

GPT-5 with extra-high thinking — deepest reasoning

$1.25$10.00Details
gpt-5.2

Complex reasoning & problem solving

$1.75$14.00Details
gpt-5.2-high

GPT-5.2 with high thinking — deeper reasoning

$1.75$14.00Details
gpt-5.2-low

GPT-5.2 with low thinking — fastest replies, lowest cost

$1.75$14.00Details
gpt-5.2-xhigh

GPT-5.2 with extra-high thinking — deepest reasoning

$1.75$14.00Details
gpt-5.4

Affordable frontier model

$2.50$15.00Details
gpt-5.4-high

GPT-5.4 with high thinking — deeper reasoning

$2.50$15.00Details
gpt-5.4-low

GPT-5.4 with low thinking — fastest replies, lowest cost

$2.50$15.00Details
gpt-5.4-mini

Strong mini for high volume

$0.75$4.50Details
gpt-5.4-mini-high

GPT-5.4 Mini with high thinking — deeper reasoning

$0.75$4.50Details
gpt-5.4-mini-low

GPT-5.4 Mini with low thinking — fastest replies, lowest cost

$0.75$4.50Details
gpt-5.4-mini-xhigh

GPT-5.4 Mini with extra-high thinking — deepest reasoning

$0.75$4.50Details
gpt-5.4-nano

Cheapest GPT-5.4 for simple tasks

$0.20$1.25Details
gpt-5.4-nano-high

GPT-5.4 Nano with high thinking — deeper reasoning

$0.20$1.25Details
gpt-5.4-nano-low

GPT-5.4 Nano with low thinking — fastest replies, lowest cost

$0.20$1.25Details
gpt-5.4-nano-xhigh

GPT-5.4 Nano with extra-high thinking — deepest reasoning

$0.20$1.25Details
gpt-5.4-pro

Premium GPT-5.4 deep reasoning

$30.00$180.00Details
gpt-5.4-pro-high

GPT-5.4 Pro with high thinking — deeper reasoning

$30.00$180.00Details
gpt-5.4-pro-xhigh

GPT-5.4 Pro with extra-high thinking — deepest reasoning

$30.00$180.00Details
gpt-5.4-xhigh

GPT-5.4 with extra-high thinking — deepest reasoning

$2.50$15.00Details
gpt-5.5

Frontier coding & analysis

$5.00$30.00Details
gpt-5.5-high

GPT-5.5 with high thinking — deeper reasoning

$5.00$30.00Details
gpt-5.5-low

GPT-5.5 with low thinking — fastest replies, lowest cost

$5.00$30.00Details
gpt-5.5-pro

Extended-reasoning GPT-5.5 Pro

$30.00$180.00Details
gpt-5.5-pro-high

GPT-5.5 Pro with high thinking — deeper reasoning

$30.00$180.00Details
gpt-5.5-pro-xhigh

GPT-5.5 Pro with extra-high thinking — deepest reasoning

$30.00$180.00Details
gpt-5.5-xhigh

GPT-5.5 with extra-high thinking — deepest reasoning

$5.00$30.00Details
gpt-5.6-luna

Fast, low-cost GPT-5.6

$0.20$1.20Details
gpt-5.6-luna-high

GPT-5.6 Luna with high thinking — deeper reasoning

$0.20$1.20Details
gpt-5.6-luna-low

GPT-5.6 Luna with low thinking — fastest replies, lowest cost

$0.20$1.20Details
gpt-5.6-luna-xhigh

GPT-5.6 Luna with extra-high thinking — deepest reasoning

$0.20$1.20Details
gpt-5.6-sol

Flagship GPT-5.6 reasoning & agentic

$4.00$20.00Details
gpt-5.6-sol-high

GPT-5.6 Sol with high thinking — deeper reasoning

$4.00$20.00Details
gpt-5.6-sol-low

GPT-5.6 Sol with low thinking — fastest replies, lowest cost

$4.00$20.00Details
gpt-5.6-sol-xhigh

GPT-5.6 Sol with extra-high thinking — deepest reasoning

$4.00$20.00Details
gpt-5.6-terra

Balanced everyday GPT-5.6

$2.00$12.00Details
gpt-5.6-terra-high

GPT-5.6 Terra with high thinking — deeper reasoning

$2.00$12.00Details
gpt-5.6-terra-low

GPT-5.6 Terra with low thinking — fastest replies, lowest cost

$2.00$12.00Details
gpt-5.6-terra-xhigh

GPT-5.6 Terra with extra-high thinking — deepest reasoning

$2.00$12.00Details
gpt-6-astra

OpenAI's most capable model for complex reasoning, coding and research — balanced thinking

$10.00$50.00Details
gpt-6-astra-fast

GPT-6 Astra on priority serving for faster replies — 2x price, balanced thinking

$20.00$100.00Details
gpt-6-astra-fast-high

GPT-6 Astra on priority serving with high thinking — 2x price

$20.00$100.00Details
gpt-6-astra-fast-low

GPT-6 Astra on priority serving with low thinking — 2x price

$20.00$100.00Details
gpt-6-astra-fast-xhigh

GPT-6 Astra on priority serving with extra-high thinking — 2x price

$20.00$100.00Details
gpt-6-astra-high

GPT-6 Astra with high thinking — deeper reasoning for hard problems

$10.00$50.00Details
gpt-6-astra-low

GPT-6 Astra with low thinking — quicker replies, same price

$10.00$50.00Details
gpt-6-astra-xhigh

GPT-6 Astra with extra-high thinking — deepest reasoning, slowest

$10.00$50.00Details
gpt-6-luna

Low-cost GPT-6 model from OpenAI

$0.10$0.50Details
gpt-6-luna-high

GPT-6 Luna with high thinking — deeper reasoning

$0.10$0.50Details
gpt-6-luna-low

GPT-6 Luna with low thinking — fastest replies, lowest cost

$0.10$0.50Details
gpt-6-luna-xhigh

GPT-6 Luna with extra-high thinking — deepest reasoning

$0.10$0.50Details
gpt-6-sol

OpenAI's mid-tier GPT-6 model — strong reasoning at a lower price, balanced thinking

$2.00$10.00Details
gpt-6-sol-fast

GPT-6 Sol on priority serving for faster replies — 2x price, balanced thinking

$4.00$20.00Details
gpt-6-sol-fast-high

GPT-6 Sol on priority serving with high thinking — 2x price

$4.00$20.00Details
gpt-6-sol-fast-low

GPT-6 Sol on priority serving with low thinking — 2x price

$4.00$20.00Details
gpt-6-sol-fast-xhigh

GPT-6 Sol on priority serving with extra-high thinking — 2x price

$4.00$20.00Details
gpt-6-sol-high

GPT-6 Sol with high thinking — deeper reasoning for hard problems

$2.00$10.00Details
gpt-6-sol-low

GPT-6 Sol with low thinking — quicker replies, same price

$2.00$10.00Details
gpt-6-sol-xhigh

GPT-6 Sol with extra-high thinking — very deep reasoning

$2.00$10.00Details
gpt-6.1-sol

Near-Astra performance for complex coding and professional work — balanced thinking

$2.00$10.00Details
gpt-6.1-sol-fast

GPT-6.1 Sol on priority serving for faster replies — 2x price, balanced thinking

$4.00$20.00Details
gpt-6.1-sol-fast-high

GPT-6.1 Sol on priority serving with high thinking — 2x price

$4.00$20.00Details
gpt-6.1-sol-fast-low

GPT-6.1 Sol on priority serving with low thinking — 2x price

$4.00$20.00Details
gpt-6.1-sol-fast-xhigh

GPT-6.1 Sol on priority serving with extra-high thinking — 2x price

$4.00$20.00Details
gpt-6.1-sol-high

GPT-6.1 Sol with high thinking — deeper reasoning for hard problems

$2.00$10.00Details
gpt-6.1-sol-low

GPT-6.1 Sol with low thinking — quicker replies, same price

$2.00$10.00Details
gpt-6.1-sol-xhigh

GPT-6.1 Sol with extra-high thinking — very deep reasoning

$2.00$10.00Details

Live market prices in your display currency. Full details, cache rates and variants on each model page and the Models & Pricing page.