Platform
ScaiWave ScaiGrid ScaiCore ScaiBot ScaiDrive ScaiKey Models Tools & Services
Solutions
Organisations Developers Internet Service Providers Managed Service Providers AI-in-a-Box
Resources
Support Documentation Blog Downloads
Company
About Research Careers Investment Opportunities Contact
Log in

SDKs

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

Language Package Install
Python scailabs-scaigrid pip install scailabs-scaigrid
TypeScript / JavaScript @scailabs/scaigrid npm install @scailabs/scaigrid
.NET ScaiLabs.ScaiGrid dotnet add package ScaiLabs.ScaiGrid

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

  • Single top-level clientScaiGrid (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, 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, grouped under ScaiGrid. Each artifact includes its SHA-256 checksum on the download card for verification.

Authentication, briefly#

python
1
2
3
# Python
from scaigrid import ScaiGrid
client = ScaiGrid(api_key="sgk_...")
ts
1
2
3
// TypeScript
import { ScaiGrid } from "@scailabs/scaigrid";
const client = new ScaiGrid({ apiKey: "sgk_..." });
csharp
1
2
// .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
1
2
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#

Updated 2026-06-15 13:16:09 View source (.md) rev 2