API documentation

The first /api/v1 release uses Bearer tokens, durable PostgreSQL idempotency, and a stable error envelope.

v1

Authentication: Authorization: Bearer h3_live_….secret

Every write requires Idempotency-Key. Reusing a key for different input returns a conflict.

Reference images use request-and-confirm upload steps. External URLs and object keys are rejected.

Webhooks are optional notifications; task polling and result lookup always remain available.

Webhook v1 uses HMAC-SHA256 over v1.{eventId}.{timestamp}.{rawBody}.

Optional fields on POST /api/v1/tasks: aspectRatio (9:16 | 16:9), quality (standard, 480p class | high, 768p class | 2k, rendered by the backup route only when open, not with first_last_frame), mode (text_to_video | reference_to_video | first_last_frame; first_last_frame takes exactly two assetIds: first frame, last frame). Defaults are 9:16, high and the mode implied by the image count. durationSeconds is a whole number of seconds from 5 to 15; credits follow quality and length, rounded up: high 1 credit / s, standard 0.6 credit / s (high 10 / 15, standard 6 / 9.

POST /api/v1/assets/upload-request
POST /api/v1/assets/{assetId}/confirm
POST /api/v1/tasks
GET /api/v1/tasks/{taskId}
POST /api/v1/tasks/{taskId}/cancel
GET /api/v1/tasks/{taskId}/result
GET /api/v1/credits
GET /api/v1/usage
GET|POST|PATCH|DELETE /api/v1/webhook
{"error":{"code":"invalid_request","messageKey":"errors.invalidRequest","retryable":false,"traceId":"…"}}