SDKs and tools

Build with Arteza from TypeScript, Python or your terminal

Official clients for TypeScript and Python, a command line for your terminal and scripts, and skills that teach coding agents to generate media correctly. Each one is small, has no dependencies, and is served straight from arteza.ai.

Install everything in one line

Installs the arteza command and the Claude Code skill. Set ARTEZA_PYTHON=1 to add the Python SDK.

curl -fsSL https://arteza.ai/sdk/install.sh | sh
arteza login

You need an API key. Create one in the console, then run arteza login or set ARTEZA_API_KEY. Open the console

TypeScript and JavaScript

Typed client for Node 18+, Bun, Deno and edge runtimes. ESM and CommonJS, with type declarations.

npm install https://arteza.ai/sdk/arteza.tgz
import { Arteza } from "arteza";

const arteza = new Arteza(); // reads ARTEZA_API_KEY

const gen = await arteza.run("seedance-2", {
  prompt: "a koi pond at dawn, slow dolly in",
  duration: 5,
});
console.log(gen.output?.files[0].url, gen.billing);

Python

Standard library only, Python 3.8 and later. Includes the same command line as python -m arteza.

pip install https://arteza.ai/sdk/arteza-0.5.0-py3-none-any.whl
from arteza import Arteza

arteza = Arteza()  # reads ARTEZA_API_KEY
gen = arteza.run("seedance-2", {"prompt": "a koi pond at dawn", "duration": 5})
print(gen["output"]["files"][0]["url"], gen["billing"])

est = arteza.estimate("seedance-2", {"prompt": "...", "duration": 5})
print(est["price"]["credits"]["amount"], est["affordable"])

Swift, Kotlin, Dart and Go

Native SDKs for phones, desktops and servers. Each is one file with no dependencies, served from arteza.ai with a versioned package beside it, and does what the TypeScript and Python SDKs do: retries with an Idempotency-Key, waiting for results, live status, uploads, client tokens and typed errors. In an app, sign requests with a client token from your own server, never the API key.

Swift

For iOS, iPadOS, macOS, tvOS and watchOS apps, with async/await. Add the file to your target, or add the package locally in Xcode.

# Drop the one file into your Xcode target:
curl -fsSL https://arteza.ai/sdk/swift/Arteza.swift -o Arteza.swift
# or unzip the package and add it with File > Add Package Dependencies > Add Local:
curl -fsSLO https://arteza.ai/sdk/arteza-swift-0.5.0.zip
import Arteza

// In an app, use a short-lived client token from YOUR server (POST /v1/tokens), never the API key.
let arteza = try Arteza(apiKey: clientToken)
let gen = try await arteza.run("nano-banana-2", ["prompt": "a koi pond at dawn"])
print(gen.files.first?.url ?? "")

// Every job on the account, live, on one connection:
for try await update in arteza.generations.events() {
    print(update.id, update.status)
}

Kotlin

For Android and any JVM project. It uses the platform's own HTTP client and a built-in JSON codec, so it adds nothing to your dependencies. Calls block, so run them off the main thread.

# Drop the one file into your module (package ai.arteza):
curl -fsSL https://arteza.ai/sdk/kotlin/Arteza.kt -o app/src/main/kotlin/ai/arteza/Arteza.kt
import ai.arteza.Arteza

// In an app, use a short-lived client token from YOUR server (POST /v1/tokens), never the API key.
val arteza = Arteza(apiKey = clientToken)
val gen = withContext(Dispatchers.IO) {
    arteza.run("nano-banana-2", mapOf("prompt" to "a koi pond at dawn"))
}
println(gen.files.first().url)

Dart / Flutter

For Flutter apps on iOS, Android and desktop, and for Dart on the server. Live status arrives as a Dart Stream.

# Drop the one file into lib/:
curl -fsSL https://arteza.ai/sdk/dart/arteza.dart -o lib/arteza.dart
# or unzip the package next to your app and add  arteza: { path: ../arteza }
curl -fsSLO https://arteza.ai/sdk/arteza-dart-0.5.0.zip
import 'package:arteza/arteza.dart';

// In an app, use a short-lived client token from YOUR server (POST /v1/tokens), never the API key.
final arteza = Arteza(apiKey: clientToken);
final gen = await arteza.run('nano-banana-2', {'prompt': 'a koi pond at dawn'});
print(gen.files.first.url);

await for (final update in arteza.generations.events()) {
  print('${update.id} ${update.status}');
}

Go

For Go services. It installs with go get straight from arteza.ai and uses only the standard library, with webhook verification and client tokens for your apps.

go get arteza.ai/sdk/go@v0.5.0
import arteza "arteza.ai/sdk/go"

c, _ := arteza.New(arteza.Options{}) // reads ARTEZA_API_KEY
gen, err := c.Run(ctx, "seedance-2", arteza.JSON{"prompt": "a koi pond at dawn", "duration": 5})
if err != nil { log.Fatal(err) }
fmt.Println(gen.Files()[0].URL)

// Mint a client token for a phone app:
tok, _ := c.CreateToken(ctx, arteza.TokenParams{TTLSeconds: 900, User: userID})

Command line

Generate, price, upload and manage history from a terminal or a script. Local files are uploaded for you, outputs are downloaded, and --json makes every command machine-readable.

arteza models --category video
arteza model kling-3-pro
arteza run seedance-2 -p "a koi pond at dawn" duration=5 -o ./out
arteza run rmbg-birefnet image_url=@./photo.png
arteza run auto -p "a logo for a coffee shop" --task text-to-image --priority cost
arteza estimate veo-3 -p "a storm over the sea" duration=8
arteza list --json

Skills for coding agents

Teach Claude Code, Cursor and Codex how to choose a model, price a generation before spending, run it and handle errors. The skill points agents at the live catalogue instead of guessing model ids.

mkdir -p ~/.claude/skills/arteza
curl -fsSL https://arteza.ai/sdk/skills/arteza/SKILL.md -o ~/.claude/skills/arteza/SKILL.md

Working in Claude, ChatGPT or Cursor chat instead of code? Connect the MCP server and ask in plain words. Connect the MCP server

What the SDKs handle for you

  • Retries on rate limits, timeouts and server errors, with backoff that honours Retry-After.
  • An idempotency key on every generation, so a retried request is never charged twice.
  • run() starts a generation and waits for it, reporting each status change.
  • Uploads from bytes or a file path, returning a URL any model input accepts.
  • Typed errors that carry the status, error code, parameter and request id.
  • Webhook signature verification in one call, with a replay window.
  • Iterators that page through your whole history.
  • One live connection for every job on the account, GET /v1/events, that resumes where it left off after a drop.

Downloads

FileVersionSize
arteza-0.5.0.tgz0.5.029.8 KB
arteza-0.5.0-py3-none-any.whl0.5.014.2 KB
arteza-swift-0.5.0.zip0.5.08.1 KB
swift/Arteza.swift0.5.020.9 KB
arteza-kotlin-0.5.0.zip0.5.08.3 KB
kotlin/Arteza.kt0.5.020.9 KB
arteza-dart-0.5.0.zip0.5.07.1 KB
dart/arteza.dart0.5.015.8 KB
go/arteza.go0.5.018.6 KB
skills/arteza/SKILL.md0.5.05.6 KB
skills/arteza.mdc0.5.05.7 KB
skills/AGENTS.md0.5.05.4 KB
install.sh0.5.01.1 KB

Files are built reproducibly from the source in the Arteza repository, so these checksums change only when the code does. The full list is in manifest.json. manifest.json

For agents and tools