API reference · Jobs

Jobs

Retrieve a job, list your jobs and cancel a queued one. Every product returns the same job object.

GET https://api.framera.ai/v1/jobs/:id
GET https://api.framera.ai/v1/jobs
POST https://api.framera.ai/v1/jobs/:id/cancel

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.

idstring
A UUID.
objectstring
Always job.
typeenum
video, avatar, ugc, image, tool, audio or swap.
statusenum
queued, running, succeeded, failed or cancelled.
modelstring
The model that makes it.
…settingsvarious
The settings it was made with, such as prompt, durationSeconds, resolution, aspectRatio; plus operation for tools and audio, script for UGC ads, and transcript, translation and sourceLanguage for translations.
priceobject
{ amount, currency }. Held when the job starts, charged when it succeeds, returned to your balance if it fails or is cancelled.
outputsarray
{ type, url, expiresAt } for each finished file. Links last an hour; retrieve the job again for fresh ones.
errorobject | null
{ code, message } for a failed or cancelled job: generation_failed, content_refused, invalid_input or cancelled.
metadataobject
Your own values from the create call.
createdAtstring
When it was created.
completedAtstring | null
When it finished.

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.

limitinteger
1 to 100. Default 20.
starting_afterstring
A job id: returns the jobs after it. Pass the last id of one page to get the next.
typeenum
Only jobs of one type, such as video.
statusenum
Only jobs with one status, such as 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

StatusCodeWhen
400invalid_requestA field is missing, wrong or out of range. The message says which; details.issues lists the fields.
401unauthorizedThe key is missing, wrong or revoked.
403permission_deniedThe 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.
404not_foundNo such object on your account.
409job_not_cancellableCancel was asked for a job that is no longer queued.
429rate_limitedToo many requests. Retry after Retry-After seconds.
500 or 503server_errorSomething went wrong on our side, or a service is briefly unavailable. Any hold is released at once.