SDKs at tools
Bumuo gamit ang Arteza mula sa TypeScript, Python o ang iyong terminal
Official na clients para sa TypeScript at Python, isang command line para sa iyong terminal at scripts, at skills na nagtuturo sa coding agents kung paano bumuo ng media nang tama. Bawat isa ay maliit, walang dependencies, at direktang inihahain mula sa arteza.ai.
I-install lahat sa isang linya
Ini-install ang arteza command at ang Claude Code skill. I-set ang ARTEZA_PYTHON=1 upang idagdag ang Python SDK.
curl -fsSL https://arteza.ai/sdk/install.sh | sh
arteza loginKailangan mo ng API key. Lumikha ng isa sa console, pagkatapos tumakbo ng arteza login o i-set ang ARTEZA_API_KEY. Buksan ang console
TypeScript at JavaScript
Typed client para sa Node 18+, Bun, Deno at edge runtimes. ESM at CommonJS, may type declarations.
npm install https://arteza.ai/sdk/arteza.tgzimport { 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 lamang, Python 3.8 at mas bago. Kasama ang parehong command line tulad ng python -m arteza.
pip install https://arteza.ai/sdk/arteza-0.5.0-py3-none-any.whlfrom 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 at Go
Native SDK para sa mga telepono, desktop at mga server. Bawat isa ay isang file na walang dependencies, inilaan mula sa arteza.ai na may versioned package sa tabi nito, at gumagawa kung ano ang ginagawa ng TypeScript at Python SDK: mga pagsubok gamit ang Idempotency-Key, naghihintay ng mga resulta, live status, mga pag-upload, client token at na-type na mga error. Sa isang app, mag-sign ng mga request gamit ang isang client token mula sa iyong sariling server, hindi kailanman ang API key.
Swift
Para sa iOS, iPadOS, macOS, tvOS at watchOS app, na may async/await. Idagdag ang file sa iyong target, o idagdag ang package nang lokal sa 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.zipimport 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
Para sa Android at anumang JVM project. Gumagamit ito ng sariling HTTP client ng platform at isang built-in na JSON codec, kaya hindi ito nagdadagdag sa iyong dependencies. Ang mga tawag ay pumipigil, kaya patakbuhin ang mga ito sa labas ng pangunahing 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.ktimport 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
Para sa Flutter app sa iOS, Android at desktop, at para sa Dart sa server. Ang live status ay dumadating bilang isang 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.zipimport '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
Para sa Go na mga serbisyo. Nag-install ito gamit ang go get direkta mula sa arteza.ai at gumagamit lamang ng standard library, na may webhook verification at client token para sa iyong mga app.
go get arteza.ai/sdk/go@v0.5.0import 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
Bumuo, presyohan, mag-upload at pamahalaan ang history mula sa terminal o script. Ang mga lokal na file ay ina-upload para sa iyo, ang mga output ay dini-download, at --json ay ginagawang machine-readable ang bawat command.
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 --jsonSkills para sa coding agents
Turuan ang Claude Code, Cursor at Codex kung paano pumili ng model, presyohan ang isang generation bago gumastos, patakbuhin ito at harapin ang mga error. Ang skill ay tumuturo sa mga agents sa live catalogue sa halip na hulaan ang model ids.
mkdir -p ~/.claude/skills/arteza
curl -fsSL https://arteza.ai/sdk/skills/arteza/SKILL.md -o ~/.claude/skills/arteza/SKILL.mdGumagana ka sa Claude, ChatGPT o Cursor chat sa halip na code? I-connect ang MCP server at magtanong sa plain words. I-connect ang MCP server
Ang ginagawa ng SDKs para sa iyo
- Retries sa rate limits, timeouts at server errors, na may backoff na sumusunod sa Retry-After.
- Isang idempotency key sa bawat generation, kaya isang retried request ay hindi kailanman kinokobro ng dalawang beses.
- ang run() ay nagsisimula ng isang generation at naghihintay para dito, na nag-uulat ng bawat pagbabago ng status.
- Uploads mula sa bytes o file path, na nagbabalik ng URL na tinatanggap ng anumang model input.
- Typed errors na nagdadala ng status, error code, parameter at request id.
- Webhook signature verification sa isang call, na may replay window.
- Iterators na nag-page through ng iyong buong history.
- Isang live na koneksyon para sa bawat trabaho sa account, GET /v1/events, na muling nagsisimula kung saan ito tumigil pagkatapos ng pagbagsak.
Mga Download
| File | Bersyon | Laki | SHA-256 |
|---|---|---|---|
| arteza-0.5.0.tgz | 0.5.0 | 29.8 KB | ad1f89441e5f4010 |
| arteza-0.5.0-py3-none-any.whl | 0.5.0 | 14.2 KB | c7a732dd4cd308ce |
| arteza-swift-0.5.0.zip | 0.5.0 | 8.1 KB | 15ada6c76be72b22 |
| swift/Arteza.swift | 0.5.0 | 20.9 KB | c37cd6d7f2967818 |
| arteza-kotlin-0.5.0.zip | 0.5.0 | 8.3 KB | e87a2d1e3e1f0db8 |
| kotlin/Arteza.kt | 0.5.0 | 20.9 KB | 58d12926d4a6ae93 |
| arteza-dart-0.5.0.zip | 0.5.0 | 7.1 KB | b8d28fb512e6e37d |
| dart/arteza.dart | 0.5.0 | 15.8 KB | 39d15111ff5e0b39 |
| go/arteza.go | 0.5.0 | 18.6 KB | 2441b05239c339f8 |
| skills/arteza/SKILL.md | 0.5.0 | 5.6 KB | d0a8df4c9088309f |
| skills/arteza.mdc | 0.5.0 | 5.7 KB | cfa5b23432a7b416 |
| skills/AGENTS.md | 0.5.0 | 5.4 KB | ca0251e853f55a22 |
| install.sh | 0.5.0 | 1.1 KB | bb7a24d37381989a |
Ang mga file ay nabuo nang reproducible mula sa source sa Arteza repository, kaya ang mga checksums na ito ay nagbabago lamang kapag nagbago ang code. Ang buong listahan ay nasa manifest.json. manifest.json
Para sa agents at tools
- /api/v1/docs.md Ang buong API reference bilang isang Markdown file
- /api/v1/openapi.json OpenAPI 3.1 na dokumento, para sa paglikha ng iyong sariling client
- /api/v1/prices.csv Presyo ng bawat modelo bilang CSV