Generate an AI image revision.
Generate a variation of an existing image (or a captured video frame) guided by a free-text prompt. The result is staged as a temporary Scratch upload — call `POST /scratch/{id}/promote` to turn the chosen revision into a real asset on the destination project (there is no `/ai/revisions/promote` route). `source` must contain exactly one of `url` (public media URL), `scratchId` (an upload created via `POST /ai/revisions/source-upload` — the preferred path for video frames; it must belong to the caller and workspace and still be active), or `dataUrl` (deprecated legacy path for video frames). Requires `canAiGenerateImageRevision` on the workspace, an active subscription, the `ai` capability, the `aiImageRevisionEnabled` workspace/project setting (`aiImageRevisionAllowReviewer` for reviewers) and a worst-case credit pre-check (a flat estimate).
Generate a variation of an existing image (or a captured video
frame) guided by a free-text prompt. The result is staged as a
temporary Scratch upload — call POST /scratch/{id}/promote to turn
the chosen revision into a real asset on the destination project
(there is no /ai/revisions/promote route).
source must contain exactly one of url (public media URL),
scratchId (an upload created via POST /ai/revisions/source-upload
— the preferred path for video frames; it must belong to the caller
and workspace and still be active), or dataUrl (deprecated legacy
path for video frames).
Requires canAiGenerateImageRevision on the workspace, an active
subscription, the ai capability, the aiImageRevisionEnabled
workspace/project setting (aiImageRevisionAllowReviewer for
reviewers) and a worst-case credit pre-check (a flat estimate).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/ai/revisions" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c", "source": {}, "prompt": "string" }'{ "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6", "revisionUrl": "string", "model": "string", "quality": "string", "billedCredits": 0, "balanceAfter": 0, "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c"}