ScalixScalix Docs

SDKs

Official Python and TypeScript SDKs for Scalix Cloud

Overview

Scalix Cloud ships three official SDKs, all generated from or aligned with the platform's OpenAPI spec (237 operations across 31 service areas), so the full gateway surface is covered:

PackageLanguageWhat it's for
@scalix-world/sdkTypeScriptFull platform API — typed, tree-shakeable, one function per operation
scalix-sdkPythonFull platform API — typed client with sync + asyncio variants
@scalix-world/authTypeScriptEnd-user auth for your apps (signup, login, OAuth, MFA, sessions)

TypeScript SDK

bash
npm install @scalix-world/sdk

Every endpoint is an exported, fully-typed function — there is no client class to instantiate. The base URL defaults to https://api.scalix.world:

typescript
import { executeSql, getMe, invokeFunction } from "@scalix-world/sdk";
 
const opts = {
  headers: { Authorization: `Bearer ${process.env.SCALIX_API_KEY}` },
};
 
const { data: me } = await getMe(opts);
 
const { data: result, error } = await executeSql({
  ...opts,
  body: { query: "SELECT id, email FROM users WHERE active = true" },
});
 
const { data: output } = await invokeFunction({
  ...opts,
  path: { id: "process-order" },
  body: { order_id: "ord_123" },
});

Every call resolves to a { data, error, response } envelope — no exceptions by default. See the TypeScript SDK guide for storage, AI, vectors, KV, streaming, and error handling.

Python SDK

bash
pip install scalix-sdk

Create one AuthenticatedClient and pass it to operations, which are grouped by service under scalix_sdk.generated.api.<tag>:

python
import os
from scalix_sdk import AuthenticatedClient
from scalix_sdk.generated.api.database import execute_sql
from scalix_sdk.generated.models import SqlRequest, SqlResponse
 
client = AuthenticatedClient(
    base_url="https://api.scalix.world",
    token=os.environ["SCALIX_API_KEY"],
)
 
result = execute_sql.sync(
    client=client,
    body=SqlRequest(query="SELECT id, email FROM users WHERE active = true"),
)
if isinstance(result, SqlResponse):
    print(result.columns, result.row_count)

Each operation exposes sync, sync_detailed, asyncio, and asyncio_detailed callables. See the Python SDK guide for the full service walkthrough.

Auth SDK (TypeScript)

For client-side user authentication in your own apps:

bash
npm install @scalix-world/auth
typescript
import { ScalixAuthClient } from "@scalix-world/auth";
 
const auth = new ScalixAuthClient({ url: "https://api.scalix.world" });
const { user, session } = await auth.signUp("user@example.com", "secure-password");
const result = await auth.signInWithPassword("user@example.com", "secure-password");

See the Auth SDK guide for OAuth, magic links, OTP, MFA, and the httpOnly-cookie session mode.

Service coverage

Both platform SDKs expose the same 31 service areas, including:

Service areaRepresentative operations
AccountgetMe / get_me, usage summary
DatabaseexecuteSql, batchSql, schema introspection, NL-to-SQL
Functionslist, create, invoke, logs, invocations
Storagebuckets, putObject/getObject (raw bytes)
AIchat completions (streaming via SSE), embeddings, images, audio
Vectorscollections, batch upsert with metadata, filtered search
Key-ValuekvSet/kvGet/kvDel with TTL
Events & Cronpublish/subscribe, scheduled jobs
Rundeploy, scale, rollback long-running services
Domains, Search, Shield, VPC, WAF, …full gateway parity

Configuration

The platform SDKs take explicit configuration — base URL and API key are passed in code (see each guide). Get an API key from the console. The ~/.scalix/config.toml file and SCALIX_API_URL environment variable belong to the scalix-cloud CLI, not the SDKs.