SDK 및 도구

TypeScript, Python 또는 터미널에서 Arteza로 빌드하세요

TypeScript 및 Python용 공식 클라이언트, 터미널과 스크립트용 명령줄, 그리고 코딩 에이전트에게 미디어를 올바르게 생성하는 방법을 가르치는 스킬. 모두 가볍고 종속성이 없으며 arteza.ai에서 직접 제공됩니다.

한 줄로 모든 것을 설치하세요

arteza 명령과 Claude Code 스킬을 설치합니다. Python SDK를 추가하려면 ARTEZA_PYTHON=1을 설정하세요.

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

API 키가 필요합니다. 콘솔에서 하나를 만든 후 arteza login을 실행하거나 ARTEZA_API_KEY를 설정하세요. 콘솔 열기

TypeScript 및 JavaScript

Node 18+, Bun, Deno 및 엣지 런타임용 타입 클라이언트. ESM 및 CommonJS, 타입 선언 포함.

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

표준 라이브러리만 사용, Python 3.8 이상. 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 및 Go

휴대폰, 데스크톱 및 서버용 네이티브 SDK입니다. 각각은 종속성 없는 하나의 파일이며, arteza.ai에서 버전이 지정된 패키지와 함께 제공되며, TypeScript 및 Python SDK와 동일한 기능을 합니다: Idempotency-Key로 재시도하고, 결과 대기, 실시간 상태, 업로드, 클라이언트 토큰 및 입력된 오류입니다. 앱에서는 API 키가 아닌 자신의 서버의 클라이언트 토큰으로 요청에 서명합니다.

Swift

async/await를 포함한 iOS, iPadOS, macOS, tvOS 및 watchOS 앱용입니다. 파일을 대상에 추가하거나 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

Android 및 모든 JVM 프로젝트용입니다. 플랫폼의 자체 HTTP 클라이언트와 기본 제공 JSON 코덱을 사용하므로 종속성에 아무것도 추가하지 않습니다. 호출은 차단되므로 메인 스레드 외부에서 실행합니다.

# 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

iOS, Android 및 데스크톱의 Flutter 앱, 및 서버의 Dart용입니다. 실시간 상태는 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

Go 서비스용입니다. arteza.ai에서 go get으로 직접 설치되며 표준 라이브러리만 사용하고, 웹훅 확인 및 앱용 클라이언트 토큰을 포함합니다.

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})

명령줄

터미널 또는 스크립트에서 생성, 가격 책정, 업로드 및 기록 관리. 로컬 파일은 자동으로 업로드되고 출력물은 다운로드되며 --json을 사용하면 모든 명령이 기계가 읽을 수 있는 형식이 됩니다.

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

코딩 에이전트용 스킬

Claude Code, Cursor, Codex에게 모델을 선택하고 생성 비용을 계산한 후 실행하고 오류를 처리하는 방법을 가르칩니다. 스킬은 에이전트가 모델 ID를 추측하는 대신 라이브 카탈로그를 참조하도록 합니다.

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

Claude, ChatGPT 또는 Cursor 채팅에서 코드 대신 작업 중이신가요? MCP 서버를 연결하고 평문으로 질문하세요. MCP 서버 연결

SDK가 처리해주는 것들

  • 속도 제한, 시간 초과 및 서버 오류 시 재시도, Retry-After를 준수하는 백오프.
  • 모든 생성 작업마다 멱등성 키를 제공하여 재시도 요청이 두 번 청구되지 않도록 합니다.
  • run()은 생성을 시작하고 대기하며 각 상태 변화를 보고합니다.
  • 바이트 또는 파일 경로에서 업로드하여 모든 모델 입력이 허용하는 URL을 반환합니다.
  • 상태, 오류 코드, 매개변수 및 요청 ID를 포함하는 타입 오류.
  • 한 번의 호출로 웹훅 서명 검증, 재생 윈도우 포함.
  • 전체 기록을 페이징하는 반복자.
  • 계정의 모든 작업을 위한 하나의 실시간 연결, GET /v1/events. 중단 후 중단한 위치에서 재개합니다.

다운로드

파일버전크기
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

파일은 Arteza 저장소의 소스에서 재현 가능하게 빌드되므로 이 체크섬은 코드가 변경될 때만 변경됩니다. 전체 목록은 manifest.json에 있습니다. manifest.json

에이전트 및 도구용