---
title: SDKs
path: sdks
status: published
---

# Official SDKs

Three first-party SDKs cover the ScaiGrid API surface with identical
ergonomics — pick the one that matches your stack.

| Language | Package | Install |
|---|---|---|
| [Python](/docs/scaigrid/sdks/python) | `scailabs-scaigrid` | `pip install scailabs-scaigrid` |
| [TypeScript / JavaScript](/docs/scaigrid/sdks/typescript) | `@scailabs/scaigrid` | `npm install @scailabs/scaigrid` |
| [.NET](/docs/scaigrid/sdks/dotnet) | `ScaiLabs.ScaiGrid` | `dotnet add package ScaiLabs.ScaiGrid` |

All three are MIT-licensed and follow the same conceptual shape:

* **Single top-level client** — `ScaiGrid` (Python / TS) or
  `ScaiGridClient` (.NET) — constructed with one of three auth modes:
  static API key (`sgk_...`), bearer JWT, or OAuth `client_credentials`
  against ScaiKey.
* **Resources** mirror the `/v1/` surface:
  `client.models`, `client.inference`, `client.modules`, plus first-class
  module sub-clients (`client.scaibot`, `client.scaispeak`,
  `client.scaidial`) for the most common module routes. A generic
  `client.modules.proxy(...)` covers everything else.
* **First-class streaming** for chat completions — language-idiomatic
  (Python `Iterator` / `AsyncIterator`, TS `AsyncIterable`,
  .NET `IAsyncEnumerable<ChatChunk>`).
* **Typed errors** that mirror the server's `ScaiGridError.code`
  taxonomy 1-to-1, so a code in a server log maps directly to an SDK
  exception class.
* **Retries with backoff** on `429` and idempotent `5xx`, honouring
  `Retry-After`.

The SDK is the **recommended path** for any new integration. The raw
`/v1/` REST surface stays stable and documented under
[Reference](/docs/scaigrid/reference), but the SDK is what we test, ship
breaking-change-free, and dogfood ourselves.

## Source + license

All three SDKs are open-source under MIT. Builds for the current
release are available on [`/downloads`](https://www.scailabs.ai/downloads),
grouped under **ScaiGrid**. Each artifact includes its SHA-256 checksum
on the download card for verification.

## Authentication, briefly

```python
# Python
from scaigrid import ScaiGrid
client = ScaiGrid(api_key="sgk_...")
```

```ts
// TypeScript
import { ScaiGrid } from "@scailabs/scaigrid";
const client = new ScaiGrid({ apiKey: "sgk_..." });
```

```csharp
// .NET
using var client = ScaiGridClient.WithApiKey("sgk_...");
```

For agent-driven workloads, the `client_credentials` factory takes a
ScaiKey client ID / secret and handles token caching + refresh
automatically. See the per-language pages for details.

## OpenAI compatibility — when to use the OpenAI SDK instead

If your code already targets the OpenAI Python or Node SDK and you only
need chat completions or embeddings, you don't need this SDK — point
the OpenAI client at `https://scaigrid.scailabs.ai/oai/v1/`:

```python
from openai import OpenAI
client = OpenAI(api_key="sgk_...", base_url="https://scaigrid.scailabs.ai/oai/v1/")
```

The native `/v1/inference/*` surface (and this SDK) adds tenant-aware
accounting metadata, native streaming chunk shape, and multi-modality
dispatch that the OAI-compat layer can't expose.

## Versioning policy

SDK version tracks the server's API minor: `scailabs-scaigrid 1.5.x`
works against API `v1.5.*`. Patch bumps are SDK-only. Breaking
server changes always bump both. See the per-language page for the
specific compatibility matrix.

## See also

- [Authentication](/docs/scaigrid/getting-started/authentication) —
  how to obtain an API key.
- [Inference reference](/docs/scaigrid/reference/inference) — the
  underlying REST surface the SDK wraps.
- [Error codes reference](/docs/scaigrid/reference/error-codes) — the
  full `code` taxonomy the SDKs surface as typed exceptions.
