OpenAI-compatible · runs on the edge

Every model, one endpoint — at the edge.

opexai is an OpenAI-compatible gateway to Cloudflare's model catalog. Point any SDK at /api/v1, use a single key, and pay per token — chat, vision, embeddings, and speech-to-text, served close to your users instead of through a single-region proxy.

Get a key See pricing Free daily allowance · no card to start
request · /api/v1/chat/completions
curl https://ai.opexcg.com/api/v1/chat/completions \
  -H "Authorization: Bearer opex_…" \
  -d '{
    "model": "llama-3.3-70b",
    "messages": [...]
  }'
model llama-3.3-70b tokens (in + out) 2,418 effective rate $0.32 / 1M in
this request $0.0008
How it works

Drop-in in three minutes.

If your client speaks OpenAI, it already works. Change the base URL, add a key, pick a model — that's the whole integration.

1

Point the SDK

Any OpenAI client works unchanged. Swap the base URL and drop in an opexai key.

base_url = "https://ai.opexcg.com/api/v1"
api_key  = "opex_…"
2

Pick any model

One key unlocks the whole catalog — chat, reasoning, vision, embeddings, transcription. Switch by changing one string.

POST /api/v1/chat/completions
POST /api/v1/embeddings
POST /api/v1/audio/transcriptions
3

Pay per token

Billed per million tokens at the rate you see here. Prepaid credits when you're small, monthly invoice when you're not.

cost = tokens × rate / 1M
Why opexai

A gateway, not a detour.

Standards-first by design. Bring any OpenAI SDK, leave any time. The value is the edge network, the breadth, and the metering underneath.

OpenAI-compatible

Same shapes, same paths. The Python and JS SDKs work with a new base URL — no wrappers, no rewrites.

Served at the edge

Inference runs on Cloudflare's network, close to your users — not pinned to a single region behind a proxy.

More than chat

One key, one endpoint for text, vision, embeddings, and speech-to-text. The license-acceptance step for gated models is handled for you.

Billed per key

Issue as many keys as you like. Usage is metered per key with live balances — prepaid credits or monthly invoice.

Pricing

Pricing, plain.

Per-million-token rates, input and output priced separately. The number listed is the number charged — loaded live from the gateway.

Model Input / 1M Output / 1M Context
Rates in USD per 1,000,000 tokens. Effective price after gateway fees. Free daily allowance · then prepaid credits or invoice

Ship in an afternoon.
Not a quarter.

Generate a key, change your base URL, and you're routing to every model on the catalog — from the edge. Free daily allowance to get started, no card required.

Open the console