Getting Started
Install the Zaby SDK and make your first API call. Provisioning a deployment takes roughly 12 minutes.Switch between Python and TypeScript code examples using the language tabs.
Reference
Full API reference for all clients.
Configuration
Timeouts, retries, auth providers.
Prerequisites
- Python 3.10 or later, or Node 20+
- A Zaby account with an API key (
zaby_pk_...)
Install
- Python
- TypeScript
Create a client
1
Create an API key
Generate an API key in the Zaby dashboard. Keys start with
zaby_pk_.2
Initialize the client
- Python
- TypeScript
3
Verify the connection
- Python
- TypeScript
No authentication is required for health checks.
Create an agent
- Python
- TypeScript
Agent identifier
Always
“DRAFT” initially- Python
- TypeScript
Publish and deploy
1
Publish
Creates a version snapshot of the agent.
- Python
- TypeScript
2
Deploy
Use
"TEST" environment. Deployments take ~12 minutes to become active.- Python
- TypeScript
The deployment returns immediately with status
PENDING. Cloudflare provisioning runs in the background and transitions to ACTIVE after roughly 12 minutes. Calling getProvisioning() before it’s ACTIVE returns 404.3
Create an external app and bind deployment
The external app represents your application. Binding requires
allowServerRuntime: true for server-side access (needed for ZabyRuntime).- Python
- TypeScript
4
Create a quota policy
A quota policy is required before generating runtime tokens. Without it, token creation fails with a 500 error.
- Python
- TypeScript
5
Generate a runtime token
Pass
quotaPolicyId — the token will be rejected without it.- Python
- TypeScript
Next steps
Configuration Guide
Timeouts, retries, auth providers, and environment setup.
Agents Client
Full agent lifecycle reference.
Runtime Client
Start runs and stream agent responses.
Error Handling
Error types, status codes, and retry strategies.

