Idempotency

Base URL https://arteza.ai/api/v1

OpenAPI 3.1 specification, for SDK generators and agents: /api/v1/openapi.json

Official SDKs for TypeScript and Python, a command line and agent skills: SDKs and CLI

Send an Idempotency-Key header when you create a generation. Repeating the request with the same key returns the original generation instead of starting and charging a second one. Reusing a key with a different body returns idempotency_conflict.

curl https://arteza.ai/api/v1/generations \
  -H "Authorization: Bearer $ARTEZA_API_KEY" \
  -H "Idempotency-Key: order-1042-render" \
  -H "Content-Type: application/json" \
  -d '{"model": "flux-2-max", "input": {"prompt": "a lighthouse at dusk"}}'

# The same request again, after a timeout: the first generation comes back
HTTP/1.1 200 OK
Idempotent-Replayed: true

Use a value that belongs to the action, such as an order id, and send it again on every retry after a timeout or a dropped connection. A replayed response carries the Idempotent-Replayed: true header. Keys belong to your account and are kept for 24 hours; after that the same key starts a new generation.