Mint a Scratch upload bundle for an image-revision source frame.
Returns signed multipart upload URLs the client uses to upload a source image (a captured video frame — always JPEG) directly into Scratch BEFORE calling `POST /ai/revisions` with `source.scratchId`. The API node never sees the bytes. After uploading the parts, complete the upload via `POST /v1/scratch/{scratchId}/complete-upload`. Same gate stack as generate minus the balance check (staging is free): `canAiGenerateImageRevision` → active subscription → `ai` capability → `aiImageRevisionEnabled`.
Returns signed multipart upload URLs the client uses to upload a
source image (a captured video frame — always JPEG) directly into
Scratch BEFORE calling POST /ai/revisions with
source.scratchId. The API node never sees the bytes. After
uploading the parts, complete the upload via
POST /v1/scratch/{scratchId}/complete-upload.
Same gate stack as generate minus the balance check (staging is
free): canAiGenerateImageRevision → active subscription → ai
capability → aiImageRevisionEnabled.
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/source-upload" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "0193e4a1-b2c3-7000-8000-000000000001", "projectId": "0193e4a1-b2c3-7000-8000-000000000aaa", "assetId": "0193e4a1-b2c3-7000-8000-000000000f00", "sizeInMB": 0.8 }'{ "scratchId": "212cade5-f209-4c67-9dd0-8a68ab06d5be", "key": "string", "uploadId": "string", "urls": [ "http://example.com" ], "expires": "2019-08-24T14:15:22Z"}