Change how long an image file is kept

Set a new end for a successful job's file: the job's created_at plus retention_days. You can make the time shorter or longer, up to the plan maximum: 365 days on a paid plan, 30 on a free, pack-only, or trial account. The new end must be in the future. A later plan change keeps this choice, except that a smaller plan maximum still shortens it. A job without a live file, such as a queued, failed, deleted, or expired one, returns 404.

patch/v1/image/{id}

Request

  • Base URL: https://thirds.ai
  • URL: https://thirds.ai/v1/image/{id}
  • Auth: HTTP bearer

Request body

retention_daysinteger required

Days from the job's created_at. It can't be more than your plan maximum, and the end must be in the future.

Response

The job with its file's new end in artifact.expires_at.

referencestring

Your reference, preserved in the job, history, and webhook. Omitted when not supplied.

idstring required
status'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' required
created_atstring date-time required
finished_atstring date-time nullable required
credit'reserved' | 'settled' | 'released' | 'free' | 'none' required

What happened to the credit this job holds: "reserved" while it is queued or running, "settled" once it succeeded, "released" once it failed or was cancelled, "free" when it is the account's free first file and costs no credit, and "none" when the job was never billed.

Changes

No recorded changes to this operation across all 1 revision of this API.