Partner with us
API Gateway

One endpoint. Every model.

Swap one base URL and reach 300+ models from every major lab. Smart routing across upstream providers, automatic failover, per-token pricing, one bill.

gateway.py
from openai import OpenAI

# point your existing code at OpenLink —
# nothing else changes
client = OpenAI(
    base_url="https://api.openlink.ai/v1",
    api_key="OPENLINK_API_KEY",
)

resp = client.chat.completions.create(
    model="deepseek/deepseek-v3",  # or any of 300+
    messages=[{"role": "user",
               "content": "Hello!"}],
)
print(resp.choices[0].message.content)
2.1TTokens per month
300+Models available
50+Upstream providers
Why route through us

Three things you stop maintaining

01 — Integration

Unified, OpenAI-compatible

One base URL, one key, one SDK. No per-provider clients, no separate accounts, no separate invoices to reconcile.

02 — Reliability

Routing and failover

Requests go to the upstream provider with the best price and latency for that model. When one goes down, the next takes over mid-flight.

03 — Cost

Per-token, one bill

No subscriptions, no markup on idle time. Spend across every model lands on a single dashboard and a single invoice.

Get started

A one-line migration

curl
$ curl https://api.openlink.ai/v1/chat/completions \
    -H "Authorization: Bearer $OPENLINK_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"deepseek/deepseek-v3",
         "messages":[{"role":"user","content":"Hello!"}]}'

{"id":"cmpl-8f2a…","choices":[{"message":{"role":"assistant",…

Anything that speaks the OpenAI Chat Completions API works unchanged — the official SDKs, LangChain, LlamaIndex, Vercel AI SDK, or plain HTTP. Streaming, tool calls and structured outputs are all passed through.

Model catalog

Featured models

ModelModel IDTokens / weekLatencyWeekly growth
DeepSeek-V3 deepseek/deepseek-v3 42.1B610ms+14.2%
Qwen3 235B A22B qwen/qwen3-235b 28.7B540ms+9.8%
Kimi K2 moonshot/kimi-k2 19.3B720ms+21.4%

Three of 300+. Call GET /v1/models for the full catalog, or list it from the CLI.

Routing

You decide what wins

Policy 01

Optimise for price or latency

The same model is served by several upstream providers at different prices and speeds. Pick the axis that matters for the call — we handle the rest.

routing.py
resp = client.chat.completions.create(
    model="qwen/qwen3-235b",
    messages=messages,
    extra_body={"route": {
        "order": "latency",   # or "price"
        "fallback": True,
    }},
)
Policy 02

Fail over without dropping the request

If the selected provider times out, rate-limits or returns an error, the request is retried against the next candidate before your code ever sees a failure.

failover.log
14:02:41  route  qwen3-235b → provider-a
14:02:42  warn   provider-a 429 rate limited
14:02:42  route  retry  → provider-b
14:02:43  ok     1,284 tokens · 540ms · $0.0021

14:02:44  route  deepseek-v3 → provider-c
14:02:45  ok     3,910 tokens · 610ms · $0.0038
Policy 03

Watch the spend as it happens

Every request is metered per token and attributed to a model, a provider and a key. Query it from the dashboard, the API, or the CLI.

usage
$ openlink usage --period month --group-by model

MODEL                  TOKENS      REQUESTS   COST
deepseek/deepseek-v3   182.4M      41,208     $164.16
qwen/qwen3-235b        124.9M      33,570     $137.39
moonshot/kimi-k2        83.6M      19,044     $100.32
                       390.9M      93,822     $401.87
Capabilities

What the gateway handles

Streaming

Server-sent events pass straight through. Time-to-first-token is measured per provider and factored into latency routing.

Tool calling

Function and tool-call schemas are forwarded untouched for every model that supports them.

Structured output

JSON mode and schema-constrained responses work the same way they do against the provider directly.

Key scoping

Issue separate keys per environment or per team, each with its own spend cap and model allowlist.

Rate limits

Shared limits across upstream providers, so a single provider's quota does not become your ceiling.

No training on your data

Prompts and completions are not used to train any model. Requests are forwarded, metered, and dropped.

Pricing

Per token, nothing else

No subscription, no minimum, no markup on idle time

Running your own weights instead? Rent the GPUs directly — from $0.35/hr across 20,000+ cards.

GPU pricing
FAQ

Common questions

Do I have to rewrite my code?
No. The gateway implements the OpenAI Chat Completions API, so you change base_url and api_key and leave everything else alone. The official OpenAI SDKs, LangChain, LlamaIndex and the Vercel AI SDK all work unchanged.
How do I pick which provider serves a request?
By default we route on a blend of price, latency and recent reliability. To override it, pass route in extra_body with order set to price or latency. Setting fallback: false pins the request to a single provider.
What happens when a provider goes down mid-request?
A non-streaming request is retried against the next candidate before returning, so your code sees one successful response. Streaming requests fail over only before the first token is emitted — once bytes are on the wire we do not silently switch models on you.
Is my data used for training?
No. Prompts and completions are forwarded to the provider you selected, metered, and not retained for training. Each upstream provider handles the request under its own terms, which are listed alongside the model in the catalog.
Can I use the gateway and rent GPUs on the same account?
Yes — same key, same bill. The CLI and the Python SDK both cover compute and the gateway from one client.

Point your base URL at OpenLink

Get an API key and send the first request in under a minute.