SDK
Clients for TypeScript and Python.
Official clients for TypeScript and Python: typed models, tasks, chat and webhook checks, with retries built in. Node 20+, Bun, Deno, Workers, and Python 3.9+ (sync and async).
npm install tovano
pip install tovano
The npm and PyPI packages are being published. Until then, install from github.com/tovanoai/sdk.
import Tovano from "tovano"; const tovano = new Tovano({ apiKey: process.env.TOVANO_API_KEY }); const task = await tovano.tasks.create({ model: "image/demo-1", input: { prompt: "Blue ceramic mug, morning light", n: 4 }, customer: "client-0482", }); const done = await tovano.tasks.wait(task.id, { timeoutMs: 120_000 }); console.log(done.status, done.charged_micro); // "completed" 80000
What's inside
Everything the API does, typed.
| Method | What it does |
|---|---|
models.list() | Every model with its type, unit and price |
tasks.create() | Run any image, video, audio or agent model |
tasks.wait(id) | Poll until a task completes or fails, with a timeout |
chat.completions.create() | Text models, with streaming |
balance() | Your balance in micro-dollars |
webhooks.verify() | Check the Tovano-Signature header of a webhook |
OpenAI-compatible
Already use an OpenAI client? Keep it.
Text models accept the standard chat completions request, including streaming. Change the base URL and the key.
const client = new OpenAI({
baseURL: "https://api.tovano.ai/v1",
apiKey: process.env.TOVANO_API_KEY,
});Coming next
On the roadmap
- Go client
- MCP server, so coding agents can call any model
- Batch tasks for large jobs, run off-peak
Want one sooner? Tell us.