SDKs

Official TypeScript, Python, and CLI clients — the capability-first way to integrate.

Packages

@whizurai/sdk-js

TypeScript / JavaScript SDK. Use in Node.js, edge runtimes, and browser environments.

whizurai-sdk

Python SDK (PyPI: whizurai-sdk). Import as whizurai.

@whizurai/cli

CLI tool (whizzy). Script and automate capabilities from your terminal without writing code.

@whizurai/types

Shared TypeScript type models for capabilities, runs, artifacts, and triggers. Import in any TS/JS project for full type safety.

Installation

TypeScript / JavaScript

pnpm add @whizurai/sdk-js @whizurai/types

Python

pip install whizurai-sdk

CLI (global)

pnpm add -g @whizurai/cli

Running a Capability

All SDK clients are capability-first: call capabilities.run(), poll until done, then read the artifact.

TypeScript / JavaScript

import { WhizuraiClient } from '@whizurai/sdk-js'

const client = new WhizuraiClient({
  apiKey: process.env.WHIZURAI_API_KEY,
})

// Execute a capability — returns a Run
const run = await client.capabilities.run(
  'image:generate',
  { prompt: 'a red bicycle on a beach at sunset' },
)

// Wait for the outcome
const done = await client.runs.pollUntilDone(run.id)

// Read the artifact
const [artifact] = await client.artifacts.list({
  runId: done.id,
})
console.log(artifact.url)

Python

import os
from whizurai import WhizuraiClient

client = WhizuraiClient(
  api_key=os.environ["WHIZURAI_API_KEY"]
)

# Execute a capability — returns a Run
run = client.capabilities.run(
  "image:generate",
  {"prompt": "a red bicycle on a beach at sunset"},
)

# Wait for the outcome
done = client.runs.poll_until_done(run.id)

# Read the artifact
artifact = client.artifacts.list(run_id=done.id)[0]
print(artifact.url)

Triggers

Triggers let you fire a capability automatically when a platform event occurs — for example, upscaling every image artifact the moment it is created.

TypeScript / JavaScript

await client.triggers.create({
  event: 'artifact.created',
  capability: 'image:upscale',
  input: { scale: 2 },
})

Python

import os
from whizurai import WhizuraiClient

client = WhizuraiClient(
  api_key=os.environ["WHIZURAI_API_KEY"]
)

client.triggers.create(
  event="artifact.created",
  capability="image:upscale",
  input={"scale": 2},
)

Shared types with @whizurai/types

@whizurai/types exports every request/response model used by the platform — Capability, Run, Artifact, Trigger, and more. Both the JS SDK and any custom client code can import from this single source of truth so your types stay in lockstep with the platform.

Next Steps