Actions
Discover and run deterministic, credit-free image transformations.
Base URL: https://app.gavana.ai/api/canvas-agent/v1 · Authentication: HTTP bearer, token format cba_<token-id>.<secret>
Operations
| Operation | Purpose | Scopes |
|---|---|---|
GET /actions | List deterministic Image Actions | canvas:read |
GET /actions/{actionKey} | Read one Image Action schema | canvas:read |
POST /actions/{actionKey}/runs | Run a deterministic Image Action | canvas:read, canvas:write, asset:read |
GET /actions
List deterministic Image Actions
Returns typed schemas for the eight deterministic, credit-free raster transformations available in the browser, CLI, API, and MCP adapter.
- Operation id:
listImageActions - Scopes: Requires
canvas:read. - CLI equivalent:
gavana action list
Parameters
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
q | query | string | No | Free-text Action slug, title, or summary search. max length 240. |
surface | query | string | No | Pass canvas to also list canvas-only Actions such as print-size, the runtime behind Resize with optional For print, and gated upscale, which returns native x2/x4 pixels. Existing width/height/dpi/fit calls retain print output; optional forPrint=no omits the DPI tag. Honored only for signed-in browser sessions; agent keys (cba_...) never receive canvas-only Actions and the value is ignored. Omit it to get the Actions every caller can run. One of canvas. |
limit | query | integer | No | Maximum number of items in this page. min 1, max 100. |
cursor | query | string | No | Opaque continuation cursor from page.nextCursor. Reuse it with the same list filters. max length 8192. |
Responses
| Status | Payload | Meaning |
|---|---|---|
200 | object | Deterministic Image Actions with typed schemas and pagination. |
default | ErrorResponse | A stable machine-readable error. The response always includes X-Request-ID. |
200 response body
| Field | Type | Required | Notes |
|---|---|---|---|
actions | array of ImageAction | Yes | — |
actions[].id | string | Yes | Pattern ^action:. |
actions[].slug | string | Yes | One of resize, crop, remove-background, change-aspect-ratio, side-by-side-composite, add-text-to-image, overlay-image, color-grade, rotate. |
actions[].version | “1.0.0” | Yes | — |
actions[].title | string | Yes | min length 1. |
actions[].summary | string | Yes | min length 1. |
actions[].estimatedSeconds | integer | Yes | min 1. |
actions[].inputs | array of ImageActionInput | Yes | min items 1, max items 2. |
actions[].inputs[].id | string | Yes | Pattern ^[A-Za-z][A-Za-z0-9_-]{0,79}$. |
actions[].inputs[].title | string | Yes | — |
actions[].inputs[].description | string | Yes | — |
actions[].output | ImageActionOutput | Yes | — |
actions[].output.title | string | Yes | — |
actions[].output.description | string | Yes | — |
actions[].parameters | array of ImageActionParameter | Yes | — |
actions[].parameters[].id | string | Yes | Pattern ^[A-Za-z][A-Za-z0-9_-]{0,79}$. |
actions[].parameters[].title | string | Yes | — |
actions[].parameters[].description | string | No | — |
actions[].parameters[].type | string | Yes | One of number, select, text, color. |
actions[].parameters[].required | boolean | Yes | — |
actions[].parameters[].integer | boolean | No | — |
actions[].parameters[].min | number | No | — |
actions[].parameters[].max | number | No | — |
actions[].parameters[].step | number | No | — |
actions[].parameters[].maxLength | integer | No | min 1. |
actions[].parameters[].options | array of ImageActionParameterOption | No | — |
actions[].parameters[].options[].value | string | number | Yes | — |
actions[].parameters[].options[].label | string | Yes | — |
page | CursorPage | Yes | — |
page.limit | integer | Yes | min 1, max 200. |
page.hasMore | boolean | Yes | — |
page.nextCursor | string | null | Yes | max length 8192. |
Example
curl "https://app.gavana.ai/api/canvas-agent/v1/actions" \
-H "Authorization: Bearer $GAVANA_AGENT_TOKEN"GET /actions/{actionKey}
Read one Image Action schema
Returns the exact ordered image inputs, typed parameters, defaults, limits, output contract, and cost behavior for one Action.
- Operation id:
getImageAction - Scopes: Requires
canvas:read. - CLI equivalent:
gavana action get
Parameters
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
actionKey | path | string | Yes | An Action slug or action:<slug> handle returned by GET /actions. Pattern ^(?:action:)?(?:resize|crop|remove-background|change-aspect-ratio|side-by-side-composite|add-text-to-image|overlay-image|color-grade|rotate)$. |
Responses
| Status | Payload | Meaning |
|---|---|---|
200 | object | One deterministic Image Action with its typed input and parameter schema. |
default | ErrorResponse | A stable machine-readable error. The response always includes X-Request-ID. |
200 response body
| Field | Type | Required | Notes |
|---|---|---|---|
action | ImageAction | Yes | — |
action.id | string | Yes | Pattern ^action:. |
action.slug | string | Yes | One of resize, crop, remove-background, change-aspect-ratio, side-by-side-composite, add-text-to-image, overlay-image, color-grade, rotate. |
action.version | “1.0.0” | Yes | — |
action.title | string | Yes | min length 1. |
action.summary | string | Yes | min length 1. |
action.estimatedSeconds | integer | Yes | min 1. |
action.inputs | array of ImageActionInput | Yes | min items 1, max items 2. |
action.inputs[].id | string | Yes | Pattern ^[A-Za-z][A-Za-z0-9_-]{0,79}$. |
action.inputs[].title | string | Yes | — |
action.inputs[].description | string | Yes | — |
action.output | ImageActionOutput | Yes | — |
action.output.title | string | Yes | — |
action.output.description | string | Yes | — |
action.parameters | array of ImageActionParameter | Yes | — |
action.parameters[].id | string | Yes | Pattern ^[A-Za-z][A-Za-z0-9_-]{0,79}$. |
action.parameters[].title | string | Yes | — |
action.parameters[].description | string | No | — |
action.parameters[].type | string | Yes | One of number, select, text, color. |
action.parameters[].required | boolean | Yes | — |
action.parameters[].integer | boolean | No | — |
action.parameters[].min | number | No | — |
action.parameters[].max | number | No | — |
action.parameters[].step | number | No | — |
action.parameters[].maxLength | integer | No | min 1. |
action.parameters[].options | array of ImageActionParameterOption | No | — |
action.parameters[].options[].value | string | number | Yes | — |
action.parameters[].options[].label | string | Yes | — |
Example
curl "https://app.gavana.ai/api/canvas-agent/v1/actions/action:resize" \
-H "Authorization: Bearer $GAVANA_AGENT_TOKEN"POST /actions/{actionKey}/runs
Run a deterministic Image Action
Queues a credit-free raster transform against one or two durable node or asset handles. The result is stored as a durable asset and materialized in the selected target image node.
- Operation id:
startImageAction - Scopes: Requires
canvas:read+canvas:write+asset:read. - CLI equivalent:
gavana action run
Parameters
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
actionKey | path | string | Yes | An Action slug or action:<slug> handle returned by GET /actions. Pattern ^(?:action:)?(?:resize|crop|remove-background|change-aspect-ratio|side-by-side-composite|add-text-to-image|overlay-image|color-grade|rotate)$. |
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
canvasId | string | Yes | A plain id, canvas:<id>, or canvas:<ownerUid>:<id> handle. |
baseRevision | string | Yes | min length 1, max length 200. |
idempotencyKey | string | Yes | min length 8, max length 200. |
targetNodeId | string | Yes | A new, empty image node reserved for this Action result. It must not also appear in inputs, and it must have no content, asset binding, or active Run. Pattern ^(?:node:)?[A-Za-z0-9_-]{1,180}$. |
inputs | array of string | Yes | One or two durable images in the exact order declared by the selected Action. min items 1, max items 2. |
params | ResizeActionParameters | CropActionParameters | RemoveBackgroundActionParameters | ChangeAspectRatioActionParameters | SideBySideActionParameters | AddTextActionParameters | OverlayImageActionParameters | ColorGradeActionParameters | RotateActionParameters | Yes | Use the parameter object declared by GET /actions/{actionKey}. Unknown fields are rejected. |
webhook | ImageJobWebhookInput | No | — |
webhook.url | string (uri) | Yes | A public HTTPS callback endpoint. Private, loopback, local-network, credential-bearing, and fragment-bearing URLs are rejected. max length 2048. Pattern ^https://. |
webhook.secret | string | Yes | A caller-owned HMAC secret encrypted at rest and never returned by the API. min length 32, max length 512. |
Validation rules the service enforces across these fields:
- targetNodeId must not identify any node supplied in inputs
- targetNodeId must identify an empty, unbound image node
Responses
| Status | Payload | Meaning |
|---|---|---|
202 | ImageJob | VideoJob | An image, Action, or video job state or finalized result. Image and Action results follow the documented Run retention policy. Video records are retained for 30 days and expose a protected download URL after completion. |
default | ErrorResponse | A stable machine-readable error. The response always includes X-Request-ID. |
202 response body
| Field | Type | Required | Notes |
|---|---|---|---|
(ImageJob).id | string | Yes | Pattern ^job:. |
(ImageJob).run | string | Yes | Pattern ^run:. |
(ImageJob).kind | string | Yes | One of image, action. |
(ImageJob).pollUrl | string | Yes | Pattern ^/api/canvas-agent/v1/runs/. |
(ImageJob).rawId | string (uuid) | No | — |
(ImageJob).status | string | Yes | Current temporary job state. Successful results retain the observation record for 24 hours before the first successful server finalization and 15 minutes after it; an authenticated Run GET or pre-callback worker finalization both count. Failed and canceled records keep the normal 24-hour window. Expired tombstones remain seven days. One of preparing, queued, running, finalizing, canceling, succeeded, failed, canceled, expired. |
(ImageJob).estimatedSeconds | integer | No | Typical provider runtime for the selected model. This is guidance, not a deadline. min 1. |
(ImageJob).durationMs | integer | No | Total observed duration once the job is terminal. min 0. |
(ImageJob).timing | ImageJobTiming | No | — |
(ImageJob).timing.createdAt | string (date-time) | No | — |
(ImageJob).timing.queuedAt | string (date-time) | No | — |
(ImageJob).timing.startedAt | string (date-time) | No | — |
(ImageJob).timing.completedAt | string (date-time) | No | — |
(ImageJob).timing.queueDurationMs | integer | No | min 0. |
(ImageJob).timing.executionDurationMs | integer | No | min 0. |
(ImageJob).timing.totalDurationMs | integer | No | min 0. |
(ImageJob).settings | ImageJobSettings | No | — |
(ImageJob).settings.model | string | No | — |
(ImageJob).settings.count | integer | No | min 1. |
(ImageJob).settings.requestedSize | string | No | — |
(ImageJob).settings.effectiveSize | string | No | — |
(ImageJob).settings.quality | string | No | — |
(ImageJob).parameterAdjustments | array of ImageJobParameterAdjustment | No | — |
(ImageJob).parameterAdjustments[].field | string | Yes | — |
(ImageJob).parameterAdjustments[].requested | string | Yes | — |
(ImageJob).parameterAdjustments[].effective | string | Yes | — |
(ImageJob).parameterAdjustments[].reason | string | Yes | — |
(ImageJob).warnings | array of string | No | — |
(ImageJob).failure | ImageJobFailure | No | — |
(ImageJob).failure.code | string | Yes | One of provider_authentication_failed, provider_timeout, provider_rate_limited, provider_rejected, provider_unavailable, runtime_failed, action_input_invalid, result_expired, output_finalization_failed, canvas_target_deleted, canvas_target_reassigned. |
(ImageJob).failure.message | string | Yes | — |
(ImageJob).failure.retryable | boolean | Yes | — |
(ImageJob).failure.providerStatus | integer | No | min 400, max 599. |
(ImageJob).message | string | No | User-facing status guidance. A queued message explicitly means the run is not complete and identifies run_get, published as get_image_run in ChatGPT, as authoritative. |
(ImageJob).doneClaimAllowed | boolean | No | False while a queued run or failed Canvas delivery must not be described as complete. |
(ImageJob).providerStatus | string | No | Present when provider execution succeeded but durable Canvas delivery failed. One of succeeded. |
(ImageJob).productFidelity | ImageJobProductFidelity | No | — |
(ImageJob).productFidelity.status | string | Yes | One of unverified, reference-bound. |
(ImageJob).productFidelity.exactProductClaimAllowed | false | Yes | — |
(ImageJob).productFidelity.instruction | string | Yes | — |
(ImageJob).finalization | ImageJobFinalization | No | — |
(ImageJob).finalization.status | string | Yes | One of pending, finalizing, succeeded, failed. |
(ImageJob).finalization.attempts | integer | Yes | min 0. |
(ImageJob).finalization.nextAttemptAt | string (date-time) | No | — |
(ImageJob).finalization.lastAttemptAt | string (date-time) | No | — |
(ImageJob).finalization.finalizedAt | string (date-time) | No | — |
(ImageJob).finalization.errorCode | string | No | — |
(ImageJob).webhook | ImageJobWebhookDelivery | No | Durable delivery state. Gavana makes four total attempts. Retryable network failures and 408, 425, 429, or 5xx responses back off for 10 seconds, 60 seconds, then 5 minutes; redirects and other 4xx responses stop delivery. |
(ImageJob).webhook.id | string | Yes | Pattern ^webhook:. |
(ImageJob).webhook.status | string | Yes | One of pending, delivering, delivered, failed. |
(ImageJob).webhook.attempts | integer | Yes | min 0. |
(ImageJob).webhook.nextAttemptAt | string (date-time) | No | — |
(ImageJob).webhook.lastAttemptAt | string (date-time) | No | — |
(ImageJob).webhook.deliveredAt | string (date-time) | No | — |
(ImageJob).webhook.lastStatus | integer | No | min 100, max 599. |
(ImageJob).webhook.errorCode | string | No | One of invalid_destination, delivery_failed, redirect_not_allowed, endpoint_rejected, secret_unavailable, finalization_unavailable, finalization_auth_unavailable, finalization_auth_expired, finalization_failed. |
(ImageJob).replayed | boolean | No | — |
(ImageJob).operation | string | No | One of generate, edit, variations, action. |
(ImageJob).actionId | string | No | Pattern ^action:. |
(ImageJob).actionVersion | string | No | — |
(ImageJob).canvasId | string | No | Pattern ^canvas:. |
(ImageJob).canvasBaseRevision | string | No | Exact Canvas revision Gavana read before applying the Canvas write reported by canvasRevision. |
(ImageJob).canvasRevision | string | No | — |
(ImageJob).canvasUrl | string (uri) | No | — |
(ImageJob).canceledAt | string (date-time) | No | — |
(ImageJob).cancelReason | string | No | One of stale_preparing, user_requested, setup_failed. |
(ImageJob).targets | array of string | No | — |
(ImageJob).references | array of string | No | — |
(ImageJob).referenceInputs | array of ImageReferenceInput | No | Exact reference handles and optional semantic roles used by the provider request. |
(ImageJob).referenceInputs[].handle | string | Yes | Pattern ^(?:node:[A-Za-z0-9_-]{1,180}|asset:(?:[A-Za-z0-9_-]{1,180}:)?[A-Za-z0-9_-]{1,180})$. |
(ImageJob).referenceInputs[].role | string | No | One of source, identity, construction, texture, fit, style. |
(ImageJob).referencePlan | array of ImageReferencePlanEntry | No | Final ordered reference plan, including whether each input reaches the provider or is protected for exact composition. |
(ImageJob).referencePlan[].order | integer | Yes | min 1. |
(ImageJob).referencePlan[].providerOrder | integer | No | min 1. |
(ImageJob).referencePlan[].handle | string | Yes | min length 1. |
(ImageJob).referencePlan[].label | string | Yes | min length 1. |
(ImageJob).referencePlan[].role | string | Yes | One of source, identity, construction, texture, fit, style. |
(ImageJob).referencePlan[].applicationMode | string | Yes | creative permits reinterpretation; identity is guided preservation, not pixel-exact; exact is deterministic source-pixel composition. One of creative, identity, exact. |
(ImageJob).referencePlan[].element | object | No | — |
(ImageJob).referencePlan[].element.id | string | Yes | Pattern ^[A-Za-z0-9_-]{1,180}$. |
(ImageJob).referencePlan[].element.version | integer | Yes | min 1. |
(ImageJob).referencePlan[].providerInput | boolean | Yes | — |
(ImageJob).plannedResultClass | string | No | Image provenance: action is a deterministic or AI-assisted Image Action, not an image-generation request. Historical records without this class remain unchanged. One of generated, identity-guided, exact-composed, action. |
(ImageJob).resultClass | string | No | Image provenance: action is a deterministic or AI-assisted Image Action, not an image-generation request. Historical records without this class remain unchanged. One of generated, identity-guided, exact-composed, action. |
(ImageJob).exactElements | array of ExactElementComposition | No | — |
(ImageJob).exactElements[].elementId | string | Yes | Pattern ^[A-Za-z0-9_-]{1,180}$. |
(ImageJob).exactElements[].version | integer | Yes | min 1. |
(ImageJob).exactElements[].handle | string | Yes | Pattern ^element:. |
(ImageJob).exactElements[].sourceAssetId | string | Yes | Pattern ^[A-Za-z0-9_-]{1,180}$. |
(ImageJob).exactElements[].sourceStorageKey | string | Yes | min length 1. |
(ImageJob).exactElements[].sourceHash | string | Yes | min length 1. |
(ImageJob).exactElements[].placements | array of ExactElementPlacement | Yes | min items 1, max items 16. |
(ImageJob).exactElements[].placements[].x | number | Yes | min 0, max 1. |
(ImageJob).exactElements[].placements[].y | number | Yes | min 0, max 1. |
(ImageJob).exactElements[].placements[].width | number | Yes | max 1. |
(ImageJob).exactElements[].placements[].height | number | Yes | max 1. |
(ImageJob).images | array of ImageJobResultImage | No | — |
(ImageJob).images[].assetId | string | Yes | Pattern ^asset:. |
(ImageJob).images[].nodeId | string | Yes | Pattern ^node:. |
(ImageJob).images[].mediaType | string | No | Pattern ^image/. |
(ImageJob).images[].width | integer | No | min 1. |
(ImageJob).images[].height | integer | No | min 1. |
(ImageJob).images[].bytes | integer | No | min 1. |
(ImageJob).images[].outputHash | string | No | SHA-256 of this finalized image after verified exact composition. Present only for exact-composed results. min length 1. |
(ImageJob).images[].previewUrl | string (uri) | Yes | — |
(ImageJob).images[].markdown | string | No | — |
(ImageJob).completionReview | CanvasCompletionReview | No | — |
(ImageJob).completionReview.status | string | Yes | One of ready, needs-review, blocked. |
(ImageJob).completionReview.doneClaimAllowed | boolean | Yes | False while agent-owned spatial or lineage findings remain, or a generated output is pending, failed, or non-durable. |
(ImageJob).completionReview.instruction | string | Yes | — |
(ImageJob).completionReview.outputs | CanvasCompletionOutputs | Yes | Generated-output count and durable, pending, and failed breakdown. |
(ImageJob).completionReview.outputs.count | integer | Yes | min 0. |
(ImageJob).completionReview.outputs.durableCount | integer | Yes | min 0. |
(ImageJob).completionReview.outputs.pendingCount | integer | Yes | min 0. |
(ImageJob).completionReview.outputs.failedCount | integer | Yes | min 0. |
(ImageJob).completionReview.outputs.handles | array of string | Yes | — |
(ImageJob).completionReview.outputs.expectedCount | integer | No | min 0. |
(ImageJob).completionReview.outputs.missingCount | integer | No | min 0. |
(ImageJob).completionReview.outputs.missingHandles | array of string | No | — |
(ImageJob).completionReview.outputs.canvasWideCount | integer | No | min 0. |
(ImageJob).completionReview.overlap | CanvasCompletionFindingArea | Yes | — |
(ImageJob).completionReview.overlap.status | string | Yes | One of clear, needs-review, blocked. |
(ImageJob).completionReview.overlap.findingCodes | array of string | Yes | — |
(ImageJob).completionReview.overlap.nodeHandles | array of string | Yes | — |
(ImageJob).completionReview.overlap.connectionHandles | array of string | Yes | — |
(ImageJob).completionReview.containment | CanvasCompletionFindingArea | Yes | — |
(ImageJob).completionReview.containment.status | string | Yes | One of clear, needs-review, blocked. |
(ImageJob).completionReview.containment.findingCodes | array of string | Yes | — |
(ImageJob).completionReview.containment.nodeHandles | array of string | Yes | — |
(ImageJob).completionReview.containment.connectionHandles | array of string | Yes | — |
(ImageJob).completionReview.referenceLineage | CanvasCompletionFindingArea | Yes | — |
(ImageJob).completionReview.referenceLineage.status | string | Yes | One of clear, needs-review, blocked. |
(ImageJob).completionReview.referenceLineage.findingCodes | array of string | Yes | — |
(ImageJob).completionReview.referenceLineage.nodeHandles | array of string | Yes | — |
(ImageJob).completionReview.referenceLineage.connectionHandles | array of string | Yes | — |
(ImageJob).completionReview.productFidelity | CanvasProductFidelityReview | Yes | Structural lineage evidence only. The current validator never reports visual fidelity passed; it sets visualReview:not-reviewed and exactProductClaimAllowed:false. The legacy passed enum remains accepted for older receipts. |
(ImageJob).completionReview.productFidelity.status | string | Yes | One of not-applicable, needs-review, passed. |
(ImageJob).completionReview.productFidelity.reviewedOutputCount | integer | Yes | min 0. |
(ImageJob).completionReview.productFidelity.needsReviewOutputHandles | array of string | Yes | — |
(ImageJob).completionReview.productFidelity.evidenceMissingOutputHandles | array of string | Yes | — |
(ImageJob).completionReview.productFidelity.reasons | array of object | No | — |
(ImageJob).completionReview.productFidelity.reasons[].nodeHandle | string | Yes | Pattern ^node:. |
(ImageJob).completionReview.productFidelity.reasons[].reason | string | Yes | — |
(ImageJob).completionReview.productFidelity.visualReview | “not-reviewed” | No | — |
(ImageJob).completionReview.productFidelity.exactProductClaimAllowed | false | No | — |
(ImageJob).completionReview.productFidelity.unusedProductReferenceHandles | array of string | No | — |
(ImageJob).completionReview.delivery | CanvasCompletionDelivery | Yes | Generated-output delivery evidence. A blocked state prevents a Done claim. |
(ImageJob).completionReview.delivery.status | string | Yes | One of clear, blocked. |
(ImageJob).completionReview.delivery.reasons | array of string | No | — |
(ImageJob).completionReview.delivery.pendingOutputHandles | array of string | Yes | — |
(ImageJob).completionReview.delivery.failedOutputHandles | array of string | Yes | — |
(ImageJob).completionReview.delivery.nonDurableOutputHandles | array of string | Yes | — |
(ImageJob).completionReview.delivery.missingOutputHandles | array of string | No | — |
(ImageJob).completionReview.blockingFindingCodes | array of string | Yes | — |
(ImageJob).completionReview.advisoryFindingCodes | array of string | Yes | — |
(ImageJob).completionReview.assessments | CanvasCompletionAssessments | No | Independent delivery, layout and creative review assessments. Current structural validation always leaves creative review not-reviewed; it cannot certify visual fidelity. |
(ImageJob).completionReview.assessments.delivery | object | Yes | — |
(ImageJob).completionReview.assessments.delivery.state | string | Yes | One of queued, running, delivered, failed, partial. |
(ImageJob).completionReview.assessments.layout | object | Yes | — |
(ImageJob).completionReview.assessments.layout.state | string | Yes | One of clear, warnings, blocked. |
(ImageJob).completionReview.assessments.creative | object | Yes | — |
(ImageJob).completionReview.assessments.creative.state | string | Yes | One of not-reviewed, passed, needs-changes. |
(ImageJob).completionReview.scope | string | No | One of task, canvas. |
(ImageJob).completionReview.scopeNote | string | No | — |
(ImageJob).estimatedSecondsBasis | string | No | The model estimate is an uncalibrated heuristic, not a measured completion deadline. One of heuristic. |
(ImageJob).requestContract | CreativeImageRequest | No | Immutable request snapshot stored with the existing image job; original user wording, explicit requirements, roles, destination and selection remain traceable. Source fingerprints fence changes to selected assets. A revision returned by MCP image_request_revise does not submit work or modify the original run. |
(ImageJob).requestContract.schemaVersion | 1 | Yes | — |
(ImageJob).requestContract.version | integer | Yes | max 9007199254740991. |
(ImageJob).requestContract.originalWording | string | Yes | min length 1, max length 8000. |
(ImageJob).requestContract.imagePrompt | string | No | min length 1, max length 8000. |
(ImageJob).requestContract.operation | string | Yes | One of generate, edit, variations. |
(ImageJob).requestContract.destination | object | Yes | — |
(ImageJob).requestContract.destination.canvasId | string | Yes | min length 1. |
(ImageJob).requestContract.destination.targetNodeIds | array of string | Yes | — |
(ImageJob).requestContract.references | array of object | Yes | max items 16. |
(ImageJob).requestContract.references[].handle | string | Yes | min length 1. |
(ImageJob).requestContract.references[].role | string | No | One of source, identity, product, construction, texture, fit, style. |
(ImageJob).requestContract.elements | array of string | object | No | max items 8. |
(ImageJob).requestContract.changeRegions | array of object | No | min items 1, max items 8. |
(ImageJob).requestContract.changeRegions[].x | number | Yes | min 0, max 1. |
(ImageJob).requestContract.changeRegions[].y | number | Yes | min 0, max 1. |
(ImageJob).requestContract.changeRegions[].width | number | Yes | max 1. |
(ImageJob).requestContract.changeRegions[].height | number | Yes | max 1. |
(ImageJob).requestContract.requirements | object | Yes | — |
(ImageJob).requestContract.requirements.count | integer | No | min 1, max 4. |
(ImageJob).requestContract.requirements.aspectRatio | string | No | Pattern ^\d{1,4}:\d{1,4}$. |
(ImageJob).requestContract.requirements.composition | string | No | One of single-frame, comparison, grid. |
(ImageJob).requestContract.requirements.panels | integer | No | min 1, max 16. |
(ImageJob).requestContract.requirements.text | string | No | One of none, specified, unspecified. |
(ImageJob).requestContract.requirements.copy | string | No | max length 2000. |
(ImageJob).requestContract.requirements.language | string | No | min length 1, max length 80. |
(ImageJob).requestContract.preserve | array of string | Yes | max items 32. |
(ImageJob).requestContract.changes | array of string | Yes | max items 32. |
(ImageJob).requestContract.forbiddenAdditions | array of string | Yes | max items 32. |
(ImageJob).requestContract.selection | object | Yes | — |
(ImageJob).requestContract.selection.model | string | No | — |
(ImageJob).requestContract.selection.size | string | No | — |
(ImageJob).requestContract.selection.quality | string | No | — |
(ImageJob).requestContract.selection.defaults | array of string | Yes | — |
(ImageJob).requestContract.selection.workflow | string | No | — |
(ImageJob).requestContract.sourceFingerprints | array of object | No | — |
(ImageJob).requestContract.sourceFingerprints[].handle | string | Yes | — |
(ImageJob).requestContract.sourceFingerprints[].fingerprint | string | Yes | — |
(ImageJob).requestContract.idempotencyKey | string | No | min length 8, max length 200. |
(ImageJob).requestContract.parentRun | string | No | — |
(ImageJob).requestContract.refinements | array of object | No | — |
(ImageJob).requestContract.refinements[].version | integer | Yes | max 9007199254740991. |
(ImageJob).requestContract.refinements[].patch | object | Yes | — |
(ImageJob).interpretedRequest | object | No | Compact interpretation of the stored request. No new paid submission is implied. |
(VideoJob).id | string | Yes | Pattern ^job:. |
(VideoJob).rawId | string (uuid) | Yes | — |
(VideoJob).kind | “video” | Yes | — |
(VideoJob).operation | “generate” | Yes | — |
(VideoJob).pollUrl | string | Yes | Pattern ^/api/canvas-agent/v1/jobs/. |
(VideoJob).status | string | Yes | One of queued, running, succeeded, failed, canceled. |
(VideoJob).model | object | Yes | — |
(VideoJob).model.id | string | Yes | — |
(VideoJob).model.name | string | Yes | — |
(VideoJob).progress | number | Yes | min 0, max 100. |
(VideoJob).estimatedSeconds | integer | Yes | min 1. |
(VideoJob).providerRunId | string | No | — |
(VideoJob).failure | VideoJobFailure | No | — |
(VideoJob).failure.code | string | Yes | One of video_generation_failed, canceled. |
(VideoJob).failure.message | string | Yes | — |
(VideoJob).failure.retryable | boolean | Yes | — |
(VideoJob).video | object | No | — |
(VideoJob).video.downloadUrl | string | Yes | Pattern ^/api/canvas-agent/v1/jobs/.+/output$. |
(VideoJob).replayed | boolean | No | — |
(VideoJob).createdAt | string (date-time) | Yes | — |
(VideoJob).updatedAt | string (date-time) | Yes | — |
Callbacks
imageJobTerminal→{$request.body#/webhook/url}: Receive a signed terminal image-job event. Gavana signs${timestamp}.${rawBody}with HMAC-SHA256 and the caller-owned secret. Return any 2xx response to acknowledge delivery. Delivery uses four total attempts. Retryable network failures and 408, 425, 429, or 5xx responses back off for 10 seconds, 60 seconds, then 5 minutes; redirects and other 4xx responses stop delivery. Successful Image and Action callbacks already contain durable asset and node handles indata.run.images, so callback-only clients do not need a follow-up GET. A caller withjob:managemay read the shared Run later for inspection. Successful image and Action results retain their temporary observation record for 24 hours before the first successful server finalization and 15 minutes after it; an authenticated Run GET or pre-callback worker finalization both count. Failed and canceled records keep the normal 24-hour window.
Example
curl -X POST "https://app.gavana.ai/api/canvas-agent/v1/actions/action:resize/runs" \
-H "Authorization: Bearer $GAVANA_AGENT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"canvasId": "canvas:8f2c1d40-9a77-4c2e-9c11-2b0a5f6d7e31",
"baseRevision": "12",
"idempotencyKey": "2026-08-04-first-attempt",
"targetNodeId": "<targetNodeId>",
"inputs": [
"<inputs>"
],
"params": {}
}'Errors
Every failure uses the shared error envelope described in Errors and X-Request-ID. The response always carries X-Request-ID; share that value with support instead of the request payload.