---
title: LLM API — OpenAI Compatible | RunAPI
description: Access RunAPI language models through one OpenAI-compatible API endpoint.
url: https://runapi.ai/llm.md
canonical: https://runapi.ai/llm
locale: en
site: RunAPI
image: https://runapi.ai/assets/opengraph-f702f2b1.png
alternates:
  en: https://runapi.ai/llm
  zh-CN: https://runapi.ai/zh-CN/llm
  es: https://runapi.ai/es/llm
  ja: https://runapi.ai/ja/llm
  de: https://runapi.ai/de/llm
  fr: https://runapi.ai/fr/llm
  pt-BR: https://runapi.ai/pt-BR/llm
  ko: https://runapi.ai/ko/llm
  it: https://runapi.ai/it/llm
  nl: https://runapi.ai/nl/llm
  pl: https://runapi.ai/pl/llm
  tr: https://runapi.ai/tr/llm
  zh-TW: https://runapi.ai/zh-TW/llm
  zh-HK: https://runapi.ai/zh-HK/llm
  ar: https://runapi.ai/ar/llm
  x-default: https://runapi.ai/llm
---

> HTML version: https://runapi.ai/llm
> Site index for agents: https://runapi.ai/llms.txt

<!-- llm-api-slot: api-hero-metrics owner=API-1983 state=ready -->

# LLM API — OpenAI Compatible

Access [Claude](https://runapi.ai/models/claude.md), GPT, [Gemini](https://runapi.ai/models/gemini.md), [DeepSeek](https://runapi.ai/models/deepseek.md), and Grok through one OpenAI-compatible endpoint. /v1/chat/completions, /v1/messages, /v1/responses.

[Get API Key](https://runapi.ai/login) [Browse Models](https://runapi.ai/models.md)

67 models · drop-in base_url swap · pay per token

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


<!-- llm-api-slot: llm-playground owner=API-1987 state=dependency_pending -->


<!-- llm-api-slot: multi-model-comparison owner=API-1984 state=ready -->

## Multi-Model Comparison

Prompt: `Explain quantum computing in one sentence`

| Model | Provider | Price |
| --- | --- | --- |
| Claude/claude-fable-5 (`/v1/messages`) | Anthropic | Input $10.00 / 1M tokens \| Output $50.00 / 1M tokens |
| Claude/claude-fable-5-1 (`/v1/messages`) | Anthropic | Input $10.00 / 1M tokens \| Output $50.00 / 1M tokens |
| Claude/claude-haiku-4-5-20251001 (`/v1/messages`) | Anthropic | Input $0.60 / 1M tokens \| Output $3.00 / 1M tokens |


<!-- llm-api-slot: endpoint-shape-cards owner=API-1985 state=ready -->

## 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.


<!-- llm-api-slot: model-pricing-list owner=API-1986 state=ready -->
## LLMs on one key

| Model | Provider | Price |
| --- | --- | --- |
| 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](https://runapi.ai/models.md)


<!-- llm-api-slot: quickstart-code-panel owner=API-1988 state=ready -->
## Quickstart

### Call any model with the OpenAI shape

#### curl

```bash
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."}]}'
```

#### Response

```json
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "deepseek-v4-flash",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 8,
    "total_tokens": 20
  }
}
```


<!-- llm-api-slot: four-step-flow owner=API-1989 state=ready -->
## Four Steps to Your First Generation

**How it works**

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.


<!-- llm-api-slot: benefit-cards owner=API-1990 state=ready -->

## 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.



<!-- llm-api-slot: related-api-cards owner=API-1991 state=ready -->

### Explore

## More AI APIs

- [Video API](https://runapi.ai/models.md?modality=video) - Generate, edit, and upscale video with 80 models [Learn more](https://runapi.ai/models.md?modality=video)
- [Image API](https://runapi.ai/models.md?modality=image) - Create and transform images with 49 models [Learn more](https://runapi.ai/models.md?modality=image)
- [Music API](https://runapi.ai/models.md?modality=audio_music) - Compose original tracks with AI [Learn more](https://runapi.ai/models.md?modality=audio_music)
- [Audio API](https://runapi.ai/models.md?modality=audio_music) - Text-to-speech with 31 models [Learn more](https://runapi.ai/models.md?modality=audio_music)


<!-- llm-api-slot: team-use-case-cards owner=API-1992 state=ready -->

## 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.



<!-- llm-api-slot: comparison-matrix owner=API-1993 state=ready -->

## 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-slot: faq-accordion owner=API-1994 state=ready -->

## 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.



<!-- llm-api-slot: final-cta owner=API-1995 state=ready -->
## Swap two lines, keep your code

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

- [Get API Key](https://runapi.ai/login)
- [Read the Docs](https://runapi.ai/docs/guides)




---

## More from RunAPI

- [Home](https://runapi.ai/.md)
### Product
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models#all-models)
### Developers
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
### Guides
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
### Company
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
### Legal
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  }
]
```
