Retention and destruction
What the platform caps are, how far down you can dial them, what shortening a setting does to content you already have, how to destroy a task's content, and what we cannot promise.
Retention has two layers. The platform cap is a public commitment, not an internal tuning knob. Inside that cap, you can set your own, shorter periods — and you can destroy one task's content whenever you want.
The relationship between the two layers is one sentence: you can only go shorter; nothing you set ever makes the cap longer.
How long we keep things (platform caps)
| Data | Platform cap | At expiry |
|---|---|---|
| Generated artefacts (image / video / audio) | About 14 days | Deleted from object storage |
| Short-film media (scene pictures, videos and voices made in a Spicy Studio short-film project, and the films exported from it) | About 60 days | Deleted from object storage |
| Reference images you upload | 1 day | The spicy:// URI expires at the commit response's expiresAt; the object is deleted after that |
Task content (prompts and parameters in input, artefact references in output) | 30 days | Both fields are cleared; the task row itself is kept |
| Asset library (files you save on purpose) | Until you delete them | Deleted when you delete the asset or the owner closes the account; a team library is deleted together with its team. See Media |
| Task records (task ID, model, state, amount, timestamps — no content of any kind) | Kept indefinitely | Not deleted. It is the evidence behind a billing dispute |
| Task logs and events (state transitions, webhook delivery records) | At least 60 days (monthly partitions, so 2–3 months in practice) | Deleted |
| Balance and ledger records | 10 years | Kept for account history, reconciliation and disputes — see below |
| Audit records | 2 years | Pruned under policy after integrity verification |
| Plaintext IP / UA in security records | 90 days | Replaced with versioned HMAC pseudonyms; this is not anonymization |
| Database backups | 35 days | Rolled over; application erasure does not erase backups immediately |
You can shorten the first four rows with the four clocks below: generated results (media and the result payload), short-film media, prompt text, and uploaded files.
Short-film media gets the longer window because a film in Spicy Studio is built over days or weeks, and a scene made in the first week still has to exist when the whole film is exported. It applies only to tasks started inside a short-film project in the Studio; the same model called through the API, an SDK or the playground keeps the 14-day cap, and prompt text keeps its 30-day cap either way. The rest are platform obligations or statutory periods and do not move with your settings.
These numbers are server configuration, not hard-coded constants
The table lists the caps currently in force, which are also the defaults: set nothing and the behaviour is exactly what it was before. Operations can change them — jurisdictional requirements move — but any change is handled as a compliance change: this page and the actual deletion behaviour have to stay in step.
If you need a different retention period written into a contract, raise it before signing rather than assuming from this page.
Upload URI lifetime is not object-deletion completion
The spicy:// URI returned by upload commit can be used only until the response's expiresAt, which defaults to 1 day after a successful commit. At that point the URI immediately becomes invalid for new tasks. The underlying object is removed by our cleanup pass, and the outermost backstop can lag by up to 24 hours; that lag does not extend the URI's usable lifetime.
Why “about 14 days” and not “14 days exactly”
The outermost layer of expiry is an object-storage lifecycle rule, and the official behaviour is that objects are removed within 24 hours of expiry. Promising a whole number while actually deleting at 14 days plus up to one more would be a false statement on its face, so we say "about".
The same applies to the short periods you set yourself. Set one hour and cleanup normally completes within minutes — but we still write "about one hour" or "no later than", never an exact figure.
Download anything you need to keep. Once the window closes, no download link can be issued — though the task record remains queryable and balance movements remain visible in billing history.
Four clocks, set separately
They answer four different questions, not one question at four settings. The names below are the ones shown in the console:
| Clock | Covers | Default (= platform cap) | Options |
|---|---|---|---|
| Generated results | Generated images / video / audio and the result payload | About 14 days | 1 hour / 6 hours / 24 hours / 7 days / 14 days |
| Short-film media | Media made in a Spicy Studio short-film project, and the films exported from it | About 60 days | 1 hour / 24 hours / 7 days / 14 days / 30 days / 60 days |
| Prompt text | Request text: the prompt and text fields inside input | 30 days | Same as results / 1 hour / 24 hours / 7 days / 30 days |
| Uploaded files | Files you upload to use as references | 1 day | Delete when the job ends / 1 hour / 24 hours |
Set them under Retention on the console's Data protection page. When a task is accepted, it takes its own result and prompt expiry times from these settings (and from the header below); you can read them as retention in recordInfo.
"Delete when the job ends" means an uploaded file is deleted once every task that uses it has reached a final state (succeeded / failed / canceled / expired), normally within a minute — not when the task is created, because a retry needs it. Know the cost first: running the same image again means uploading it again, and a retry will fail.
What changing a setting does to what you already have
Changing a clock is not a simple "from now on" switch. Some changes reach back to tasks you have already run; others don't. This is how it works today:
| You change | Effect on tasks and files you already have |
|---|---|
| Prompt text to 1 hour or 24 hours | At the next cleanup pass, usually within minutes, every task that finished more than a day ago loses its prompt text and its generated results and files — even if Generated results is still set to 14 days. From then on the same happens to each task once it is a day past completion, unless something removes it sooner. |
| Prompt text to 7 days | The same, with 7 days instead of one. |
| Generated results to something shorter, while Prompt text is set to Same as results | The same as setting Prompt text to that length: 7 days reaches back 7 days; 1 hour, 6 hours or 24 hours reach back one day. |
| Generated results to something shorter, while Prompt text has its own value | Nothing changes for tasks you already ran: each keeps the result expiry it was given when accepted. New tasks use the shorter clock. |
| Uploaded files to Delete when the job ends | Applies to the files you have when you save. Files already used only by finished tasks are deleted within about a minute; the others once the tasks using them finish. Files uploaded after you save currently keep the standard expiry shown in their commit response. |
| Uploaded files to 1 hour or 24 hours | Currently changes nothing: every uploaded file stays usable until the expiresAt in its commit response. |
| Any clock to something longer | Nothing already deleted comes back, and existing tasks keep the expiry they were given. |
Why some changes reach back: each task's own expiry times are fixed when it is accepted, but a second cleanup pass works in whole days. It takes your Prompt text setting, rounds it up to 1, 7 or 30 days, and applies it to every finished task in the account — and when it clears a task, it clears the prompt text and the results together.
The same page has a second card, Job-content retention, which drives that day-based pass directly:
- Choosing 1 day or 7 days there clears the prompt text, results and generated files of every task that finished more than that long ago, and keeps doing so for each task as it reaches that age.
- Turning on Clear content soon after completion clears them for every finished task — including tasks you ran before turning it on — about an hour after each one completed.
- The two cards share settings: saving one changes what the other shows.
Download what you want to keep before you shorten anything
A shorter setting can delete the results and prompts of tasks you have already run, and deleted content cannot be restored. Before you save, the console shows how many items it expects to affect; treat that number as a warning, not an exact list of what will be removed.
Download every result you want to keep first, then shorten the clock. Lengthening needs no such care: it only affects the future, and nothing already deleted comes back.
Per-request override: X-Spicy-Retention
When you do not want to change the account setting and only want this one generation to disappear sooner, send the header on task creation. The value is an integer number of seconds, and it applies to this task's artefacts and prompt:
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-H "X-Spicy-Retention: 3600" \
--data "$TASK_PAYLOAD"- Shorter only. The effective value is
min(header, account setting, platform cap). Once an administrator sets the account to one hour, a single request cannot buy back 14 days — otherwise the account setting would be a suggestion, not a setting. 0is valid and means "delete the artefacts as soon as the task reaches a terminal state".- An invalid value does not fail the request. A negative number is clamped to
0; a value above the cap is clamped to the cap; a value that is not a decimal integer is ignored, so the account setting applies. The value that actually took effect is always reported asretentioninrecordInfo. A header that only asks to be more conservative should never break a generation. - Which endpoints read it.
jobs/createTaskandjobs/streamboth do.jobs/retryinherits the source task's effective value and ignores the header — a retry is a second attempt at the same thing, and letting it pick a different period would give one task family two different expiry times.jobs/quotedoes not read it, because it creates no task.
recordInfo returns retention for each task; the createTask response itself does not include it, so read it once the task exists:
{
"retention": {
"outputsExpireAt": "2026-09-13T12:00:00Z",
"promptsExpireAt": "2026-09-13T12:00:00Z",
"source": "header"
}
}source tells you which layer decided: header (this request), account (the account setting) or platform (the cap). Sending the header and still getting account means the account setting was already shorter than you asked for.
Before the task finishes, outputsExpireAt is measured from acceptance; when the task reaches a terminal state it is re-based on the completion time using the same window. It therefore only ever moves later, never earlier. Trust the timestamps in the response instead of recomputing them — the result of three-way clamping is not always the one you expected. Apart from destroying content yourself, the only thing that can remove content before these times is an account setting that reaches back, as described above.
Destroying content on demand: POST /jobs/purge
When you do not want to wait for expiry:
- In the console, open the task in Logs and choose Destroy outputs — the same action as the endpoint below.
- Remove from history, on the same task, also clears the task's prompt and result and queues its media for deletion, and additionally hides the task from your log. It is available once the task has ended and billing is settled.
Neither changes what you were charged, and neither cancels a task. From code:
curl -X POST https://api.spicyapi.ai/api/v1/jobs/purge \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"taskId": "job_01k..."}'| Removed | Kept |
|---|---|
| The artefact objects themselves | Ledger entries and amounts |
The result payload (output) | Task state and timestamps |
The prompt and text inside input | Model identifier and request_id |
The response:
{
"taskId": "job_01k...",
"contentState": "purged",
"purgedAt": "2026-09-13T12:00:00Z",
"contentRemovedBy": "user",
"billingRetained": true,
"mediaDeletionPending": true
}A few rules:
- Terminal tasks only (
succeeded/failed/canceled/expired). Wait for a running task to finish: the artefacts have not landed yet, and half-deleting is worse than not deleting. A generation task cannot be canceled once accepted, so there is no "cancel first, then destroy" path. - Idempotent, and no
Idempotency-Keyis needed. The endpoint is idempotent bytaskId: calling it again on an already-destroyed task still returns 200, andpurgedAtis the time of the first destroy, not of this call. Retrying after a timeout is safe. - The response means "scheduled", not "already deleted". While
mediaDeletionPendingis true,contentStateis alreadypurgedbut the background sweep has not finished removing the objects; it normally completes within a minute. Deleting synchronously would let one stubborn object hold up the whole request, which is exactly the moment you need a clean answer. - A response that is still
presentmeans this call removed nothing — for example because the task is under a preservation hold. You can retry later; the specific reason is deliberately not disclosed. billingRetainedis alwaystrue. It looks redundant. It is there because it is the one thing a caller is likely to get wrong about this endpoint — see below.
Destroying is not canceling, and it is not a refund
purge touches content only. It changes nothing about billing:
- A settled charge stays settled. Destroying the artefacts does not give the money back.
- An already-released hold (failed or expired tasks) stays released; destroying does not release it a second time.
- The charge is still on your billing page, with its amount, timestamp and model.
That is deliberate. Ledger records are the transaction evidence for both sides and are held under a 10 years retention policy; content is yours and can be removed when you ask. They are two categories of data, not two sides of one thing.
In one line: destroying removes the content, not the record of what you spent.
contentState: whether the content is there, and who removed it
Task details carry a contentState with three values:
| Value | Meaning | When you see it |
|---|---|---|
present | The content is still there | The normal state, and how to read older tasks that predate the field |
expired | Removed automatically at expiry | The effective retention period elapsed and the cleanup pass ran |
purged | You destroyed it | You called jobs/purge or chose Destroy outputs |
The last two come with purgedAt (when the content went away) and contentRemovedBy (system for the cleanup pass, user for you).
The word `expired` appears in two places and means different things
- Task state
expired: the generation timed out and produced nothing. contentStateexpired: it did produce something, which was later removed under your retention settings.
They share one English word. A single "Expired" label in your own interface collapses two unrelated situations: the first calls for a retry, the second cannot give you that result back no matter how many times you retry.
Showing purged as "expired" is wrong for the same reason in reverse: one is a button the user pressed, the other is our policy running on schedule. Say it backwards and people conclude the platform lost their files.
Expiry clears fields, not rows
Both halves of this sentence matter — the first one alone is misleading
Content is erased at the end of the retention period; the billing and status record, which contains no content, is kept indefinitely.
Stating only the first half is literally true and still leaves the wrong impression, because what disappears is the contents of input and output, not the task record.
Cleanup covers input, output, callback URLs and related event and callback content. The task row itself is kept indefinitely — it is the only evidence behind a billing dispute, and deleting it would break the books. Afterwards each row is a few hundred bytes of metadata: task ID, model, state, amount, timestamps, originating key. Destroying on demand follows exactly the same rule; only the timing is yours.
So once content is gone:
- You can still answer "how much was I charged this month, which tasks failed, which key submitted them".
- You cannot answer "what prompt did I send, which object key held the artefact" —
recordInfostops returninginputandoutputfrom that point on.
If you need prompts for longer, keep your own copy. An active preservation hold suspends the relevant deletion and also blocks on-demand destruction; neither can restore an output already physically deleted.
Balance history is separate from task content
Clearing a task's input and output — whether at expiry or because you destroyed it — does not alter top-ups, holds, settlements, returned holds or manual adjustments. You can still reconcile those balance movements on the console's billing page. Billing ledger records follow a ten-year retention policy and are not removed when task content expires or is destroyed.
If an access or deletion request reaches data that must be kept for a dispute, a security investigation or applicable law, our response will explain the scope and reason.
Two things we cannot do
1. The model that runs your request necessarily sees your prompt in the clear
Generation is done by the model you select, and the prompt has to reach that model as plaintext. That is an architectural ceiling, not a setting, and dialling your clock down to one hour does not change it. Our retention periods can therefore only ever promise how long SpicyAPI itself keeps something.
What happens to a prompt after it reaches the model is outside what our retention settings control. If that matters for your use case, contact us before sending sensitive material.
2. “Deleted immediately” does not exist
The backstop lifecycle rule has an execution window of up to 24 hours, and database backups roll over 35 days. Any claim that data vanishes from the world instantly is untrue. What we can commit to is how long completion takes, not that it is instantaneous — which is also why the destroy endpoint answers "scheduled" rather than "deleted".
The exception: legal holds
Tasks touched by a dispute, a forensic request or a statutory reporting obligation are placed on hold and stop counting down until the hold is released. On-demand destruction does not run while a hold is in force.
This overrides every figure and setting above. It is not a quietly reserved backdoor: without a hold mechanism, the first legal letter would force any retention promise to be broken — and you would then have to explain why the documentation said 14 days. It is written here because it belongs here.
What is in your hands
- Set each clock to the length you actually need. They are separate: do not switch uploads to "Delete when the job ends" as a side effect of wanting shorter prompts.
- Download before you shorten. A shorter setting can reach back to tasks you already ran — see what changing a setting does.
- Use
X-Spicy-Retentionfor one-off sensitive requests. There is no need to reconfigure a whole account for a single generation. - Do not send what you do not need to send. Reference images and prompts are the two most sensitive items, and the only two whose content you choose.
- Archive your own artefacts. They last about 14 days at most (about 60 days for short-film media), and less if you shorten the clock.
- Take a copy of your account data. Download your data on the Data protection page gives you a JSON file with your profile, team roles, API key details (never the secrets), retained task data and billing records. It doesn't include media files — download the results you need separately.
- Do not store download URLs in your database. They expire in 20 minutes and cannot be revoked once issued. Sign one when you need it — see Media.
- Use HTTPS for callback URLs. The payload carries task state and artefact references; plain HTTP hands them to anyone on the path.
We do not train on your content
Your prompts, reference images and artefacts do not enter any training set.
The boundary of that sentence matters: it is about us. The policies that apply to each model are not ours to set — see the first point above.

