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

# SDKs

> Official Runcrate SDKs for Python, TypeScript, and Vercel AI SDK

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 />

Runcrate provides three official SDKs covering different use cases.

<CardGroup cols={3}>
  <Card title="Python SDK" icon="brand-python" href="/sdks/python">
    `pip install runcrate-sdk` — sync + async, Pydantic models, auto-retry
  </Card>

  <Card title="TypeScript SDK" icon="brand-javascript" href="/sdks/typescript">
    `npm install @runcrate/sdk` — zero deps, native fetch, ESM + CJS
  </Card>

  <Card title="Vercel AI SDK" icon="wand" href="/sdks/vercel-ai">
    `npm install @runcrate/ai` — generateText, streamText, generateImage
  </Card>
</CardGroup>

## Which SDK Should I Use?

| SDK               | Package             | Best For                                                          |
| ----------------- | ------------------- | ----------------------------------------------------------------- |
| **Python**        | `runcrate-sdk`      | Python apps — inference + infrastructure management               |
| **TypeScript**    | `@runcrate/sdk`     | Node.js/Bun apps — full platform access in one client             |
| **Vercel AI SDK** | `@runcrate/ai`      | Next.js/React apps using `useChat`, `streamText`, `generateImage` |
| **OpenAI SDK**    | `openai` / `openai` | Drop-in — just change the base URL to `api.runcrate.ai/v1`        |

## Quick Comparison

| Feature           | Python                        | TypeScript                   | Vercel AI SDK                 |
| ----------------- | ----------------------------- | ---------------------------- | ----------------------------- |
| Package           | `runcrate-sdk`                | `@runcrate/sdk`              | `@runcrate/ai`                |
| Install           | `pip install runcrate-sdk`    | `npm install @runcrate/sdk`  | `npm install @runcrate/ai ai` |
| Async support     | Sync + Async clients          | Async (native Promises)      | Async (native Promises)       |
| Runtime           | Python 3.9+                   | Node.js 18+                  | Node.js 18+                   |
| Model inference   | Yes                           | Yes                          | Yes                           |
| GPU instances     | Yes                           | Yes                          | No                            |
| Storage           | Yes                           | Yes                          | No                            |
| Billing           | Yes                           | Yes                          | No                            |
| Streaming         | Iterator / AsyncIterator      | AsyncGenerator               | AI SDK `streamText`           |
| Structured output | —                             | —                            | AI SDK `Output.object`        |
| Image generation  | Yes                           | Yes                          | AI SDK `generateImage`        |
| Embeddings        | —                             | —                            | AI SDK `embed`                |
| Auto-retry        | Exponential backoff + jitter  | Exponential backoff + jitter | Via AI SDK                    |
| Type safety       | Pydantic models + mypy strict | Full TypeScript types        | Full TypeScript types         |

## Authentication

All SDKs use the same API key format. Generate one from your [Dashboard](https://runcrate.ai/dashboard/api-keys).

```
rc_live_YOUR_API_KEY
```

Pass it directly or set the `RUNCRATE_API_KEY` environment variable.
