LLM API

LLM API — OpenAI Compatible

Access Claude, GPT, Gemini, DeepSeek, and Grok through one OpenAI-compatible endpoint. /v1/chat/completions, /v1/messages, /v1/responses.

67 models drop-in base_url swap pay per token

67
LLM models
15-25%
Below official
2 lines
To migrate

Playground

live
Model
Message
Refactor this handler to stream partial results and return a typed error on timeout.
Max tokens
integer | null
Temperature
number | null
Stream
false
Endpoint
/v1/chat/completions
Est. cost
$0.22 / 1M in $0.30 / 1M in $0.41 / 1M in $2.50 / 1M in
Examples

Multi-Model Comparison

Prompt Explain quantum computing in one sentence

Claude/claude-fable-5

Call Claude/claude-fable-5 through /v1/messages.
Keep the same RunAPI key and request shape while comparing outputs.

Anthropic Input $10.00 / 1M tokens | Output $50.00 / 1M tokens

Claude/claude-fable-5-1

Call Claude/claude-fable-5-1 through /v1/messages.
Keep the same RunAPI key and request shape while comparing outputs.

Anthropic Input $10.00 / 1M tokens | Output $50.00 / 1M tokens

Claude/claude-haiku-4-5-20251001

Call Claude/claude-haiku-4-5-20251001 through /v1/messages.
Keep the same RunAPI key and request shape while comparing outputs.

Anthropic Input $0.60 / 1M tokens | Output $3.00 / 1M tokens

4 endpoint shapes, one key

Chat completion

The OpenAI shape every SDK already speaks. Swap base_url and keep your existing request code.

Message

The Messages API shape for system prompts, tool use, and structured content blocks.

Response

The stateful shape for multi-turn agent loops with server-side conversation handling.

Embedding

Vector embeddings for retrieval, billed per token on the same RunAPI key.

LLMs on one key

Claude/claude-fable-5

Anthropic

$10.00 / 1M in

Claude/claude-fable-5-1

Anthropic

$10.00 / 1M in

Claude/claude-haiku-4-5-20251001

Anthropic

$0.60 / 1M in

Claude/claude-opus-4-1-20250805

Anthropic

$9.00 / 1M in

Claude/claude-opus-4-5-20251101

Anthropic

$3.00 / 1M in

Claude/claude-opus-4-6

Anthropic

$3.00 / 1M in

Claude/claude-opus-4-7

Anthropic

$3.00 / 1M in

Claude/claude-opus-4-8

Anthropic

$3.00 / 1M in

View all 67 LLM models
Quickstart

Call any model with the OpenAI shape

curl https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Explain the difference between concurrency and parallelism."}]}'
How it works

Four Steps to Your First Generation

  1. Get Your API Key

    Create one key for your RunAPI account.

  2. Use OpenAI Format

    Send requests through the documented OpenAI-compatible endpoint.

  3. We Route Smartly

    RunAPI selects a supported route for your request.

  4. Stream Responses

    Receive streamed output when the selected endpoint supports SSE.

Why Developers Choose RunAPI

One Key, All Models

Stop juggling API keys. One integration gives you access to 230+ models across all providers.

15-25% Cost Savings

Our volume agreements with providers mean lower prices than going direct. No markup on top.

Automatic Failover

If a provider goes down, we route to the next best option. Your app stays up.

OpenAI-Compatible

Drop-in replacement for OpenAI SDK. Change one line of code to access any model.

Real-Time Billing

Pay only for what you use. Per-request pricing with no minimums. Track costs per model, per project.

Data Privacy

Our Privacy Policy explains how request data and generated content are processed and retained.

What teams build with it

Coding Agents

Route planning to Opus and edits to a cheap model, on one key with one invoice.

RAG Pipelines

Embeddings and generation on the same endpoint, so retrieval and answering share a budget.

Content Generation

Fan out drafts across models and keep the best, without signing five provider contracts.

Multi-model Comparison

A/B the same prompt across Claude, GPT, and Gemini by changing one string.

RunAPI vs alternatives

Feature RunAPI OpenRouter Direct API
LLM models 66 300+ 1 provider
Other modalities Video, Image, Music, Audio No Per provider
Pricing 15-25% below official Market rate Official rate
Native Messages API Yes No Yes
Unified credits Yes Yes No
MCP server + CLI Yes No No

LLM API questions

How do I migrate from an OpenAI-compatible client?

Point the client at the documented RunAPI base URL and use your RunAPI key. Keep the request shape supported by the selected endpoint.

Is streaming supported?

Streaming is available when the selected model and endpoint expose a streaming response.

Do tool calls work?

Tool calling is available on models and endpoint shapes that declare tool support in their runtime contract.

How are tokens billed?

Input and output rates are listed in the model catalog. Usage is billed from the token counts reported for the request.

Which endpoint should I use?

Choose the endpoint shape that matches your existing client and the capabilities required by your request.

What if a route is unavailable?

The API returns the request status through its documented response contract so your application can retry or choose another supported model.

Swap two lines, keep your code

67 models behind the OpenAI shape you already ship. Start free, no credit card required.