Jobs
Retrieve a job, list your jobs and cancel a queued one. Every product returns the same job object.
The job object
Films, avatars, UGC ads, images, tools, audio and swaps all return a job. A job moves from queued to running to one of succeeded, failed or cancelled.
job.video, avatar, ugc, image, tool, audio or swap.queued, running, succeeded, failed or cancelled.prompt, durationSeconds, resolution, aspectRatio; plus operation for tools and audio, script for UGC ads, and transcript, translation and sourceLanguage for translations.{ amount, currency }. Held when the job starts, charged when it succeeds, returned to your balance if it fails or is cancelled.{ type, url, expiresAt } for each finished file. Links last an hour; retrieve the job again for fresh ones.{ code, message } for a failed or cancelled job: generation_failed, content_refused, invalid_input or cancelled.Retrieve a job
GET /v1/jobs/:id returns the job with its current status, and fresh output links once it has succeeded. The SDKs' jobs.wait(id) calls this until the job finishes; for apps, a webhook saves the polling.
List jobs
GET /v1/jobs returns the jobs you started through the API, newest first, as { object: "list", data: [job, …], hasMore }. Jobs made on framera.ai are not listed. See Pagination; the SDKs page through for you.
video.failed.Cancel a job
POST /v1/jobs/:id/cancel cancels a job that is still queued. It returns the job with status: "cancelled", its hold goes back to your balance at once, and a job.cancelled event is sent. A job that is already running or finished answers 409 job_not_cancellable.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field is missing, wrong or out of range. The message says which; details.issues lists the fields. |
| 401 | unauthorized | The key is missing, wrong or revoked. |
| 403 | permission_denied | The key lacks the permission, a monthly limit would be passed, or the address is not allowed. details.reason says which: key_permission, key_monthly_limit, monthly_limit or ip_not_allowed. |
| 404 | not_found | No such object on your account. |
| 409 | job_not_cancellable | Cancel was asked for a job that is no longer queued. |
| 429 | rate_limited | Too many requests. Retry after Retry-After seconds. |
| 500 or 503 | server_error | Something went wrong on our side, or a service is briefly unavailable. Any hold is released at once. |