Async jobs & file uploads

Anything slower than ~30 s runs as a job:

  1. POST /v1/jobs/<kind> → 202 {"id": "job_…", "status": "queued"}
  2. GET /v1/jobs/{id} → {"status": "queued|in_progress|completed|failed", "result": {"url": …, "expires_at": …}}
  3. Download the result from the presigned URL before it expires (24 h).

Poll with backoff (2 s → 10 s). Job kinds: images, videos, music, transcriptions.

Large inputs

Inline inputs (base64) are capped at 4 MB. Above that:

  1. POST /v1/files {filename, content_type, bytes} → {file_id, upload_url}
  2. HTTP PUT your bytes to upload_url.
  3. Reference "file_id" in the job request.

We never fetch URLs you supply — uploads only.