> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Open-Source Alternative to Claude API

> Access Claude 4 Sonnet and 170+ other models through one API key. Same OpenAI-compatible code, just a different base URL. No vendor lock-in.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Use `anthropic/claude-4-sonnet` on Runcrate with the same OpenAI-compatible interface you already know. One API key gives you Claude plus 170+ other models — switch between them by changing a single string. No separate Anthropic account, no separate billing.

## Why use Claude through Runcrate

|                      | Direct Anthropic API     | Runcrate                                    |
| -------------------- | ------------------------ | ------------------------------------------- |
| **API format**       | Anthropic-specific SDK   | OpenAI-compatible (drop-in)                 |
| **Models available** | Claude only              | Claude + DeepSeek + Llama + Qwen + 170 more |
| **API keys**         | One per provider         | One key for everything                      |
| **Billing**          | Separate per provider    | Single credit balance                       |
| **Switching models** | Rewrite integration code | Change one string                           |

***

## Same code, different base URL

If you already use the OpenAI SDK, switching to Claude on Runcrate is a one-line change:

<CodeGroup>
  ```bash curl theme={"theme":"github-dark"}
  curl https://api.runcrate.ai/v1/chat/completions \
    -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "anthropic/claude-4-sonnet",
      "messages": [
        {"role": "user", "content": "Compare REST and GraphQL in three sentences."}
      ],
      "max_tokens": 256
    }'
  ```

  ```python Python theme={"theme":"github-dark"}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.runcrate.ai/v1",
      api_key="rc_live_YOUR_API_KEY",
  )

  response = client.chat.completions.create(
      model="anthropic/claude-4-sonnet",
      messages=[{"role": "user", "content": "Compare REST and GraphQL in three sentences."}],
      max_tokens=256,
  )
  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={"theme":"github-dark"}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://api.runcrate.ai/v1",
    apiKey: "rc_live_YOUR_API_KEY",
  });

  const response = await client.chat.completions.create({
    model: "anthropic/claude-4-sonnet",
    messages: [{ role: "user", content: "Compare REST and GraphQL in three sentences." }],
    max_tokens: 256,
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

***

## Switch models without changing code

The real advantage: swap `model` and the rest of your code stays identical.

```python theme={"theme":"github-dark"}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.runcrate.ai/v1",
    api_key="rc_live_YOUR_API_KEY",
)

models = [
    "anthropic/claude-4-sonnet",
    "deepseek-ai/DeepSeek-V4-Pro",
    "meta-llama/Llama-4-Scout-17B-16E-Instruct",
]

for model in models:
    response = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "What is the capital of France?"}],
        max_tokens=32,
    )
    print(f"{model}: {response.choices[0].message.content}")
```

***

## Next steps

* [Route between AI models](/examples/multi-model-routing) — use different models for different tasks in the same app.
* [Model catalog](/models/model-catalog) — see all 170+ models, pricing, and context windows.
* [SDKs overview](/sdks/overview) — Python, TypeScript, and Vercel AI SDK setup.
