Nurama Developers
AI

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 on the platform Scratch primitive — call `POST /scratch/{id}/promote` to materialise the chosen revision as 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` (a row minted via `POST /ai/revisions/source-upload` — the modern path for video frames; it must belong to the caller and workspace, be `active`, and have `jobType: aiRevisionSource`), or `dataUrl` (deprecated legacy path for video frames). Gate stack: `canAiGenerateImageRevision` on the workspace → active subscription → `ai` capability → `aiImageRevisionEnabled` workspace/project setting (`aiImageRevisionAllowReviewer` for reviewers) → a worst-case credit pre-flight (flat USD estimate).

POST
/ai/revisions

Generate a variation of an existing image (or a captured video frame) guided by a free-text prompt. The result is staged on the platform Scratch primitive — call POST /scratch/{id}/promote to materialise the chosen revision as 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 (a row minted via POST /ai/revisions/source-upload — the modern path for video frames; it must belong to the caller and workspace, be active, and have jobType: aiRevisionSource), or dataUrl (deprecated legacy path for video frames).

Gate stack: canAiGenerateImageRevision on the workspace → active subscription → ai capability → aiImageRevisionEnabled workspace/project setting (aiImageRevisionAllowReviewer for reviewers) → a worst-case credit pre-flight (flat USD estimate).

Authorization

AuthorizationBearer <token>

OAuth 2.1 authorization code flow with PKCE (required of every client, public or confidential). Scopes are a ceiling on the credential, not a grant of access: a token also cannot exceed what the user who approved it may already do. A write scope does not imply its matching read — ask for both.

In: header

Scope: ai:use

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"}