{"openapi":"3.1.0","info":{"title":"JsonCut V2 API","version":"2.0.0-rc.1","description":"Public HTML-first API for editable image and video projects, typed templates, media and asynchronous rendering. Studio, hosted Agent and internal renderer routes are intentionally excluded."},"servers":[{"url":"https://api.jsoncut.com","description":"Production"}],"externalDocs":{"description":"JsonCut developer guides and examples","url":"https://jsoncut.com/docs/"},"tags":[{"name":"Projects","description":"Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio."},{"name":"Templates","description":"Published, version-pinned projects with typed inputs for repeatable image and video generation."},{"name":"Bulk renders","description":"Bounded JSON or CSV template batches with per-row validation and results."},{"name":"Media","description":"Owned image, video, audio and font resources referenced by durable jsoncut-media URLs."},{"name":"Renders","description":"Asynchronous project, template and inline render submission, status, cancellation and artifact access."},{"name":"Webhooks","description":"Signed render lifecycle events with delivery inspection, testing and dead-letter replay."},{"name":"Developer","description":"Usage and the machine-readable public contract."}],"paths":{"/api/v2/usage":{"get":{"operationId":"getUsageV2","summary":"Get V2 API usage","description":"Get V2 API usage. Usage and the machine-readable public contract. Required API key scopes: `usage:read`.","tags":["Developer"],"security":[{"apiKeyAuth":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["period","renderedSeconds","renderedImages","estimatedCost","jobs","storageMb","daily"],"properties":{"period":{"type":"string"},"renderedSeconds":{"type":"number"},"renderedImages":{"type":"integer"},"estimatedCost":{"type":"number"},"jobs":{"type":"integer"},"storageMb":{"type":"number"},"daily":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["date","seconds","images","jobs"],"properties":{"date":{"type":"string","format":"date"},"seconds":{"type":"number"},"images":{"type":"integer"},"jobs":{"type":"integer"}}}}}}}},"example":{"success":true,"data":{"period":"2026-08","renderedSeconds":420.5,"renderedImages":38,"estimatedCost":4.72,"jobs":54,"storageMb":812.4,"daily":[{"date":"2026-08-25","seconds":42.5,"images":4,"jobs":6}]}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["usage:read"]}},"/api/v2/webhooks":{"get":{"operationId":"listWebhooksV2","summary":"List render webhook endpoints","description":"List render webhook endpoints. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `renders:create`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","url","eventTypes","active","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["render.completed","render.failed","render.cancelled"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Returned once when the webhook is created"}}}}}},"example":{"success":true,"data":[{"id":"webhook_01J","name":"Production callback","url":"https://example.com/jsoncut-events","eventTypes":["render.completed","render.failed"],"active":true,"createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:00:00.000Z"}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]},"post":{"operationId":"createWebhookV2","summary":"Create a signed render webhook","description":"Create a signed render webhook. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `renders:create`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","url","eventTypes"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["render.completed","render.failed","render.cancelled"]}}}},"example":{"name":"Production callback","url":"https://example.com/jsoncut-events","eventTypes":["render.completed","render.failed"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","url","eventTypes","active","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["render.completed","render.failed","render.cancelled"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Returned once when the webhook is created"}}}}},"example":{"success":true,"data":{"id":"webhook_01J","name":"Production callback","url":"https://example.com/jsoncut-events","eventTypes":["render.completed","render.failed"],"active":true,"createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:00:00.000Z","secret":"whsec_returned_once"}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]}},"/api/v2/webhooks/{id}":{"patch":{"operationId":"updateWebhookV2","summary":"Update or disable a render webhook","description":"Update or disable a render webhook. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `renders:create`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","enum":["render.completed","render.failed","render.cancelled"]}},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","url","eventTypes","active","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["render.completed","render.failed","render.cancelled"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Returned once when the webhook is created"}}}}},"example":{"success":true,"data":{"id":"webhook_01J","name":"Production callback","url":"https://example.com/jsoncut-events","eventTypes":["render.completed","render.failed"],"active":true,"createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:00:00.000Z"}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]},"delete":{"operationId":"deleteWebhookV2","summary":"Delete a render webhook","description":"Delete a render webhook. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `renders:create`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]}},"/api/v2/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveriesV2","summary":"List recent delivery state without response bodies","description":"List recent delivery state without response bodies. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `operations:read`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","endpointId","eventType","status","attempts","createdAt"],"properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventType":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","delivered","dead-letter"]},"attempts":{"type":"integer"},"responseStatus":{"type":"integer"},"lastError":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":"string","format":"date-time"}}}}}},"example":{"success":true,"data":[{"id":"delivery_01J","endpointId":"webhook_01J","eventType":"render.completed","status":"delivered","attempts":1,"responseStatus":204,"createdAt":"2026-08-25T09:30:00.000Z","deliveredAt":"2026-08-25T09:30:01.000Z"}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["operations:read"]}},"/api/v2/webhooks/{id}/test":{"post":{"operationId":"testWebhookV2","summary":"Queue a safe signed test event","description":"Queue a safe signed test event. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `renders:create`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","endpointId","eventType","status","attempts","createdAt"],"properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"eventType":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","delivered","dead-letter"]},"attempts":{"type":"integer"},"responseStatus":{"type":"integer"},"lastError":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":"string","format":"date-time"}}}}},"example":{"success":true,"data":{"id":"delivery_01J","endpointId":"webhook_01J","eventType":"render.completed","status":"pending","attempts":0,"createdAt":"2026-08-25T09:30:00.000Z"}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]}},"/api/v2/webhooks/{id}/deliveries/{deliveryId}/replay":{"post":{"operationId":"replayWebhookDeliveryV2","summary":"Replay a dead-letter delivery","description":"Replay a dead-letter delivery. Signed render lifecycle events with delivery inspection, testing and dead-letter replay. Required API key scopes: `operations:cancel`.","tags":["Webhooks"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"deliveryId","in":"path","required":true,"description":"Webhook delivery identifier","schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["replayed"],"properties":{"replayed":{"type":"boolean","const":true}}}}},"example":{"success":true,"data":{"replayed":true}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["operations:cancel"]}},"/api/v2/projects":{"get":{"operationId":"listProjectsV2","summary":"Search, sort and organize projects","description":"Search, sort and organize projects. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"archived","in":"query","required":false,"description":"Return archived projects","schema":{"type":"boolean","default":false}},{"name":"deleted","in":"query","required":false,"description":"Return recoverable trash","schema":{"type":"boolean","default":false}},{"name":"search","in":"query","required":false,"description":"Search name, description or exact tag","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Server-side sort","schema":{"type":"string","enum":["updated-desc","updated-asc","name-asc","name-desc","created-desc"]}},{"name":"folder","in":"query","required":false,"description":"Exact folder","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Exact tag","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Return a cursor page when supplied","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque next cursor from the previous page","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"}}}},{"type":"object","additionalProperties":false,"required":["items","page"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"}}}},"page":{"type":"object","additionalProperties":false,"required":["limit","hasMore"],"properties":{"limit":{"type":"integer"},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}}}}}]}}},"example":{"success":true,"data":[{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]},"post":{"operationId":"createProjectV2","summary":"Create an HTML-first video or image project","description":"Create an HTML-first video or image project. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:write`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["source"],"properties":{"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]},"description":{"type":"string"}}},"example":{"source":{"format":"jsoncut-html","version":1,"id":"launch-image","name":"Launch image","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]},"description":"Layered launch artwork"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:write"]}},"/api/v2/projects/import":{"post":{"operationId":"importProjectBundleV2","summary":"Import a portable .jsoncut project bundle with its media","description":"Import a portable .jsoncut project bundle with its media. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:write`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","x-jsoncut-file":true}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:write"]}},"/api/v2/projects/{id}":{"get":{"operationId":"getProjectV2","summary":"Get a project","description":"Get a project. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]},"put":{"operationId":"saveProjectV2","summary":"Replace a project source version","description":"Replace a project source version. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:write`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"Exact current project version. Required for overwriting mutations unless the numeric body version is supplied for compatibility.","schema":{"type":"string","pattern":"^\"?[0-9]+\"?$"},"example":"\"1\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["source"],"properties":{"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]},"version":{"type":"integer","minimum":1}}},"example":{"source":{"format":"jsoncut-html","version":1,"id":"project-id","name":"Updated launch image","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"428":{"description":"Supply the current project version through If-Match or the request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Supply the current project version through If-Match or the request body","code":"PRECONDITION_REQUIRED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:write"]},"patch":{"operationId":"updateProjectV2","summary":"Update project metadata","description":"Update project metadata. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:write`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"Exact current project version. Required for overwriting mutations unless the numeric body version is supplied for compatibility.","schema":{"type":"string","pattern":"^\"?[0-9]+\"?$"},"example":"\"1\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"tags":{"type":"array","items":{"type":"string"},"maxItems":20},"folder":{"type":"string","maxLength":120},"version":{"type":"integer","minimum":1}}},"example":{"name":"Updated launch video","description":"Ready for review","tags":["launch","social"],"folder":"Campaigns"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"428":{"description":"Supply the current project version through If-Match or the request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Supply the current project version through If-Match or the request body","code":"PRECONDITION_REQUIRED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:write"]},"delete":{"operationId":"deleteProjectV2","summary":"Move a project to recoverable trash","description":"Move a project to recoverable trash. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:delete`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:delete"]}},"/api/v2/projects/{id}/context":{"get":{"operationId":"getProjectContextV2","summary":"Get project, cut.md and reusable-resource context","description":"Get project, cut.md and reusable-resource context. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"compact","in":"query","required":false,"description":"Omit complete HTML/CSS source and return source byte/count metadata","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["project","resources","workflow"],"properties":{"project":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}},{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","width","height","fps","duration","status","createdAt","updatedAt","thumbnail","tags","folder","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"integer"},"duration":{"type":"number"},"status":{"type":"string","enum":["draft","ready","rendering"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"thumbnail":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"folder":{"type":"string"},"version":{"type":"integer"},"templateId":{"type":"string"},"lastRenderId":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"}}}]},"source":{"type":"object","additionalProperties":false,"required":["format","version","compositionKind","variableCount","customBlockCount","clipCount","sceneCount","htmlBytes","cssBytes"],"properties":{"format":{"const":"jsoncut-html"},"version":{"const":1},"compositionKind":{"type":"string","enum":["video","image"]},"canvasBackground":{"type":"string"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","items":{"type":"object","additionalProperties":true}},"variableCount":{"type":"integer","minimum":0},"customBlockCount":{"type":"integer","minimum":0},"clipCount":{"type":"integer","minimum":0},"sceneCount":{"type":"integer","minimum":0},"htmlBytes":{"type":"integer","minimum":0},"cssBytes":{"type":"integer","minimum":0}}},"cut":{"type":"object","additionalProperties":false,"required":["id","projectId","cutVersion","projectVersion","schemaVersion","status","document","validation","resolvedReferences","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"cutVersion":{"type":"integer"},"projectVersion":{"type":"integer"},"schemaVersion":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"document":{"type":"object","additionalProperties":false,"required":["frontmatter","body"],"properties":{"frontmatter":{"type":"object","additionalProperties":true,"required":["cut","id","name","status","scope","kind","intent","output","governance","style","media","quality","technical"],"properties":{"cut":{"const":"jsoncut.cut/1"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"scope":{"type":"string","enum":["project","template"]},"kind":{"type":"string","enum":["video","image"]}}},"body":{"type":"string","maxLength":100000}}},"validation":{"type":"object","additionalProperties":false,"required":["ok","findings"],"properties":{"ok":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","path","severity","message"],"properties":{"code":{"type":"string"},"path":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"}}}}}},"resolvedReferences":{"type":"array","items":{"type":"object","additionalProperties":true}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"activeCutContext":{"type":"object","additionalProperties":true,"description":"Resolved public creative constraints from the active cut.md"},"lastReview":{"type":"object","additionalProperties":true,"description":"Latest safe review summary when one exists"},"resources":{"type":"object","additionalProperties":false,"required":["media","components","templates","brandKits","fonts"],"properties":{"media":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","kind","reference","retention"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"reference":{"type":"string"},"retention":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"duration":{"type":"number"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"components":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","category","currentVersion"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"currentVersion":{"type":"integer"}}}},"templates":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","category","compositionKind","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"version":{"type":"integer"}}}},"brandKits":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"}}}},"fonts":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","family","style","weight"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"style":{"type":"string","enum":["normal","italic"]},"weight":{"type":"integer"}}}}}},"workflow":{"type":"object","additionalProperties":false,"required":["stage","blockingFindings","recommendedNextActions"],"properties":{"stage":{"type":"string","enum":["inspect","cut","plan","resources","author","check","review","finalize"]},"blockingFindings":{"type":"array","items":{"type":"string"}},"recommendedNextActions":{"type":"array","items":{"type":"string"}}}}}}}},"example":{"success":true,"data":{"project":{"id":"project_01J","name":"Launch artwork","description":"Editable social campaign","compositionKind":"image","width":1080,"height":1080,"fps":1,"duration":1,"status":"ready","createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:05:00.000Z","thumbnail":"https://api.jsoncut.com/media/project_01J/thumbnail","tags":["launch"],"folder":"Campaigns","version":3,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}},"resources":{"media":[],"components":[],"templates":[],"brandKits":[],"fonts":[]},"workflow":{"stage":"author","blockingFindings":[],"recommendedNextActions":["Continue authoring or validate the current project.","For long or multi-scene Agent work, optionally save cut.md as a shared brief."]}}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]}},"/api/v2/projects/{id}/cut":{"get":{"operationId":"getProjectCutV2","summary":"Get the latest immutable cut.md version","description":"Get the latest immutable cut.md version. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","cutVersion","projectVersion","schemaVersion","status","document","validation","resolvedReferences","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"cutVersion":{"type":"integer"},"projectVersion":{"type":"integer"},"schemaVersion":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"document":{"type":"object","additionalProperties":false,"required":["frontmatter","body"],"properties":{"frontmatter":{"type":"object","additionalProperties":true,"required":["cut","id","name","status","scope","kind","intent","output","governance","style","media","quality","technical"],"properties":{"cut":{"const":"jsoncut.cut/1"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"scope":{"type":"string","enum":["project","template"]},"kind":{"type":"string","enum":["video","image"]}}},"body":{"type":"string","maxLength":100000}}},"validation":{"type":"object","additionalProperties":false,"required":["ok","findings"],"properties":{"ok":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","path","severity","message"],"properties":{"code":{"type":"string"},"path":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"}}}}}},"resolvedReferences":{"type":"array","items":{"type":"object","additionalProperties":true}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}},"example":{"success":true,"data":{"id":"cut_01J","projectId":"project_01J","cutVersion":1,"projectVersion":3,"schemaVersion":"jsoncut.cut/1","status":"draft","document":{"frontmatter":{"cut":"jsoncut.cut/1","id":"launch-cut","name":"Launch cut","status":"draft","scope":"project","kind":"video","intent":{},"output":{},"governance":{},"style":{},"media":{},"quality":{},"technical":{}},"body":""},"validation":{"ok":true,"findings":[]},"resolvedReferences":[],"createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:00:00.000Z"}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]},"put":{"operationId":"saveProjectCutSpecV2","summary":"Save a validated immutable cut.md version","description":"Save a validated immutable cut.md version. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:write`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"Exact current project version. Required for overwriting mutations unless the numeric body version is supplied for compatibility.","schema":{"type":"string","pattern":"^\"?[0-9]+\"?$"},"example":"\"1\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string","minLength":1,"maxLength":200000},"expectedCutVersion":{"type":"integer","minimum":0}}},{"type":"object","additionalProperties":false,"required":["document"],"properties":{"document":{"type":"object","additionalProperties":false,"required":["frontmatter","body"],"properties":{"frontmatter":{"type":"object","additionalProperties":true,"required":["cut","id","name","status","scope","kind","intent","output","governance","style","media","quality","technical"],"properties":{"cut":{"const":"jsoncut.cut/1"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"scope":{"type":"string","enum":["project","template"]},"kind":{"type":"string","enum":["video","image"]}}},"body":{"type":"string","maxLength":100000}}},"expectedCutVersion":{"type":"integer","minimum":0}}}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","cutVersion","projectVersion","schemaVersion","status","document","validation","resolvedReferences","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"cutVersion":{"type":"integer"},"projectVersion":{"type":"integer"},"schemaVersion":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"document":{"type":"object","additionalProperties":false,"required":["frontmatter","body"],"properties":{"frontmatter":{"type":"object","additionalProperties":true,"required":["cut","id","name","status","scope","kind","intent","output","governance","style","media","quality","technical"],"properties":{"cut":{"const":"jsoncut.cut/1"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"scope":{"type":"string","enum":["project","template"]},"kind":{"type":"string","enum":["video","image"]}}},"body":{"type":"string","maxLength":100000}}},"validation":{"type":"object","additionalProperties":false,"required":["ok","findings"],"properties":{"ok":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","path","severity","message"],"properties":{"code":{"type":"string"},"path":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"}}}}}},"resolvedReferences":{"type":"array","items":{"type":"object","additionalProperties":true}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}},"example":{"success":true,"data":{"id":"cut_01J","projectId":"project_01J","cutVersion":1,"projectVersion":3,"schemaVersion":"jsoncut.cut/1","status":"draft","document":{"frontmatter":{"cut":"jsoncut.cut/1","id":"launch-cut","name":"Launch cut","status":"draft","scope":"project","kind":"video","intent":{},"output":{},"governance":{},"style":{},"media":{},"quality":{},"technical":{}},"body":""},"validation":{"ok":true,"findings":[]},"resolvedReferences":[],"createdAt":"2026-08-25T09:00:00.000Z","updatedAt":"2026-08-25T09:00:00.000Z"}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:write"]}},"/api/v2/projects/{id}/cut/validate":{"post":{"operationId":"validateProjectCutV2","summary":"Validate cut.md without saving it","description":"Validate cut.md without saving it. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string","minLength":1,"maxLength":200000},"expectedCutVersion":{"type":"integer","minimum":0}}},{"type":"object","additionalProperties":false,"required":["document"],"properties":{"document":{"type":"object","additionalProperties":false,"required":["frontmatter","body"],"properties":{"frontmatter":{"type":"object","additionalProperties":true,"required":["cut","id","name","status","scope","kind","intent","output","governance","style","media","quality","technical"],"properties":{"cut":{"const":"jsoncut.cut/1"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","approved"]},"scope":{"type":"string","enum":["project","template"]},"kind":{"type":"string","enum":["video","image"]}}},"body":{"type":"string","maxLength":100000}}},"expectedCutVersion":{"type":"integer","minimum":0}}}]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["ok","findings"],"properties":{"ok":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","path","severity","message"],"properties":{"code":{"type":"string"},"path":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"}}}}}}}},"example":{"success":true,"data":{"ok":true,"findings":[]}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]}},"/api/v2/projects/{id}/bundle":{"get":{"operationId":"exportProjectBundleV2","summary":"Export a portable .jsoncut project bundle with its media","description":"Export a portable .jsoncut project bundle with its media. Durable editable image and video projects. Source versions use optimistic concurrency and can be opened in Studio. Required API key scopes: `projects:read`.","tags":["Projects"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.jsoncut.project+zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read"]}},"/api/v2/projects/{id}/renders":{"post":{"operationId":"createProjectRenderV2","summary":"Queue a render from the current or pinned project version","description":"Queue a render from the current or pinned project version. Asynchronous project, template and inline render submission, status, cancellation and artifact access. Required API key scopes: `projects:read`, `renders:create`.","tags":["Renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"version":{"type":"integer","minimum":1},"reviewId":{"type":"string","description":"Optional approved review attestation for this exact project and current cut version. Omit for an ordinary render."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"kind":{"type":"string","enum":["frame","image","grid","video"]},"frame":{"type":"integer","minimum":0},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"frames":{"type":"array","items":{"type":"integer","minimum":0},"minItems":1,"maxItems":100},"times":{"type":"array","items":{"type":"number","minimum":0},"minItems":1,"maxItems":100},"sampleCount":{"type":"integer","minimum":1,"maximum":100},"intervalSeconds":{"type":"number","exclusiveMinimum":0},"columns":{"type":"integer","minimum":1,"maximum":20},"quality":{"type":"string","enum":["draft","high"],"default":"high"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"],"description":"Container-compatible video codec"},"fps":{"type":"integer","minimum":12,"maximum":60,"description":"Output FPS; duration is preserved through time-based resampling"},"width":{"type":"integer","minimum":64,"maximum":3840},"height":{"type":"integer","minimum":64,"maximum":2160},"muted":{"type":"boolean","default":false},"transparent":{"type":"boolean","description":"Preserve alpha for PNG or WebP image exports"},"imageQuality":{"type":"integer","minimum":1,"maximum":100,"default":90},"rangeStart":{"type":"number","minimum":0,"description":"Optional selected video start in project seconds; requires rangeEnd"},"rangeEnd":{"type":"number","exclusiveMinimum":0,"description":"Optional selected video end in project seconds; requires rangeStart"},"retention":{"type":"string","enum":["temporary","project","template"],"default":"temporary"},"webhookEndpointId":{"type":"string","description":"Optional owned webhook endpoint receiving only this render terminal event"}}},"example":{"kind":"image","format":"png","quality":"high","transparent":true,"retention":"project"}}}},"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","projectName","kind","status","progress","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"kind":{"type":"string","enum":["frame","image","grid","video","bulk"]},"status":{"type":"string","enum":["queued","rendering","completed","failed","cancelled"]},"progress":{"type":"number","minimum":0,"maximum":100},"phase":{"type":"string","enum":["queued","preparing","capturing","encoding","uploading","finalizing"]},"queuePosition":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"durationSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"artifactUrl":{"type":"string","format":"uri-reference"},"error":{"type":"string"},"errorCode":{"type":"string","enum":["INVALID_RENDER_INPUT","MISSING_MEDIA","MEDIA_FORBIDDEN","RENDER_TIMEOUT","ENCODE_FAILED","STORAGE_FAILED","RENDER_FAILED"]},"errorRetryable":{"type":"boolean"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"]},"fps":{"type":"integer"},"outputWidth":{"type":"integer"},"outputHeight":{"type":"integer"},"muted":{"type":"boolean"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer"},"rangeStart":{"type":"number","minimum":0},"rangeEnd":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["studio","api","template"]},"origin":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"const":"inline"}}},{"type":"object","additionalProperties":false,"required":["type","projectId","version"],"properties":{"type":{"const":"project"},"projectId":{"type":"string"},"version":{"type":"integer","minimum":1}}},{"type":"object","additionalProperties":false,"required":["type","templateId","version"],"properties":{"type":{"const":"template"},"templateId":{"type":"string"},"version":{"type":"integer","minimum":1}}}]},"sourceHash":{"type":"string"},"reviewFrames":{"type":"array","items":{"type":"integer","minimum":0}},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"stale":{"type":"boolean"}}}}},"example":{"success":true,"data":{"id":"render_01J","projectId":"project_01J","projectName":"Launch artwork","kind":"image","status":"queued","progress":0,"phase":"queued","queuePosition":1,"createdAt":"2026-08-25T09:15:00.000Z","format":"png","outputWidth":1080,"outputHeight":1080,"transparent":true}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["projects:read","renders:create"]}},"/api/v2/templates":{"get":{"operationId":"listTemplatesV2","summary":"List templates","description":"List templates. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:read`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","category","duration","aspectRatio","thumbnail","variables","sourceProjectId","featured","publishedVersion","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"category":{"type":"string"},"duration":{"type":"number"},"aspectRatio":{"type":"string"},"thumbnail":{"type":"string"},"variables":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"sourceProjectId":{"type":"string"},"featured":{"type":"boolean"},"publishedVersion":{"type":"integer"},"version":{"type":"integer"},"imageOutputProfile":{"type":"object","additionalProperties":false,"required":["formats","defaultFormat","width","height","transparent","imageQuality"],"properties":{"formats":{"type":"array","items":{"type":"string","enum":["png","webp","jpg","jpeg"]}},"defaultFormat":{"type":"string","enum":["png","webp","jpg","jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer","minimum":1,"maximum":100}}}}}},{"type":"object","additionalProperties":false,"required":["items","page"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","category","duration","aspectRatio","thumbnail","variables","sourceProjectId","featured","publishedVersion","version"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"category":{"type":"string"},"duration":{"type":"number"},"aspectRatio":{"type":"string"},"thumbnail":{"type":"string"},"variables":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"sourceProjectId":{"type":"string"},"featured":{"type":"boolean"},"publishedVersion":{"type":"integer"},"version":{"type":"integer"},"imageOutputProfile":{"type":"object","additionalProperties":false,"required":["formats","defaultFormat","width","height","transparent","imageQuality"],"properties":{"formats":{"type":"array","items":{"type":"string","enum":["png","webp","jpg","jpeg"]}},"defaultFormat":{"type":"string","enum":["png","webp","jpg","jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer","minimum":1,"maximum":100}}}}}},"page":{"type":"object","additionalProperties":false,"required":["limit","hasMore"],"properties":{"limit":{"type":"integer"},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}}}}}]}}},"example":{"success":true,"data":[{"id":"template_01J","name":"Launch template","description":"Reusable launch artwork","compositionKind":"image","category":"marketing","duration":1,"aspectRatio":"1:1","thumbnail":"https://api.jsoncut.com/media/template_01J/thumbnail","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"sourceProjectId":"project_01J","featured":false,"publishedVersion":2,"version":2}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:read"]},"post":{"operationId":"createTemplateV2","summary":"Publish a project as a typed template","description":"Publish a project as a typed template. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:write`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["projectId"],"properties":{"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"publish":{"type":"boolean","default":true},"inputs":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"string"},"default":{"type":"string"},"examples":{"type":"array","maxItems":5,"items":{"type":"string"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"number"},"default":{"type":"number"},"examples":{"type":"array","maxItems":5,"items":{"type":"number"}},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"boolean"},"default":{"type":"boolean"},"examples":{"type":"array","maxItems":5,"items":{"type":"boolean"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}}},{"type":"object","additionalProperties":false,"required":["key","label","type","default"],"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."},"examples":{"type":"array","maxItems":5,"items":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}}]}}}},"example":{"projectId":"project-id","name":"Launch template","category":"marketing","publish":true}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","category","duration","aspectRatio","thumbnail","variables","sourceProjectId","featured","publishedVersion","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"category":{"type":"string"},"duration":{"type":"number"},"aspectRatio":{"type":"string"},"thumbnail":{"type":"string"},"variables":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"sourceProjectId":{"type":"string"},"featured":{"type":"boolean"},"publishedVersion":{"type":"integer"},"version":{"type":"integer"},"imageOutputProfile":{"type":"object","additionalProperties":false,"required":["formats","defaultFormat","width","height","transparent","imageQuality"],"properties":{"formats":{"type":"array","items":{"type":"string","enum":["png","webp","jpg","jpeg"]}},"defaultFormat":{"type":"string","enum":["png","webp","jpg","jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer","minimum":1,"maximum":100}}},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"template_01J","name":"Launch template","description":"Reusable launch artwork","compositionKind":"image","category":"marketing","duration":1,"aspectRatio":"1:1","thumbnail":"https://api.jsoncut.com/media/template_01J/thumbnail","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"sourceProjectId":"project_01J","featured":false,"publishedVersion":2,"version":2,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:write"]}},"/api/v2/templates/{id}":{"get":{"operationId":"getTemplateV2","summary":"Get a template","description":"Get a template. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:read`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","category","duration","aspectRatio","thumbnail","variables","sourceProjectId","featured","publishedVersion","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"category":{"type":"string"},"duration":{"type":"number"},"aspectRatio":{"type":"string"},"thumbnail":{"type":"string"},"variables":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"sourceProjectId":{"type":"string"},"featured":{"type":"boolean"},"publishedVersion":{"type":"integer"},"version":{"type":"integer"},"imageOutputProfile":{"type":"object","additionalProperties":false,"required":["formats","defaultFormat","width","height","transparent","imageQuality"],"properties":{"formats":{"type":"array","items":{"type":"string","enum":["png","webp","jpg","jpeg"]}},"defaultFormat":{"type":"string","enum":["png","webp","jpg","jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer","minimum":1,"maximum":100}}},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"template_01J","name":"Launch template","description":"Reusable launch artwork","compositionKind":"image","category":"marketing","duration":1,"aspectRatio":"1:1","thumbnail":"https://api.jsoncut.com/media/template_01J/thumbnail","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"sourceProjectId":"project_01J","featured":false,"publishedVersion":2,"version":2,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:read"]},"put":{"operationId":"updateTemplateV2","summary":"Update a template from a project","description":"Update a template from a project. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:write`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["projectId"],"properties":{"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"}}},"example":{"projectId":"project-id","name":"Launch template"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","description","compositionKind","category","duration","aspectRatio","thumbnail","variables","sourceProjectId","featured","publishedVersion","version","source"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"compositionKind":{"type":"string","enum":["video","image"]},"category":{"type":"string"},"duration":{"type":"number"},"aspectRatio":{"type":"string"},"thumbnail":{"type":"string"},"variables":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"sourceProjectId":{"type":"string"},"featured":{"type":"boolean"},"publishedVersion":{"type":"integer"},"version":{"type":"integer"},"imageOutputProfile":{"type":"object","additionalProperties":false,"required":["formats","defaultFormat","width","height","transparent","imageQuality"],"properties":{"formats":{"type":"array","items":{"type":"string","enum":["png","webp","jpg","jpeg"]}},"defaultFormat":{"type":"string","enum":["png","webp","jpg","jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer","minimum":1,"maximum":100}}},"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]}}}}},"example":{"success":true,"data":{"id":"template_01J","name":"Launch template","description":"Reusable launch artwork","compositionKind":"image","category":"marketing","duration":1,"aspectRatio":"1:1","thumbnail":"https://api.jsoncut.com/media/template_01J/thumbnail","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"sourceProjectId":"project_01J","featured":false,"publishedVersion":2,"version":2,"source":{"format":"jsoncut-html","version":1,"id":"project_01J","name":"Launch artwork","compositionKind":"image","canvasBackground":"transparent","width":1080,"height":1080,"fps":1,"duration":1,"html":"<div id=\"title\" data-jc-clip data-jc-kind=\"text\" data-jc-name=\"Title\" data-jc-start=\"0\" data-jc-duration=\"1\" data-jc-track=\"0\" data-jc-bind-text=\"title\" style=\"left:120px;top:460px;width:840px;height:160px;color:#fff;font:800 72px/1.1 Inter,sans-serif;text-align:center\">Launch faster</div>","css":"#jsoncut-canvas{background:linear-gradient(135deg,#111827,#FF9418)}","variables":[{"id":"title","label":"Title","type":"string","default":"Launch faster"}],"values":{"title":"Launch faster"},"customBlocks":[]}}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:write"]},"delete":{"operationId":"deleteTemplateV2","summary":"Delete a template","description":"Delete a template. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:write`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:write"]}},"/api/v2/templates/{id}/inputs":{"get":{"operationId":"getTemplateInputsV2","summary":"Discover required fields, constraints, media types and example values for a template","description":"Discover required fields, constraints, media types and example values for a template. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:read`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}},{"name":"version","in":"query","required":false,"description":"Optional immutable template version","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"string"},"default":{"type":"string"},"examples":{"type":"array","maxItems":5,"items":{"type":"string"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"number"},"default":{"type":"number"},"examples":{"type":"array","maxItems":5,"items":{"type":"number"}},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"boolean"},"default":{"type":"boolean"},"examples":{"type":"array","maxItems":5,"items":{"type":"boolean"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"},"examples":{"type":"array","maxItems":5,"items":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default","required","description","acceptedMimeTypes","usageCount","examples"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"description":{"type":"string","maxLength":1000},"acceptedMimeTypes":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":120}},"usageCount":{"type":"integer","minimum":0},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."},"examples":{"type":"array","maxItems":5,"items":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}}]}}}},"example":{"success":true,"data":[{"id":"title","label":"Title","type":"string","default":"Launch faster","required":true,"description":"Main campaign title","acceptedMimeTypes":[],"usageCount":1,"examples":["A better launch"]}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:read"]}},"/api/v2/templates/{id}/renders":{"post":{"operationId":"createTemplateRenderV2","summary":"Queue a render directly from a pinned template version without creating a project","description":"Queue a render directly from a pinned template version without creating a project. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:render`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["values"],"properties":{"values":{"type":"object","additionalProperties":true},"version":{"type":"integer","minimum":1},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"kind":{"type":"string","enum":["frame","image","grid","video"]},"frame":{"type":"integer","minimum":0},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"frames":{"type":"array","items":{"type":"integer","minimum":0},"minItems":1,"maxItems":100},"times":{"type":"array","items":{"type":"number","minimum":0},"minItems":1,"maxItems":100},"sampleCount":{"type":"integer","minimum":1,"maximum":100},"intervalSeconds":{"type":"number","exclusiveMinimum":0},"columns":{"type":"integer","minimum":1,"maximum":20},"quality":{"type":"string","enum":["draft","high"],"default":"high"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"],"description":"Container-compatible video codec"},"fps":{"type":"integer","minimum":12,"maximum":60,"description":"Output FPS; duration is preserved through time-based resampling"},"width":{"type":"integer","minimum":64,"maximum":3840},"height":{"type":"integer","minimum":64,"maximum":2160},"muted":{"type":"boolean","default":false},"transparent":{"type":"boolean","description":"Preserve alpha for PNG or WebP image exports"},"imageQuality":{"type":"integer","minimum":1,"maximum":100,"default":90},"rangeStart":{"type":"number","minimum":0,"description":"Optional selected video start in project seconds; requires rangeEnd"},"rangeEnd":{"type":"number","exclusiveMinimum":0,"description":"Optional selected video end in project seconds; requires rangeStart"},"retention":{"type":"string","enum":["temporary","project","template"],"default":"temporary"},"webhookEndpointId":{"type":"string","description":"Optional owned webhook endpoint receiving only this render terminal event"}}},"example":{"values":{"title":"A better launch"},"kind":"image","quality":"high","format":"png","transparent":true}}}},"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","projectName","kind","status","progress","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"kind":{"type":"string","enum":["frame","image","grid","video","bulk"]},"status":{"type":"string","enum":["queued","rendering","completed","failed","cancelled"]},"progress":{"type":"number","minimum":0,"maximum":100},"phase":{"type":"string","enum":["queued","preparing","capturing","encoding","uploading","finalizing"]},"queuePosition":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"durationSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"artifactUrl":{"type":"string","format":"uri-reference"},"error":{"type":"string"},"errorCode":{"type":"string","enum":["INVALID_RENDER_INPUT","MISSING_MEDIA","MEDIA_FORBIDDEN","RENDER_TIMEOUT","ENCODE_FAILED","STORAGE_FAILED","RENDER_FAILED"]},"errorRetryable":{"type":"boolean"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"]},"fps":{"type":"integer"},"outputWidth":{"type":"integer"},"outputHeight":{"type":"integer"},"muted":{"type":"boolean"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer"},"rangeStart":{"type":"number","minimum":0},"rangeEnd":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["studio","api","template"]},"origin":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"const":"inline"}}},{"type":"object","additionalProperties":false,"required":["type","projectId","version"],"properties":{"type":{"const":"project"},"projectId":{"type":"string"},"version":{"type":"integer","minimum":1}}},{"type":"object","additionalProperties":false,"required":["type","templateId","version"],"properties":{"type":{"const":"template"},"templateId":{"type":"string"},"version":{"type":"integer","minimum":1}}}]},"sourceHash":{"type":"string"},"reviewFrames":{"type":"array","items":{"type":"integer","minimum":0}},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"stale":{"type":"boolean"}}}}},"example":{"success":true,"data":{"id":"render_01J","projectId":"","projectName":"Launch template","kind":"image","status":"queued","progress":0,"phase":"queued","queuePosition":1,"createdAt":"2026-08-25T09:15:00.000Z","format":"png","outputWidth":1080,"outputHeight":1080,"transparent":true,"source":"template"}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:render"]}},"/api/v2/templates/{id}/bulk-renders":{"post":{"operationId":"createTemplateBulkRenderV2","summary":"Preflight and queue a bounded JSON or CSV batch pinned to one template version","description":"Preflight and queue a bounded JSON or CSV batch pinned to one template version. Published, version-pinned projects with typed inputs for repeatable image and video generation. Required API key scopes: `templates:bulk`.","tags":["Templates"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"idempotencyKey":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"integer","minimum":1},"defaults":{"type":"object","additionalProperties":true},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["values"],"properties":{"values":{"type":"object","additionalProperties":true},"idempotencyKey":{"type":"string","maxLength":120}}}},"csv":{"type":"string","minLength":3,"maxLength":2000000,"description":"Header names must match template input ids."},"output":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["frame","image","grid","video"]},"frame":{"type":"integer","minimum":0},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"frames":{"type":"array","items":{"type":"integer","minimum":0},"minItems":1,"maxItems":100},"times":{"type":"array","items":{"type":"number","minimum":0},"minItems":1,"maxItems":100},"sampleCount":{"type":"integer","minimum":1,"maximum":100},"intervalSeconds":{"type":"number","exclusiveMinimum":0},"columns":{"type":"integer","minimum":1,"maximum":20},"quality":{"type":"string","enum":["draft","high"],"default":"high"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"],"description":"Container-compatible video codec"},"fps":{"type":"integer","minimum":12,"maximum":60,"description":"Output FPS; duration is preserved through time-based resampling"},"width":{"type":"integer","minimum":64,"maximum":3840},"height":{"type":"integer","minimum":64,"maximum":2160},"muted":{"type":"boolean","default":false},"transparent":{"type":"boolean","description":"Preserve alpha for PNG or WebP image exports"},"imageQuality":{"type":"integer","minimum":1,"maximum":100,"default":90},"rangeStart":{"type":"number","minimum":0,"description":"Optional selected video start in project seconds; requires rangeEnd"},"rangeEnd":{"type":"number","exclusiveMinimum":0,"description":"Optional selected video end in project seconds; requires rangeStart"},"retention":{"type":"string","enum":["temporary","project","template"],"default":"temporary"},"webhookEndpointId":{"type":"string","description":"Optional owned webhook endpoint receiving only this render terminal event"}}}},"oneOf":[{"required":["items"]},{"required":["csv"]}]},"example":{"idempotencyKey":"campaign-2026-08","csv":"title\nFirst launch\nSecond launch","output":{"kind":"image","format":"png","transparent":true}}}}},"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","templateId","templateVersion","status","totalItems","validItems","completedItems","failedItems","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"templateId":{"type":"string"},"templateVersion":{"type":"integer"},"status":{"type":"string","enum":["validating","queued","running","completed","partial","failed","cancelled"]},"totalItems":{"type":"integer"},"validItems":{"type":"integer"},"completedItems":{"type":"integer"},"failedItems":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","index","status"],"properties":{"id":{"type":"string"},"index":{"type":"integer","minimum":0},"status":{"type":"string","enum":["invalid","queued","rendering","completed","failed","cancelled"]},"renderId":{"type":"string"},"error":{"type":"string"},"values":{"type":"object","additionalProperties":true},"artifactUrl":{"type":"string","format":"uri-reference"}}}}}}}},"example":{"success":true,"data":{"id":"bulk_01J","templateId":"template_01J","templateVersion":2,"status":"running","totalItems":100,"validItems":100,"completedItems":42,"failedItems":0,"createdAt":"2026-08-25T09:20:00.000Z","updatedAt":"2026-08-25T09:22:00.000Z"}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:bulk"]}},"/api/v2/bulk-renders/{id}":{"get":{"operationId":"getBulkRenderV2","summary":"Get a bulk render and its item results","description":"Get a bulk render and its item results. Bounded JSON or CSV template batches with per-row validation and results. Required API key scopes: `templates:bulk`.","tags":["Bulk renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","templateId","templateVersion","status","totalItems","validItems","completedItems","failedItems","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"templateId":{"type":"string"},"templateVersion":{"type":"integer"},"status":{"type":"string","enum":["validating","queued","running","completed","partial","failed","cancelled"]},"totalItems":{"type":"integer"},"validItems":{"type":"integer"},"completedItems":{"type":"integer"},"failedItems":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","index","status"],"properties":{"id":{"type":"string"},"index":{"type":"integer","minimum":0},"status":{"type":"string","enum":["invalid","queued","rendering","completed","failed","cancelled"]},"renderId":{"type":"string"},"error":{"type":"string"},"values":{"type":"object","additionalProperties":true},"artifactUrl":{"type":"string","format":"uri-reference"}}}}}}}},"example":{"success":true,"data":{"id":"bulk_01J","templateId":"template_01J","templateVersion":2,"status":"running","totalItems":100,"validItems":100,"completedItems":42,"failedItems":0,"createdAt":"2026-08-25T09:20:00.000Z","updatedAt":"2026-08-25T09:22:00.000Z"}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:bulk"]},"delete":{"operationId":"cancelBulkRenderV2","summary":"Cancel a running bulk render","description":"Cancel a running bulk render. Bounded JSON or CSV template batches with per-row validation and results. Required API key scopes: `templates:bulk`.","tags":["Bulk renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["templates:bulk"]}},"/api/v2/media":{"get":{"operationId":"listMediaV2","summary":"List uploaded media","description":"List uploaded media. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:read`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"projectId","in":"query","required":false,"description":"Only media attached to this owned project","schema":{"type":"string"}},{"name":"templateId","in":"query","required":false,"description":"Only media attached to this owned template","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},{"type":"object","additionalProperties":false,"required":["items","page"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"page":{"type":"object","additionalProperties":false,"required":["limit","hasMore"],"properties":{"limit":{"type":"integer"},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}}}}}]}}},"example":{"success":true,"data":[{"id":"media_01J","name":"product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"source":"https://api.jsoncut.com/api/v2/media/media_01J/content?token=short-lived","reference":"jsoncut-media://media_01J","retention":"project","createdAt":"2026-08-25T09:10:00.000Z","width":1600,"height":900}]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:read"]},"post":{"operationId":"uploadMediaV2","summary":"Upload a media file","description":"Upload a media file. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:write`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","x-jsoncut-file":true},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Optional display name; defaults to the uploaded filename"},"kind":{"type":"string","enum":["image","video","audio","font"],"description":"Optional when it can be inferred from the file"},"retention":{"type":"string","enum":["temporary","project","template","persistent"],"default":"persistent"},"projectId":{"type":"string","description":"Required with project retention"},"templateId":{"type":"string","description":"Required with template retention"},"duration":{"type":"number","minimum":0},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","kind","mimeType","sizeBytes","source"],"properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":1},"source":{"type":"string","pattern":"^data:[^;,]+;base64,.+$","description":"Base64 data URL for small files only","x-jsoncut-file":true},"duration":{"type":"number","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1},"retention":{"type":"string","enum":["temporary","project","template","persistent"],"default":"persistent"},"projectId":{"type":"string","description":"Required with project retention"},"templateId":{"type":"string","description":"Required with template retention"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}},"example":{"success":true,"data":{"id":"media_01J","name":"product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"source":"https://api.jsoncut.com/api/v2/media/media_01J/content?token=short-lived","reference":"jsoncut-media://media_01J","retention":"project","createdAt":"2026-08-25T09:10:00.000Z","width":1600,"height":900}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:write"]}},"/api/v2/media/import-url":{"post":{"operationId":"importMediaUrlV2","summary":"Import and pin a public media URL","description":"Import and pin a public media URL. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:write`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["sourceUrl","kind","mimeType"],"properties":{"sourceUrl":{"type":"string","format":"uri"},"name":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["image","video","audio"]},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","video/mp4","video/webm","audio/mpeg","audio/wav"]},"retention":{"type":"string","enum":["temporary","project","template","persistent"]},"projectId":{"type":"string"},"templateId":{"type":"string"},"role":{"type":"string","maxLength":120}}},"example":{"sourceUrl":"https://httpbin.org/image/png","name":"Imported image","kind":"image","mimeType":"image/png","retention":"persistent","role":"hero-product"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}},"example":{"success":true,"data":{"id":"media_01J","name":"product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"source":"https://api.jsoncut.com/api/v2/media/media_01J/content?token=short-lived","reference":"jsoncut-media://media_01J","retention":"project","createdAt":"2026-08-25T09:10:00.000Z","width":1600,"height":900}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:write"]}},"/api/v2/media/{id}":{"get":{"operationId":"getMediaV2","summary":"Get media metadata and a short-lived preview URL","description":"Get media metadata and a short-lived preview URL. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:read`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}},"example":{"success":true,"data":{"id":"media_01J","name":"product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"source":"https://api.jsoncut.com/api/v2/media/media_01J/content?token=short-lived","reference":"jsoncut-media://media_01J","retention":"project","createdAt":"2026-08-25T09:10:00.000Z","width":1600,"height":900}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:read"]},"patch":{"operationId":"updateMediaV2","summary":"Rename an uploaded media file","description":"Rename an uploaded media file. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:write`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\\\/\\u0000-\\u001F]+$"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","name","kind","mimeType","sizeBytes","source","reference","retention","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","font"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"source":{"type":"string","format":"uri"},"reference":{"type":"string","description":"Stable jsoncut-media:// reference to persist in project sources"},"retention":{"type":"string","enum":["temporary","project","template","persistent","legacy"]},"createdAt":{"type":"string","format":"date-time"},"duration":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"attribution":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"filmstripUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"duplicateOf":{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}},"example":{"success":true,"data":{"id":"media_01J","name":"hero-product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"source":"https://api.jsoncut.com/api/v2/media/media_01J/content?token=short-lived","reference":"jsoncut-media://media_01J","retention":"project","createdAt":"2026-08-25T09:10:00.000Z","width":1600,"height":900}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:write"]},"delete":{"operationId":"deleteMediaV2","summary":"Delete unused media","description":"Delete unused media. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:delete`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"409":{"description":"The request conflicts with the current version or state; refresh its scope and retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request conflicts with the current version or state; refresh its scope and retry","code":"CONFLICT","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:delete"]}},"/api/v2/media/inspect":{"post":{"operationId":"inspectMediaV2","summary":"Inspect useful image, video or audio metadata","description":"Inspect useful image, video or audio metadata. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:read`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mediaId":{"type":"string","description":"Owned media identifier (preferred)"},"url":{"type":"string","format":"uri","description":"Public URL for a bounded one-off inspection"}},"oneOf":[{"required":["mediaId"]},{"required":["url"]}]},"example":{"mediaId":"media-id"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["source","name","kind","warnings"],"properties":{"source":{"type":"string","enum":["media","url"]},"mediaId":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","unknown"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"format":{"type":"string"},"durationMs":{"type":"number"},"bitrate":{"type":"number"},"width":{"type":"integer"},"height":{"type":"integer"},"aspectRatio":{"type":"number"},"frameRate":{"type":"number"},"hasAlpha":{"type":"boolean"},"video":{"type":"object","additionalProperties":false,"properties":{"codec":{"type":"string"},"pixelFormat":{"type":"string"}}},"audio":{"type":"object","additionalProperties":false,"properties":{"codec":{"type":"string"},"channels":{"type":"integer","minimum":0},"sampleRate":{"type":"number","minimum":0}}},"warnings":{"type":"array","items":{"type":"string"}}}}}},"example":{"success":true,"data":{"source":"media","mediaId":"media_01J","name":"product-shot.png","kind":"image","mimeType":"image/png","sizeBytes":184320,"format":"png","width":1600,"height":900,"aspectRatio":1.7778,"hasAlpha":true,"warnings":[]}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:read"]}},"/api/v2/media/{id}/content":{"get":{"operationId":"streamMediaV2","summary":"Stream owned media with byte-range support for preview, playback or download","description":"Stream owned media with byte-range support for preview, playback or download. Owned image, video, audio and font resources referenced by durable jsoncut-media URLs. Required API key scopes: `media:read`.","tags":["Media"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Requested byte range","headers":{"Content-Range":{"schema":{"type":"string"}},"Accept-Ranges":{"schema":{"type":"string","const":"bytes"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}},"416":{"description":"The requested byte range is not satisfiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The requested byte range is not satisfiable","code":"RANGE_NOT_SATISFIABLE","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["media:read"]}},"/api/v2/renders":{"post":{"operationId":"createInlineRenderV2","summary":"Queue a temporary-by-default render from an inline HTML source bundle","description":"Queue a temporary-by-default render from an inline HTML source bundle. Asynchronous project, template and inline render submission, status, cancellation and artifact access. Required API key scopes: `renders:create`.","tags":["Renders"],"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["source","kind"],"properties":{"source":{"type":"object","additionalProperties":false,"description":"HTML-first JsonCut project source bundle shared by video and image compositions","required":["format","version","id","name","width","height","fps","duration","html","css","variables","values"],"properties":{"format":{"type":"string","const":"jsoncut-html"},"version":{"type":"integer","const":1},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"compositionKind":{"type":"string","enum":["video","image"],"default":"video"},"editabilityTarget":{"type":"string","enum":["layered","hybrid","atomic"],"description":"Optional Studio editing intent. Only layered turns editability findings into validation errors."},"canvasBackground":{"type":"string","description":"CSS color including 8-digit hex alpha or transparent"},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}},"aspectVariants":{"type":"array","maxItems":12,"items":{"type":"object","additionalProperties":false,"required":["id","label","width","height"],"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":120},"width":{"type":"integer","minimum":64,"maximum":8192},"height":{"type":"integer","minimum":64,"maximum":8192},"safeArea":{"type":"object","additionalProperties":false,"required":["top","right","bottom","left"],"properties":{"top":{"type":"number","minimum":0},"right":{"type":"number","minimum":0},"bottom":{"type":"number","minimum":0},"left":{"type":"number","minimum":0}}}}}},"width":{"type":"integer","minimum":1,"maximum":3840},"height":{"type":"integer","minimum":1,"maximum":2160},"fps":{"type":"integer","minimum":1,"maximum":60},"duration":{"type":"number","exclusiveMinimum":0,"maximum":1200},"html":{"type":"string","maxLength":5242880},"css":{"type":"string","maxLength":5242880},"variables":{"type":"array","maxItems":250,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"string"},"default":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"number"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":40}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"boolean"},"default":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"color"},"default":{"type":"string","pattern":"^(?:#[0-9A-Fa-f]{3,8}|rgba?\\(|hsla?\\(|transparent$)"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"image"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded image"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"video"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to an uploaded video"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"audio"},"default":{"type":"string","description":"Empty or jsoncut-media:// reference to uploaded audio"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"html"},"default":{"type":"string","description":"Sanitized HTML snippet without scripts or event handlers"}}},{"type":"object","additionalProperties":false,"required":["id","label","type","default"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_-]{0,127}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"const":"array"},"default":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000},"description":"Flat text list used only by repeat bindings. Nested arrays and objects are not supported."}}}]}},"values":{"type":"object","additionalProperties":true},"customBlocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["layerId","adapter","inputs"],"properties":{"layerId":{"type":"string","description":"ID of the matching data-jc-kind=\"custom\" layer"},"adapter":{"type":"string","enum":["canvas-2d","svg","dom","webgl"]},"html":{"type":"string","description":"Optional markup mounted inside the isolated layer"},"css":{"type":"string","description":"Optional styles scoped to the isolated layer"},"javascript":{"type":"string","description":"Project-timed layer code using only the documented Custom Block API"},"source":{"type":"string","description":"Compatibility alias for older frame-function blocks"},"inputs":{"type":"object","additionalProperties":true,"description":"Declared JSON-safe values editable without changing code"}},"anyOf":[{"required":["javascript"]},{"required":["source"]}]}}},"allOf":[{"if":{"properties":{"compositionKind":{"const":"image"}},"required":["compositionKind"]},"then":{"properties":{"fps":{"const":1},"duration":{"const":1}}}}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"kind":{"type":"string","enum":["frame","image","grid","video"]},"frame":{"type":"integer","minimum":0},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"frames":{"type":"array","items":{"type":"integer","minimum":0},"minItems":1,"maxItems":100},"times":{"type":"array","items":{"type":"number","minimum":0},"minItems":1,"maxItems":100},"sampleCount":{"type":"integer","minimum":1,"maximum":100},"intervalSeconds":{"type":"number","exclusiveMinimum":0},"columns":{"type":"integer","minimum":1,"maximum":20},"quality":{"type":"string","enum":["draft","high"],"default":"high"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"],"description":"Container-compatible video codec"},"fps":{"type":"integer","minimum":12,"maximum":60,"description":"Output FPS; duration is preserved through time-based resampling"},"width":{"type":"integer","minimum":64,"maximum":3840},"height":{"type":"integer","minimum":64,"maximum":2160},"muted":{"type":"boolean","default":false},"transparent":{"type":"boolean","description":"Preserve alpha for PNG or WebP image exports"},"imageQuality":{"type":"integer","minimum":1,"maximum":100,"default":90},"rangeStart":{"type":"number","minimum":0,"description":"Optional selected video start in project seconds; requires rangeEnd"},"rangeEnd":{"type":"number","exclusiveMinimum":0,"description":"Optional selected video end in project seconds; requires rangeStart"},"retention":{"type":"string","enum":["temporary","project","template"],"default":"temporary"},"webhookEndpointId":{"type":"string","description":"Optional owned webhook endpoint receiving only this render terminal event"}}},"example":{"source":{"format":"jsoncut-html","version":1,"id":"inline-video","name":"Inline video","width":1920,"height":1080,"fps":30,"duration":5,"html":"<main></main>","css":"","variables":[],"values":{}},"kind":"video","format":"mp4","retention":"temporary"}}}},"responses":{"202":{"description":"Accepted for processing","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","projectName","kind","status","progress","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"kind":{"type":"string","enum":["frame","image","grid","video","bulk"]},"status":{"type":"string","enum":["queued","rendering","completed","failed","cancelled"]},"progress":{"type":"number","minimum":0,"maximum":100},"phase":{"type":"string","enum":["queued","preparing","capturing","encoding","uploading","finalizing"]},"queuePosition":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"durationSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"artifactUrl":{"type":"string","format":"uri-reference"},"error":{"type":"string"},"errorCode":{"type":"string","enum":["INVALID_RENDER_INPUT","MISSING_MEDIA","MEDIA_FORBIDDEN","RENDER_TIMEOUT","ENCODE_FAILED","STORAGE_FAILED","RENDER_FAILED"]},"errorRetryable":{"type":"boolean"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"]},"fps":{"type":"integer"},"outputWidth":{"type":"integer"},"outputHeight":{"type":"integer"},"muted":{"type":"boolean"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer"},"rangeStart":{"type":"number","minimum":0},"rangeEnd":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["studio","api","template"]},"origin":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"const":"inline"}}},{"type":"object","additionalProperties":false,"required":["type","projectId","version"],"properties":{"type":{"const":"project"},"projectId":{"type":"string"},"version":{"type":"integer","minimum":1}}},{"type":"object","additionalProperties":false,"required":["type","templateId","version"],"properties":{"type":{"const":"template"},"templateId":{"type":"string"},"version":{"type":"integer","minimum":1}}}]},"sourceHash":{"type":"string"},"reviewFrames":{"type":"array","items":{"type":"integer","minimum":0}},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"stale":{"type":"boolean"}}}}},"example":{"success":true,"data":{"id":"render_01J","projectId":"","projectName":"Inline render","kind":"image","status":"queued","progress":0,"phase":"queued","queuePosition":1,"createdAt":"2026-08-25T09:15:00.000Z","format":"png","outputWidth":1080,"outputHeight":1080,"transparent":true}}}}},"400":{"description":"Malformed or unsupported request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Malformed or unsupported request","code":"BAD_REQUEST","retryable":false,"requestId":"req_01J..."}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"413":{"description":"The request is too large; upload media and use its reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The request is too large; upload media and use its reference","code":"PAYLOAD_TOO_LARGE","retryable":false,"requestId":"req_01J..."}}}},"422":{"description":"The supplied values do not satisfy this operation contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The supplied values do not satisfy this operation contract","code":"VALIDATION_FAILED","retryable":false,"requestId":"req_01J..."}}}},"429":{"description":"Rate limit exceeded; retry after waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Rate limit exceeded; retry after waiting","code":"RATE_LIMITED","retryable":true,"requestId":"req_01J..."}}}},"503":{"description":"A required service is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"A required service is temporarily unavailable","code":"SERVICE_UNAVAILABLE","retryable":true,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["renders:create"]}},"/api/v2/renders/{id}":{"get":{"operationId":"getRenderV2","summary":"Get render status and its temporary download URL","description":"Get render status and its temporary download URL. Asynchronous project, template and inline render submission, status, cancellation and artifact access. Required API key scopes: `operations:read`.","tags":["Renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":false,"required":["id","projectId","projectName","kind","status","progress","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"kind":{"type":"string","enum":["frame","image","grid","video","bulk"]},"status":{"type":"string","enum":["queued","rendering","completed","failed","cancelled"]},"progress":{"type":"number","minimum":0,"maximum":100},"phase":{"type":"string","enum":["queued","preparing","capturing","encoding","uploading","finalizing"]},"queuePosition":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"durationSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"artifactUrl":{"type":"string","format":"uri-reference"},"error":{"type":"string"},"errorCode":{"type":"string","enum":["INVALID_RENDER_INPUT","MISSING_MEDIA","MEDIA_FORBIDDEN","RENDER_TIMEOUT","ENCODE_FAILED","STORAGE_FAILED","RENDER_FAILED"]},"errorRetryable":{"type":"boolean"},"format":{"type":"string","enum":["png","webp","jpg","jpeg","mp4","webm","mov","gif"]},"codec":{"type":"string","enum":["h264","hevc","vp9","prores","gif"]},"fps":{"type":"integer"},"outputWidth":{"type":"integer"},"outputHeight":{"type":"integer"},"muted":{"type":"boolean"},"transparent":{"type":"boolean"},"imageQuality":{"type":"integer"},"rangeStart":{"type":"number","minimum":0},"rangeEnd":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["studio","api","template"]},"origin":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"const":"inline"}}},{"type":"object","additionalProperties":false,"required":["type","projectId","version"],"properties":{"type":{"const":"project"},"projectId":{"type":"string"},"version":{"type":"integer","minimum":1}}},{"type":"object","additionalProperties":false,"required":["type","templateId","version"],"properties":{"type":{"const":"template"},"templateId":{"type":"string"},"version":{"type":"integer","minimum":1}}}]},"sourceHash":{"type":"string"},"reviewFrames":{"type":"array","items":{"type":"integer","minimum":0}},"crop":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}},"stale":{"type":"boolean"}}}}},"example":{"success":true,"data":{"id":"render_01J","projectId":"project_01J","projectName":"Launch artwork","kind":"image","status":"queued","progress":0,"phase":"queued","queuePosition":1,"createdAt":"2026-08-25T09:15:00.000Z","format":"png","outputWidth":1080,"outputHeight":1080,"transparent":true}}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["operations:read"]},"delete":{"operationId":"cancelRenderV2","summary":"Cancel a queued or running render","description":"Cancel a queued or running render. Asynchronous project, template and inline render submission, status, cancellation and artifact access. Required API key scopes: `operations:cancel`.","tags":["Renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"204":{"description":"Completed without response body"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["operations:cancel"]}},"/api/v2/renders/{id}/artifact":{"get":{"operationId":"downloadRenderArtifactV2","summary":"Stream a completed render artifact for Agent or application inspection","description":"Stream a completed render artifact for Agent or application inspection. Asynchronous project, template and inline render submission, status, cancellation and artifact access. Required API key scopes: `operations:read`.","tags":["Renders"],"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"Authentication required","code":"UNAUTHORIZED","retryable":false,"requestId":"req_01J..."}}}},"402":{"description":"The active plan or available credits do not permit this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The active plan or available credits do not permit this operation","code":"PAYMENT_REQUIRED","retryable":false,"requestId":"req_01J..."}}}},"403":{"description":"The API key does not have the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The API key does not have the required scope","code":"FORBIDDEN","retryable":false,"requestId":"req_01J..."}}}},"404":{"description":"The resource was not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":"The resource was not found in this workspace","code":"NOT_FOUND","retryable":false,"requestId":"req_01J..."}}}}},"x-jsoncut-version":"v2","x-jsoncut-required-scopes":["operations:read"]}},"/api/v2/openapi.json":{"get":{"operationId":"getOpenApiV2","summary":"Get the public V2 API contract","tags":["Developer"],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-jsoncut-version":"v2"}}},"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ErrorResponse":{"type":"object","additionalProperties":false,"required":["success","error","code","retryable"],"properties":{"success":{"type":"boolean","const":false},"error":{"type":"string","description":"Safe message suitable for users; never contains upstream AI provider or model details"},"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","PAYMENT_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","GONE","PAYLOAD_TOO_LARGE","RANGE_NOT_SATISFIABLE","VALIDATION_FAILED","PRECONDITION_REQUIRED","RATE_LIMITED","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"retryable":{"type":"boolean","description":"Whether an automated client may retry after backoff"},"requestId":{"type":"string","description":"Correlation ID to include in support requests"}}}}}}