{"openapi":"3.1.0","info":{"title":"OpenGen API","version":"0.1.3","description":"Regional image, video, and audio generation router. Public catalog discovery (GET /v1/models, GET /v1/pricing), stateless cost estimation (POST /v1/pricing/estimate), and zero-auth /mcp/readonly require no credentials or spend. Documented routes may not be executable; inspect route status, pricing, and privacy disclosures before submitting. Unknown provider acceptance must never trigger a blind paid retry. Responses on /v1/* emit IETF RateLimit and RateLimit-Policy headers (plus Retry-After on 429). Scheduled endpoint or version retirements follow RFC 8594 (Deprecation, Sunset, and Link rel=\"successor-version\" headers); see /docs/versioning.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"}},"paths":{"/v1/collections":{"get":{"operationId":"collections.list","summary":"List curated factual model collections","tags":["models"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCollectionSummary"}}},"required":["data"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections/{slug}":{"get":{"operationId":"collections.get","summary":"Inspect one curated model collection","tags":["models"],"security":[],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogCollectionDetail"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/models":{"get":{"operationId":"models.list","summary":"List and search exact model variants","tags":["models"],"description":"List and search exact model variants. By default returns compact model summaries without embedded generationProfiles (fetch full schemas per model via GET /v1/models/{provider}/{model} or GET /v1/models/schema, or pass ?expand=schemas to embed generationProfiles). Supports optional keyword search (q) and filters by modality, providerId, region, familyId, operation, inputRole, and curated collection slug.","security":[],"parameters":[{"name":"modality","in":"query","required":false,"schema":{"type":"string","enum":["image","video","audio"]}},{"name":"familyId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"region","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}},{"name":"inputRole","in":"query","required":false,"schema":{"type":"string","enum":["firstFrame","lastFrame","keyframes","sourceVideo","references.image","references.video","references.audio","references.document","mask","elements","targetAudio"]}},{"name":"collection","in":"query","required":false,"schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},{"name":"q","in":"query","required":false,"schema":{"default":"","type":"string","maxLength":200}},{"name":"expand","in":"query","required":false,"description":"Optional response expansion. Omit for compact model summaries without embedded JSON Schemas; pass \"schemas\" to include full generationProfiles for each model.","schema":{"type":"string","enum":["schemas"]}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelSummary"}}},"required":["data"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/models/{provider}/{model}":{"get":{"operationId":"models.get","summary":"Inspect one exact model, its schemas, routes, privacy disclosures, and pricing","tags":["models"],"description":"Inspect one exact model variant (or alias) in a single call, returning its effective generation profiles, series membership, regional routes with privacy disclosures, published pricing, and referenced deployments. Pass optional operation to filter schemas, routes, and pricing.","security":[],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"model","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetail"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/models/schema":{"get":{"operationId":"models.schema","summary":"Inspect effective model inputs","tags":["models"],"description":"Inspect canonical common and model-specific arguments, defaults, exact capability bounds, evidence sources and notices before submitting. The returned inputSchema describes the nested input object; generation still requires modelId and operation in the request envelope.","security":[],"parameters":[{"name":"modelId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"operation","in":"query","required":true,"schema":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationProfile"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routes":{"get":{"operationId":"routes.list","summary":"List documented regional routes","tags":["models"],"security":[],"parameters":[{"name":"modelId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogRoute"}}},"required":["data"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pricing":{"get":{"operationId":"pricing.list","summary":"List published route pricing","tags":["pricing"],"description":"List published per-unit route rates, published provider tariffs, and pricing evidence sources directly from the canonical catalog. Matches /v1/routes for every exact variant and operation. Unknown prices remain omitted or null, never zero/free.","security":[],"parameters":[{"name":"modelId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"routeId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"endpointRegion","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"modality","in":"query","required":false,"schema":{"type":"string","enum":["image","video","audio"]}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoutePricing"}}},"required":["data"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pricing/estimate":{"post":{"operationId":"pricing.estimate","summary":"Estimate request cost and route eligibility without spending","tags":["pricing"],"description":"Stateless, side-effect-free dry-run cost estimator backed strictly by the canonical catalog and route planner. Validates the exact generation request, computes per-route estimatedCostMicros and recommendedMaxCostMicros without reserving credits or creating a quoteId, and includes workspaceEligibility when authenticated.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"operation":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"metadata":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":80},"tags":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":160}}},"additionalProperties":false},"input":{"type":"object","properties":{"prompt":{"type":"string","maxLength":100000},"negativePrompt":{"type":"string","maxLength":20000},"firstFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"lastFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"sourceVideo":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"mask":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"references":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","document"]},"asset":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["type","asset"],"additionalProperties":false}},"duration":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":300},{"type":"string","const":"auto"}]},"resolution":{"type":"string","minLength":1,"maxLength":30},"size":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"height":{"type":"integer","exclusiveMinimum":0,"maximum":16384}},"required":["width","height"],"additionalProperties":false},"aspectRatio":{"type":"string","pattern":"^(source|auto|\\d+(\\.\\d+)?:\\d+(\\.\\d+)?)$"},"count":{"type":"integer","minimum":1,"maximum":15},"quality":{"type":"string","minLength":1,"maxLength":30},"outputFormat":{"type":"string","enum":["png","jpeg","webp","mp4","mp3","wav"]},"outputCompression":{"type":"integer","minimum":0,"maximum":100},"background":{"type":"string","enum":["auto","opaque","transparent"]},"complexity":{"type":"string","enum":["low","medium","high"]},"seed":{"type":"integer","minimum":-1,"maximum":9007199254740991},"audio":{"type":"boolean"},"draft":{"type":"boolean"},"draftJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"codec":{"type":"string","enum":["auto","H264","H265"]},"bitrateMode":{"type":"string","enum":["standard","high"]},"promptExpansion":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["disabled","none","balanced","quality"]}]},"thinkingLevel":{"type":"string","enum":["minimal","medium","high"]},"systemPrompt":{"type":"string","maxLength":50000},"grounding":{"type":"boolean"},"targetAudio":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"layers":{"type":"integer","minimum":1,"maximum":100},"strength":{"type":"number","minimum":0,"maximum":1},"keyframes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"image":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"at":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["start","end"]}]}},"required":["image"],"additionalProperties":false}},"shots":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"duration":{"type":"number","exclusiveMinimum":0,"maximum":300}},"required":["prompt","duration"],"additionalProperties":false}},"elements":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"images":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","images"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"video":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","video"],"additionalProperties":false}]}},"watermark":{"type":"boolean"},"promptExtend":{"type":"boolean"},"thinking":{"type":"boolean"},"scale":{"type":"number","minimum":1,"maximum":8},"voice":{"type":"string","minLength":1,"maxLength":120},"speed":{"type":"number","minimum":0.25,"maximum":4}},"additionalProperties":false},"billing":{"type":"string","enum":["managed","byok"]},"feeAcceptance":{"type":"object","properties":{"policyId":{"type":"string","minLength":1,"maxLength":200},"policyVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["policyId","policyVersion"],"additionalProperties":false},"routing":{"type":"object","properties":{"modelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"modelProviderExceptions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}}},"required":["modelId","providerIds"],"additionalProperties":false}},"authorOnly":{"type":"boolean"},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"deploymentIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"endpointRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingScopes":{"maxItems":5,"type":"array","items":{"type":"string","enum":["regional","mainland-china","international","global","undisclosed"]}},"fidelity":{"type":"string","enum":["any","native"]},"preference":{"type":"string","enum":["cost","speed","reliability"]},"fallback":{"type":"boolean"}},"additionalProperties":false},"routeId":{"type":"string","minLength":1,"maxLength":200},"maxCostMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"previousJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"queueStartDeadlineAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"webhookUrl":{"type":"string","maxLength":2048,"format":"uri"},"webhookEvents":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["generation.started","generation.completed","generation.failed","generation.cancelled","generation.delivery_ready"]}}},"required":["modelId","operation","input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingEstimate"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations":{"post":{"operationId":"media.generate","summary":"Submit one generation","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","example":"wait=20"},"description":"Optional RFC 7240 Prefer: wait[=N] header (clamped to 0–25s). When the job finishes with available delivery inside the wait window, returns HTTP 200 with the completed job; otherwise returns HTTP 202 with Location to poll."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"operation":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"metadata":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":80},"tags":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":160}}},"additionalProperties":false},"input":{"type":"object","properties":{"prompt":{"type":"string","maxLength":100000},"negativePrompt":{"type":"string","maxLength":20000},"firstFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"lastFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"sourceVideo":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"mask":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"references":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","document"]},"asset":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["type","asset"],"additionalProperties":false}},"duration":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":300},{"type":"string","const":"auto"}]},"resolution":{"type":"string","minLength":1,"maxLength":30},"size":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"height":{"type":"integer","exclusiveMinimum":0,"maximum":16384}},"required":["width","height"],"additionalProperties":false},"aspectRatio":{"type":"string","pattern":"^(source|auto|\\d+(\\.\\d+)?:\\d+(\\.\\d+)?)$"},"count":{"type":"integer","minimum":1,"maximum":15},"quality":{"type":"string","minLength":1,"maxLength":30},"outputFormat":{"type":"string","enum":["png","jpeg","webp","mp4","mp3","wav"]},"outputCompression":{"type":"integer","minimum":0,"maximum":100},"background":{"type":"string","enum":["auto","opaque","transparent"]},"complexity":{"type":"string","enum":["low","medium","high"]},"seed":{"type":"integer","minimum":-1,"maximum":9007199254740991},"audio":{"type":"boolean"},"draft":{"type":"boolean"},"draftJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"codec":{"type":"string","enum":["auto","H264","H265"]},"bitrateMode":{"type":"string","enum":["standard","high"]},"promptExpansion":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["disabled","none","balanced","quality"]}]},"thinkingLevel":{"type":"string","enum":["minimal","medium","high"]},"systemPrompt":{"type":"string","maxLength":50000},"grounding":{"type":"boolean"},"targetAudio":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"layers":{"type":"integer","minimum":1,"maximum":100},"strength":{"type":"number","minimum":0,"maximum":1},"keyframes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"image":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"at":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["start","end"]}]}},"required":["image"],"additionalProperties":false}},"shots":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"duration":{"type":"number","exclusiveMinimum":0,"maximum":300}},"required":["prompt","duration"],"additionalProperties":false}},"elements":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"images":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","images"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"video":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","video"],"additionalProperties":false}]}},"watermark":{"type":"boolean"},"promptExtend":{"type":"boolean"},"thinking":{"type":"boolean"},"scale":{"type":"number","minimum":1,"maximum":8},"voice":{"type":"string","minLength":1,"maxLength":120},"speed":{"type":"number","minimum":0.25,"maximum":4}},"additionalProperties":false},"billing":{"type":"string","enum":["managed","byok"]},"feeAcceptance":{"type":"object","properties":{"policyId":{"type":"string","minLength":1,"maxLength":200},"policyVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["policyId","policyVersion"],"additionalProperties":false},"routing":{"type":"object","properties":{"modelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"modelProviderExceptions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}}},"required":["modelId","providerIds"],"additionalProperties":false}},"authorOnly":{"type":"boolean"},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"deploymentIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"endpointRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingScopes":{"maxItems":5,"type":"array","items":{"type":"string","enum":["regional","mainland-china","international","global","undisclosed"]}},"fidelity":{"type":"string","enum":["any","native"]},"preference":{"type":"string","enum":["cost","speed","reliability"]},"fallback":{"type":"boolean"}},"additionalProperties":false},"routeId":{"type":"string","minLength":1,"maxLength":200},"maxCostMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"previousJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"queueStartDeadlineAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"webhookUrl":{"type":"string","maxLength":2048,"format":"uri"},"webhookEvents":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["generation.started","generation.completed","generation.failed","generation.cancelled","generation.delivery_ready"]}}},"required":["modelId","operation","input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Job completed within the requested Prefer: wait window (terminal with non-pending delivery).","headers":{"Location":{"schema":{"type":"string"}},"Preference-Applied":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"Job accepted. Persist the returned ID and poll it.","headers":{"Location":{"schema":{"type":"string"}},"Preference-Applied":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"jobs.list","summary":"List private generation jobs","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"modelId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"deploymentId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"endpointRegion","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"keyId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","submitting","running","submission-unknown","succeeded","failed","cancelled"]}},{"name":"project","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"since","in":"query","required":false,"schema":{"type":"string","maxLength":50}},{"name":"until","in":"query","required":false,"schema":{"type":"string","maxLength":50}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048}}],"responses":{"200":{"description":"Filtered, newest-first list of private generation jobs.","headers":{"X-Next-Cursor":{"description":"Opaque cursor for fetching the next page when more results exist.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets":{"post":{"operationId":"assets.create","summary":"Upload, import, reuse, or prepare a presigned PUT for a private workspace asset","tags":["assets"],"description":"Unified private asset upload endpoint (requires generate scope). Send multipart/form-data with a single \"file\" part (<= 4194304 bytes / 4 MiB) or JSON { source: \"base64\", mediaType, dataBase64 } (<= 3 MiB decoded) for single-step ready upload; JSON { source: \"url\", url, type } with Idempotency-Key for bounded public HTTPS import; JSON { source: \"job_output\", sourceJobId, outputIndex } with Idempotency-Key for owned output reuse; or JSON { mediaType, size } for a presigned single-PUT upload plan up to 100 MiB (finalized via POST /v1/assets/complete).","security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Required (1–200 chars) for source=\"url\" and source=\"job_output\"; optional for multipart/form-data and source=\"base64\" direct uploads.","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Single supported image, video, or audio file part up to 4194304 bytes (4 MiB)."}},"required":["file"],"additionalProperties":false}},"application/json":{"schema":{"oneOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","const":"presign"},"mediaType":{"type":"string","minLength":1,"maxLength":100},"size":{"type":"integer","minimum":1,"maximum":104857600}},"required":["mediaType","size"],"additionalProperties":false},{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","const":"url"},"url":{"type":"string","minLength":1,"maxLength":8192},"type":{"type":"string","enum":["image","video","audio"]}},"required":["source","url","type"],"additionalProperties":false},{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","const":"job_output"},"sourceJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"outputIndex":{"type":"integer","minimum":0,"maximum":63}},"required":["source","sourceJobId","outputIndex"],"additionalProperties":false},{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","const":"base64"},"mediaType":{"type":"string","minLength":1,"maxLength":100},"dataBase64":{"type":"string","minLength":1}},"required":["source","mediaType","dataBase64"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OwnedAsset"},{"$ref":"#/components/schemas/PreparedUpload"}]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File exceeds the 4 MiB multipart (or 3 MiB JSON base64) direct upload limit. Use POST /v1/assets with { mediaType, size } (presigned PUT) for files up to 100 MiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"assets.get","summary":"List workspace assets or inspect one asset by key","tags":["assets"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"key","in":"query","required":false,"description":"When supplied, inspect this single workspace-owned asset key instead of listing assets (cannot be combined with list filters).","schema":{"type":"string","minLength":1,"maxLength":300}},{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["prepared","uploading","processing","ready","failed","expired","deleted"]}},{"name":"mediaTypePrefix","in":"query","required":false,"schema":{"type":"string","enum":["image/","video/","audio/"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OwnedAsset"},{"$ref":"#/components/schemas/OwnedAssetListPage"}]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"assets.delete","summary":"Delete an owned workspace asset","tags":["assets"],"description":"Tombstone and delete a workspace-owned asset (requires generate scope). Pass the asset key via ?key=<assetKey> query parameter or JSON body { \"key\": \"<assetKey>\" }; returns 400 if both are missing or if both are supplied with conflicting values.","security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"key","in":"query","required":false,"description":"Owned workspace asset key to delete. Supply via ?key=<assetKey> query parameter or JSON body { \"key\": \"<assetKey>\" }; if both are supplied, they must match.","schema":{"type":"string","minLength":1,"maxLength":300}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":300}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"const":"deleted"},"inUse":{"type":"boolean"}},"required":["state","inUse"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets/complete":{"post":{"operationId":"assets.complete","summary":"Complete a private presigned upload","tags":["assets"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":300}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedAsset"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics":{"get":{"operationId":"analytics.get","summary":"Read workspace usage, spend, and latency analytics","tags":["account"],"description":"Bounded private workspace usage, spend (settledMicros, heldMicros, byKey, byTag), and per-model/route reliability and latency cohorts (p50Ms, p95Ms) over a date window of at most 31 days. Requires read scope.","security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"modelId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"deploymentId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"endpointRegion","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"operation","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"keyId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","submitting","running","submission-unknown","succeeded","failed","cancelled"]}},{"name":"project","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"since","in":"query","required":false,"schema":{"type":"string","maxLength":50}},{"name":"until","in":"query","required":false,"schema":{"type":"string","maxLength":50}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAnalytics"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations/lookup":{"get":{"operationId":"jobs.lookup","summary":"Recover a job by its idempotency key","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"idempotencyKey","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations/{id}/status":{"get":{"operationId":"jobs.status","summary":"Wait for a private job status revision","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"afterRevision","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"waitMs","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":25000}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["queued","submitting","running","submission-unknown","succeeded","failed","cancelled"]},"deliveryStatus":{"enum":["pending","available","partial","failed","expired","unverified"]},"cancellationState":{"enum":["none","requested","confirmed","rejected","unsupported"],"description":"Lifecycle state of cancellation. Requested cancellation on a running provider task does not guarantee a refund until terminal billing is confirmed."},"cancellationRequestedAt":{"type":["string","null"],"format":"date-time"},"routeId":{"type":"string"},"deploymentId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reservedMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"settledMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"revision":{"type":"string","pattern":"^[a-f0-9]{64}$"},"progress":{"type":["object","null"],"properties":{"phase":{"enum":["queued","submitting","running","delivery","complete"]},"percent":{"type":["number","null"],"minimum":0,"maximum":100},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"},"providerPhase":{"enum":["queued","processing",null],"description":"Structured provider queue/execution phase when explicitly reported by the upstream provider; null when unknown."},"queuePosition":{"type":["integer","null"],"minimum":0,"description":"Zero-based upstream queue position when explicitly reported by the provider while queued; null when unknown."}},"required":["phase","percent","source","observedAt"],"additionalProperties":false},"structuredError":{"type":["object","null"],"properties":{"code":{"type":"string"},"category":{"enum":["invalid_input","policy","technical","unknown"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"recovery":{"enum":["same_job","edit_request","operator","none"]},"field":{"type":"string"},"providerCode":{"type":"string"}},"required":["code","category","message","retryable","recovery"],"additionalProperties":false},"timings":{"type":["object","null"],"properties":{"queue":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"execution":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"delivery":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"endToEnd":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"firstPreview":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}},"additionalProperties":false}},"required":["id","status","deliveryStatus","routeId","deploymentId","createdAt","updatedAt","reservedMicros","settledMicros","revision","progress","structuredError","timings"]},"changed":{"type":"boolean"},"timedOut":{"type":"boolean"}},"required":["job","changed","timedOut"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations/{id}":{"get":{"operationId":"jobs.get","summary":"Read a private job and refresh delivery links","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations/{id}/cancel":{"post":{"operationId":"jobs.cancel","summary":"Request cancellation of an existing job","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Locally queued job cancelled immediately with hold released, or already terminal job returned idempotently.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"Upstream provider cancellation requested for a running job. Reserved credits remain held until polling confirms terminal non-billable cancellation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/generations/{id}/outputs":{"delete":{"operationId":"jobs.purgeOutputs","summary":"Purge archived output payloads for a generation","tags":["generations"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"deliveryStatus":{"const":"expired"},"outputsPurgedAt":{"type":"string","format":"date-time"},"deletedCount":{"type":"integer","minimum":0}},"required":["jobId","deliveryStatus","outputsPurgedAt","deletedCount"]}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance":{"get":{"operationId":"balance.get","summary":"Read available and reserved workspace credit","tags":["account"],"security":[{"bearerAuth":[]},{"browserSession":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/.well-known/webhook-jwks.json":{"get":{"operationId":"webhooks.jwks","summary":"Read public Ed25519 verification keys for per-request ad-hoc webhooks","tags":["webhooks"],"description":"Unauthenticated public JWK Set publishing active and rotated Ed25519 (OKP / EdDSA) verification keys for verifying X-OpenGen-Webhook-Signature headers on per-request generation webhooks.","security":[],"responses":{"200":{"description":"Ed25519 JSON Web Key Set.","headers":{"Cache-Control":{"schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookJwks"}}}}}}},"/v1/generations/{id}/events":{"get":{"operationId":"jobs.events","summary":"Stream private job status updates via Server-Sent Events","tags":["generations"],"description":"Bounded Server-Sent Events (text/event-stream) stream backed by durable job status reads. Re-authorizes on every poll tick, emits status events keyed by revision (id: <revision>), sends : heartbeat comments every 10s, emits event: done on terminal non-pending delivery, and closes cleanly with event: reconnect and retry: 1000 at 50s for seamless EventSource reconnection via Last-Event-ID.","security":[{"bearerAuth":[]},{"browserSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"afterRevision","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":"Optional 64-hex revision token to wait past."},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":"Standard EventSource reconnect cursor (takes precedence over afterRevision query parameter)."}],"responses":{"200":{"description":"SSE stream of status, done, reconnect, and error events with 10s heartbeats and 50s bounded connection window.","headers":{"Cache-Control":{"schema":{"type":"string"}},"X-Accel-Buffering":{"schema":{"const":"no"}}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance or request budget is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, origin or workspace policy denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Owned resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or operation unavailable in current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No compatible executable route or request cannot be fulfilled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Backpressure or request limit; retry the same read or follow the admission error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Bounded delay in seconds, when supplied.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required installation service is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"operationId":"health","summary":"Check gateway liveness","tags":["account"],"security":[],"responses":{"200":{"description":"Gateway liveness and configuration state.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"ok"},"database":{"type":"boolean"},"version":{"type":"string"}},"required":["status","database","version"]}}}}}}}},"components":{"headers":{"RateLimit":{"description":"IETF structured-field remaining quota and reset window in seconds for the active policy (e.g. \"public-read\";r=300;t=60).","schema":{"type":"string"}},"RateLimit-Policy":{"description":"IETF structured-field quota and window specification for the active policy (e.g. \"public-read\";q=300;w=60).","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 Too Many Requests response.","schema":{"type":"integer","minimum":0}},"Deprecation":{"description":"RFC 9745 / RFC 8594 deprecation indicator emitted only when an endpoint or route version is scheduled for deprecation (e.g. @<unix-timestamp> or true). Omitted on active /v1 endpoints.","schema":{"type":"string"}},"Sunset":{"description":"RFC 8594 HTTP-date indicating when a deprecated endpoint or route version is scheduled for removal, paired with Link rel=\"successor-version\". Omitted on active /v1 endpoints.","schema":{"type":"string"}}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Persist this key with the exact original input before submission. Reuse it only for that request to recover the same accepted job.","schema":{"type":"string","minLength":1,"maxLength":200}}},"schemas":{"GenerationArguments":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"type":"string","maxLength":100000},"negativePrompt":{"type":"string","maxLength":20000},"firstFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"lastFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"sourceVideo":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"mask":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"references":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","document"]},"asset":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["type","asset"],"additionalProperties":false}},"duration":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":300},{"type":"string","const":"auto"}]},"resolution":{"type":"string","minLength":1,"maxLength":30},"size":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"height":{"type":"integer","exclusiveMinimum":0,"maximum":16384}},"required":["width","height"],"additionalProperties":false},"aspectRatio":{"type":"string","pattern":"^(source|auto|\\d+(\\.\\d+)?:\\d+(\\.\\d+)?)$"},"count":{"type":"integer","minimum":1,"maximum":15},"quality":{"type":"string","minLength":1,"maxLength":30},"outputFormat":{"type":"string","enum":["png","jpeg","webp","mp4","mp3","wav"]},"outputCompression":{"type":"integer","minimum":0,"maximum":100},"background":{"type":"string","enum":["auto","opaque","transparent"]},"complexity":{"type":"string","enum":["low","medium","high"]},"seed":{"type":"integer","minimum":-1,"maximum":9007199254740991},"audio":{"type":"boolean"},"draft":{"type":"boolean"},"draftJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"codec":{"type":"string","enum":["auto","H264","H265"]},"bitrateMode":{"type":"string","enum":["standard","high"]},"promptExpansion":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["disabled","none","balanced","quality"]}]},"thinkingLevel":{"type":"string","enum":["minimal","medium","high"]},"systemPrompt":{"type":"string","maxLength":50000},"grounding":{"type":"boolean"},"targetAudio":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"layers":{"type":"integer","minimum":1,"maximum":100},"strength":{"type":"number","minimum":0,"maximum":1},"keyframes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"image":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"at":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["start","end"]}]}},"required":["image"],"additionalProperties":false}},"shots":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"duration":{"type":"number","exclusiveMinimum":0,"maximum":300}},"required":["prompt","duration"],"additionalProperties":false}},"elements":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"images":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","images"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"video":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","video"],"additionalProperties":false}]}},"watermark":{"type":"boolean"},"promptExtend":{"type":"boolean"},"thinking":{"type":"boolean"},"scale":{"type":"number","minimum":1,"maximum":8},"voice":{"type":"string","minLength":1,"maxLength":120},"speed":{"type":"number","minimum":0.25,"maximum":4}},"additionalProperties":false},"GenerationProfile":{"type":"object","properties":{"modelId":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"modality":{"enum":["image","video","audio"]},"commonArguments":{"type":"array","items":{"type":"string"}},"modelSpecificArguments":{"type":"array","items":{"type":"string"}},"defaults":{"$ref":"#/components/schemas/GenerationArguments"},"capabilities":{"type":"object","properties":{"resolutions":{"type":"array","items":{"type":"string"}},"aspectRatios":{"type":"array","items":{"type":"string"}},"duration":{"type":"object","properties":{"minimum":{"type":"number"},"maximum":{"type":"number"},"integer":{"type":"boolean"},"auto":{"type":"boolean"}},"required":["minimum","maximum","integer","auto"]},"references":{"type":"object","properties":{"types":{"type":"array","items":{"enum":["image","video","audio","document"]}},"maximum":{"type":"object","properties":{"image":{"type":"integer","minimum":0},"video":{"type":"integer","minimum":0},"audio":{"type":"integer","minimum":0},"document":{"type":"integer","minimum":0}},"additionalProperties":false},"totalMaximum":{"type":"integer","minimum":0}},"required":["types","maximum"]},"frames":{"type":"object","properties":{"first":{"type":"boolean"},"last":{"type":"boolean"},"lastOnly":{"type":"boolean"},"keyframesMaximum":{"type":"integer","minimum":0},"timed":{"type":"boolean"}},"required":["first","last","lastOnly","keyframesMaximum","timed"]},"frameReferenceMix":{"type":"boolean"},"audio":{"enum":["switchable","always-on","unsupported","unverified"]},"quality":{"type":"array","items":{"type":"string"}},"countMaximum":{"type":"integer","minimum":1}},"required":["resolutions","aspectRatios","references","frames","frameReferenceMix","audio","countMaximum"]},"promptRequired":{"type":"boolean"},"promptMaximum":{"type":["integer","null"]},"verification":{"enum":["documented","model-guided-partial","weights-only"]},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"notices":{"type":"array","items":{"type":"string"}},"examples":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/GenerateInput"},"generate":{"type":"object","properties":{"operationId":{"const":"media.generate"},"input":{"$ref":"#/components/schemas/GenerateInput"},"idempotencyKey":{"type":"string"}},"required":["operationId","input","idempotencyKey"]},"cli":{"type":"string"},"placeholders":{"type":"array","items":{"type":"string"}},"notices":{"type":"array","items":{"type":"string"}}},"required":["request","generate","cli","placeholders","notices"]},"inputSchema":{"type":"object","additionalProperties":true,"description":"JSON Schema for the native generation request input object. It narrows common and model-specific fields for this exact variant and operation. Route/provider restrictions may narrow it further; documented support is not live execution availability."}},"required":["modelId","operation","modality","commonArguments","modelSpecificArguments","defaults","capabilities","promptRequired","promptMaximum","verification","sources","notices","examples","inputSchema"]},"ModelSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creator":{"type":"string"},"authorProviderIds":{"type":"array","items":{"type":"string"}},"familyId":{"type":"string"},"modality":{"enum":["image","video","audio"]},"aliases":{"type":"array","items":{"type":"string"}},"openness":{"enum":["closed","open-weights"]},"license":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"description":{"type":"string"},"generationProfiles":{"type":"array","items":{"$ref":"#/components/schemas/GenerationProfile"}}},"required":["id","name","creator","authorProviderIds","familyId","modality","aliases","openness","license","source","description"]},"CatalogModel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"creator":{"type":"string"},"authorProviderIds":{"type":"array","items":{"type":"string"}},"familyId":{"type":"string"},"modality":{"enum":["image","video","audio"]},"aliases":{"type":"array","items":{"type":"string"}},"openness":{"enum":["closed","open-weights"]},"license":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"description":{"type":"string"},"generationProfiles":{"type":"array","items":{"$ref":"#/components/schemas/GenerationProfile"}}},"required":["id","name","creator","authorProviderIds","familyId","modality","aliases","openness","license","source","description","generationProfiles"]},"ModelProvider":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"website":{"type":"string","format":"uri"},"description":{"type":"string"},"parentProviderId":{"type":"string"},"parentCompanyId":{"type":"string","deprecated":true}},"required":["id","name","website","description"]},"ModelSeries":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"companyId":{"type":"string","deprecated":true},"name":{"type":"string"},"description":{"type":"string"},"modelIds":{"type":"array","items":{"type":"string"}}},"required":["id","providerId","companyId","name","description","modelIds"]},"PrivacyEvidence":{"type":"object","properties":{"source":{"type":"string","format":"uri"},"checkedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"enum":["documented","live-verified"]}},"required":["source","checkedAt","status"],"additionalProperties":false},"PublicPrivacyDisclosure":{"type":"object","properties":{"providerId":{"type":"string"},"deploymentId":{"type":"string"},"endpointRegion":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"string"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"inferenceScope":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"string"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"processingRegions":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"storageRegions":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"payloadHistory":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"enum":["disabled","enabled"]}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"deploymentLogs":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"enum":["disabled","enabled"]}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"maxDataRetentionSeconds":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"integer","minimum":0}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"zeroDataRetention":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"boolean"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"controls":{"type":"object","properties":{"payloadHistoryOptOut":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"boolean"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"outputExpiryControl":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"boolean"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false},"privateOutputAcl":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"boolean"}]},"evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrivacyEvidence"}]}},"required":["value","evidence"],"additionalProperties":false}},"required":["payloadHistoryOptOut","outputExpiryControl","privateOutputAcl"],"additionalProperties":false},"notes":{"type":"array","items":{"type":"string"}}},"required":["providerId","deploymentId","endpointRegion","inferenceScope","processingRegions","storageRegions","payloadHistory","deploymentLogs","maxDataRetentionSeconds","zeroDataRetention","controls","notes"],"additionalProperties":false},"CatalogRoute":{"type":"object","properties":{"id":{"type":"string"},"modelId":{"type":"string"},"deploymentId":{"type":"string"},"upstreamModelId":{"type":"string"},"operations":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}},"resolutions":{"type":"array","items":{"type":"string"}},"durations":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"status":{"enum":["documented","live-verified","retired"]},"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"publishedPricing":{"$ref":"#/components/schemas/RoutePublishedPricing"},"pricingSource":{"$ref":"#/components/schemas/Source"},"source":{"$ref":"#/components/schemas/Source"},"privacyDisclosure":{"$ref":"#/components/schemas/PublicPrivacyDisclosure"}},"required":["id","modelId","deploymentId","upstreamModelId","operations","resolutions","durations","status","rates","pricingSource","source"],"additionalProperties":true},"CatalogCollectionSummary":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string"},"description":{"type":"string"},"criteria":{"type":"string"},"modalities":{"type":"array","items":{"enum":["image","video","audio"]}},"modelCount":{"type":"integer","minimum":0},"modelIds":{"type":"array","items":{"type":"string"}}},"required":["slug","name","description","criteria","modalities","modelCount","modelIds"],"additionalProperties":false},"CatalogCollectionDetail":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string"},"description":{"type":"string"},"criteria":{"type":"string"},"modalities":{"type":"array","items":{"enum":["image","video","audio"]}},"modelCount":{"type":"integer","minimum":0},"modelIds":{"type":"array","items":{"type":"string"}},"models":{"type":"array","items":{"$ref":"#/components/schemas/CatalogModel"}},"series":{"type":"array","items":{"$ref":"#/components/schemas/ModelSeries"}},"routes":{"type":"array","items":{"$ref":"#/components/schemas/CatalogRoute"}}},"required":["slug","name","description","criteria","modalities","modelCount","modelIds","models","series","routes"],"additionalProperties":false},"GenerateInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"operation":{"type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"metadata":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":80},"tags":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":160}}},"additionalProperties":false},"input":{"type":"object","properties":{"prompt":{"type":"string","maxLength":100000},"negativePrompt":{"type":"string","maxLength":20000},"firstFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"lastFrame":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"sourceVideo":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"mask":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"references":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","document"]},"asset":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["type","asset"],"additionalProperties":false}},"duration":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":300},{"type":"string","const":"auto"}]},"resolution":{"type":"string","minLength":1,"maxLength":30},"size":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"height":{"type":"integer","exclusiveMinimum":0,"maximum":16384}},"required":["width","height"],"additionalProperties":false},"aspectRatio":{"type":"string","pattern":"^(source|auto|\\d+(\\.\\d+)?:\\d+(\\.\\d+)?)$"},"count":{"type":"integer","minimum":1,"maximum":15},"quality":{"type":"string","minLength":1,"maxLength":30},"outputFormat":{"type":"string","enum":["png","jpeg","webp","mp4","mp3","wav"]},"outputCompression":{"type":"integer","minimum":0,"maximum":100},"background":{"type":"string","enum":["auto","opaque","transparent"]},"complexity":{"type":"string","enum":["low","medium","high"]},"seed":{"type":"integer","minimum":-1,"maximum":9007199254740991},"audio":{"type":"boolean"},"draft":{"type":"boolean"},"draftJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"codec":{"type":"string","enum":["auto","H264","H265"]},"bitrateMode":{"type":"string","enum":["standard","high"]},"promptExpansion":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["disabled","none","balanced","quality"]}]},"thinkingLevel":{"type":"string","enum":["minimal","medium","high"]},"systemPrompt":{"type":"string","maxLength":50000},"grounding":{"type":"boolean"},"targetAudio":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"layers":{"type":"integer","minimum":1,"maximum":100},"strength":{"type":"number","minimum":0,"maximum":1},"keyframes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"image":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"at":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["start","end"]}]}},"required":["image"],"additionalProperties":false}},"shots":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"duration":{"type":"number","exclusiveMinimum":0,"maximum":300}},"required":["prompt","duration"],"additionalProperties":false}},"elements":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"images":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","images"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"video":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]},"voice":{"anyOf":[{"type":"object","properties":{"assetKey":{"type":"string","minLength":1,"maxLength":300}},"required":["assetKey"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}]}},"required":["id","video"],"additionalProperties":false}]}},"watermark":{"type":"boolean"},"promptExtend":{"type":"boolean"},"thinking":{"type":"boolean"},"scale":{"type":"number","minimum":1,"maximum":8},"voice":{"type":"string","minLength":1,"maxLength":120},"speed":{"type":"number","minimum":0.25,"maximum":4}},"additionalProperties":false},"billing":{"type":"string","enum":["managed","byok"]},"feeAcceptance":{"type":"object","properties":{"policyId":{"type":"string","minLength":1,"maxLength":200},"policyVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["policyId","policyVersion"],"additionalProperties":false},"routing":{"type":"object","properties":{"modelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"modelProviderExceptions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","minLength":1,"maxLength":160},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}}},"required":["modelId","providerIds"],"additionalProperties":false}},"authorOnly":{"type":"boolean"},"providerIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"deploymentIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"endpointRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingRegions":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"processingScopes":{"maxItems":5,"type":"array","items":{"type":"string","enum":["regional","mainland-china","international","global","undisclosed"]}},"fidelity":{"type":"string","enum":["any","native"]},"preference":{"type":"string","enum":["cost","speed","reliability"]},"fallback":{"type":"boolean"}},"additionalProperties":false},"routeId":{"type":"string","minLength":1,"maxLength":200},"maxCostMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"previousJobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"queueStartDeadlineAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"webhookUrl":{"type":"string","maxLength":2048,"format":"uri"},"webhookEvents":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["generation.started","generation.completed","generation.failed","generation.cancelled","generation.delivery_ready"]}}},"required":["modelId","operation","input"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string"},"status":{"enum":["queued","submitting","running","submission-unknown","succeeded","failed","cancelled"]},"input":{"$ref":"#/components/schemas/GenerateInput"},"routeId":{"type":"string"},"deploymentId":{"type":"string"},"upstreamId":{"type":"null","description":"Provider task identifiers remain private recovery data."},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/OutputAsset"}},"error":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"phase":{"enum":["queued","submitting","running","delivery","complete"]},"percent":{"type":["number","null"],"minimum":0,"maximum":100},"source":{"enum":["provider","gateway"]},"observedAt":{"type":"string","format":"date-time"},"providerPhase":{"enum":["queued","processing",null],"description":"Structured provider queue/execution phase when explicitly reported by the upstream provider; null when unknown."},"queuePosition":{"type":["integer","null"],"minimum":0,"description":"Zero-based upstream queue position when explicitly reported by the provider while queued; null when unknown."}},"required":["phase","percent","source","observedAt"],"additionalProperties":false},"structuredError":{"type":["object","null"],"properties":{"code":{"type":"string"},"category":{"enum":["invalid_input","policy","technical","unknown"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"recovery":{"enum":["same_job","edit_request","operator","none"]},"field":{"type":"string"},"providerCode":{"type":"string"}},"required":["code","category","message","retryable","recovery"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reservedMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"settledMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"billing":{"oneOf":[{"type":"object","properties":{"policyId":{"type":"string"},"policyVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"service":{"enum":["direct","smart"]},"basisPoints":{"type":"integer","minimum":0,"maximum":10000},"costStatus":{"const":"pending"}},"required":["policyId","policyVersion","service","basisPoints","costStatus"]},{"type":"object","properties":{"policyId":{"type":"string"},"policyVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"service":{"enum":["direct","smart"]},"basisPoints":{"type":"integer","minimum":0,"maximum":10000},"costStatus":{"enum":["verified","published-tariff","no-upstream-charge"]},"providerCostMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"customerProviderDebitMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"nominalFeeMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"collectedFeeMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"waivedFeeMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"operatorOverrunMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"customerTotalMicros":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["policyId","policyVersion","service","basisPoints","costStatus","providerCostMicros","customerProviderDebitMicros","nominalFeeMicros","collectedFeeMicros","waivedFeeMicros","operatorOverrunMicros","customerTotalMicros"]}]},"attemptCount":{"type":"integer","minimum":0},"attribution":{"type":["object","null"],"properties":{"kind":{"enum":["api","browser","oauth","bootstrap","unknown"]},"keyId":{"type":["string","null"]},"membershipId":{"type":["string","null"]},"grantId":{"type":["string","null"]},"clientId":{"type":["string","null"]}},"additionalProperties":false},"metadata":{"type":"object","properties":{"project":{"type":"string","maxLength":80},"tags":{"type":"object","maxProperties":16,"additionalProperties":{"type":"string","maxLength":160}}},"required":[]},"outputEvidence":{"type":"array","items":{"type":"object","description":"Bounded private per-file inspection/conformance summary; not a model-origin or moderation guarantee. index identifies the original receipt slot; outputIndex points into the current customer outputs array or is null."}},"deliveryStatus":{"enum":["pending","available","partial","failed","expired","unverified"]},"deliveryErrors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"code":{"type":"string"}},"required":["index","code"]}},"outputsPurgedAt":{"type":["string","null"],"format":"date-time"},"cancellationState":{"enum":["none","requested","confirmed","rejected","unsupported"],"description":"Lifecycle state of cancellation. Requested cancellation on a running provider task does not guarantee a refund until terminal billing is confirmed."},"cancellationRequestedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","workspaceId","status","input","routeId","deploymentId","upstreamId","outputs","error","createdAt","updatedAt","reservedMicros","settledMicros","attemptCount"]},"ComparisonChild":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/GenerateInput"},"endpointRegion":{"type":"string"},"providerId":{"type":"string"},"estimatedMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"ceilingMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"notices":{"type":"array","items":{"type":"string"}}},"required":["input","endpointRegion","providerId","estimatedMicros","ceilingMicros","notices"]},"ComparisonJob":{"allOf":[{"$ref":"#/components/schemas/Job"},{"type":"object","properties":{"executionTiming":{"type":["object","null"],"properties":{"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"enum":["gateway","provider"]}},"required":["durationMs","source"],"additionalProperties":false}},"required":["executionTiming"]}]},"ComparisonRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"admittedAt":{"type":"string","format":"date-time"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ComparisonChild"},"minItems":2,"maxItems":2},"estimatedMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"ceilingMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/ComparisonJob"},"maxItems":2}},"required":["id","admittedAt","children","estimatedMicros","ceilingMicros","jobs"]},"ComparisonSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"admittedAt":{"type":"string","format":"date-time"},"routeIds":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2}},"required":["id","admittedAt","routeIds"]},"DoctorReport":{"type":"object","properties":{"authenticated":{"const":true},"authorized":{"type":"boolean","description":"Whether this credential has generate scope. Human request/payer approval is separately required."},"account":{"type":["object","null"],"properties":{"issuer":{"type":"string"},"subject":{"type":"string"}}},"payingWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]},"scopes":{"type":"array","items":{"type":"string"}},"policy":{"type":["object","null"]},"maxCostMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"balance":{"$ref":"#/components/schemas/Balance"},"billingHold":{"type":["boolean","null"]},"executionScope":{"type":"object","properties":{"profile":{"enum":["unrestricted","qualification-sg-v1"]},"queuedConflicts":{"type":"integer","minimum":0},"transitionBlocked":{"type":"boolean"}},"required":["profile","queuedConflicts","transitionBlocked"]},"executableRoutes":{"type":"object","properties":{"managed":{"type":"array","items":{"type":"string"}},"byok":{"type":"array","items":{"type":"string"}},"evidence":{"const":"configuration-only"}},"required":["managed","byok","evidence"]},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"nextCommand":{"type":"string"}},"required":["code","message","nextCommand"]}},"nextBlocker":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"nextCommand":{"type":"string"}}},"nextCommand":{"type":"string"},"notices":{"type":"array","items":{"type":"string"}}},"required":["authenticated","authorized","account","payingWorkspace","scopes","policy","maxCostMicros","balance","billingHold","executableRoutes","blockers","nextBlocker","nextCommand","notices"]},"Balance":{"type":"object","properties":{"availableMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"reservedMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"}},"required":["availableMicros","reservedMicros","currency"]},"DeploymentScope":{"enum":["regional","mainland-china","international","global","undisclosed"]},"PricingEstimate":{"type":"object","properties":{"modelId":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"selectedRouteId":{"type":["string","null"]},"reservationMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"lowestEstimatedCostMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"recommendedMaxCostMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"estimateOnly":{"const":true},"notices":{"type":"array","items":{"type":"string"}},"candidates":{"type":"array","items":{"type":"object","properties":{"routeId":{"type":"string"},"deploymentId":{"type":"string"},"providerId":{"type":"string"},"endpointRegion":{"type":"string"},"scope":{"$ref":"#/components/schemas/DeploymentScope"},"operations":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}},"feature":{"$ref":"#/components/schemas/RouteFeature"},"estimatedCostMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"currency":{"const":"USD"},"executable":{"type":"boolean"},"reason":{"type":["string","null"]},"source":{"$ref":"#/components/schemas/Source"},"notices":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["code","field","message"]}}},"required":["routeId","deploymentId","providerId","endpointRegion","scope","estimatedCostMicros","currency","executable","reason","source","notices"]}},"workspaceEligibility":{"type":"object","properties":{"billingMode":{"enum":["managed","byok"]},"policyAllowed":{"type":"boolean"},"sufficientBalance":{"type":["boolean","null"]},"hasActiveBillingHold":{"type":"boolean"},"executableCandidateCount":{"type":"integer","minimum":0},"blockers":{"type":"array","items":{"type":"string"}}},"required":["billingMode","policyAllowed","sufficientBalance","hasActiveBillingHold","executableCandidateCount","blockers"]}},"required":["modelId","operation","selectedRouteId","lowestEstimatedCostMicros","recommendedMaxCostMicros","estimateOnly","notices","candidates"]},"BillingPolicy":{"type":"object","properties":{"enabled":{"type":"boolean"},"thresholdMicros":{"type":"integer","minimum":0,"maximum":1000000000000},"amountCents":{"type":"integer","minimum":500,"maximum":999900},"monthlyCapCents":{"type":"integer","minimum":500,"maximum":10000000},"maxAttemptsPerMonth":{"type":"integer","minimum":1,"maximum":10000},"cooldownSeconds":{"type":"integer","minimum":60,"maximum":2678400},"failureLimit":{"type":"integer","minimum":1,"maximum":100},"mandateId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"workspaceId":{"type":"string"},"version":{"type":"integer","minimum":0,"maximum":2147483647},"ownerAuthorityVersion":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["enabled","thresholdMicros","amountCents","monthlyCapCents","maxAttemptsPerMonth","cooldownSeconds","failureLimit","mandateId","workspaceId","version","ownerAuthorityVersion","updatedAt"],"additionalProperties":false},"BillingRechargeAttempt":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string"},"policyVersion":{"type":"integer","minimum":1,"maximum":2147483647},"amountCents":{"type":"integer","minimum":500,"maximum":999900},"feeCents":{"type":"integer","minimum":0,"maximum":999900},"totalChargeCents":{"type":"integer","minimum":500,"maximum":2000000},"feeRateBps":{"enum":[0,290,440]},"admissionMonth":{"type":"string","format":"date"},"status":{"enum":["queued","submitting","unknown","processing","requires_authentication","review","succeeded","failed","cancelled"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"creditedAt":{"type":["string","null"],"format":"date-time"},"failureCode":{"type":["string","null"]}},"required":["id","workspaceId","policyVersion","amountCents","feeCents","totalChargeCents","feeRateBps","admissionMonth","status","createdAt","updatedAt","creditedAt","failureCode"],"additionalProperties":false},"BillingDocument":{"type":"object","properties":{"type":{"enum":["receipt","invoice"]},"id":{"type":"string"},"amountCents":{"type":"integer","minimum":0,"maximum":2147483647},"currency":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":["string","null"],"format":"uri"},"pdfUrl":{"type":["string","null"],"format":"uri"},"orderId":{"type":["string","null"],"format":"uuid"},"rechargeAttemptId":{"type":["string","null"],"format":"uuid"}},"required":["type","id","amountCents","currency","status","createdAt","url","pdfUrl","orderId","rechargeAttemptId"],"additionalProperties":false},"RouteAlias":{"type":"object","properties":{"id":{"type":"string"},"routeId":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}},"required":["id","routeId"],"additionalProperties":false},"RouteFeature":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"Source":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"checkedAt":{"type":"string"},"note":{"type":"string"}},"required":["url","checkedAt"]},"Rate":{"type":"object","properties":{"resolution":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"unit":{"enum":["image","output-second","character-1k","megapixel"]},"usdMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"note":{"type":"string"}},"required":["resolution","unit","usdMicros"],"additionalProperties":false},"PublishedOutputRate":{"type":"object","properties":{"resolution":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"unit":{"enum":["image","output-second","character-1k","megapixel"]},"usdMicros":{"type":"integer","minimum":0,"maximum":9007199254740991},"note":{"type":"string"},"approximate":{"const":true},"quality":{"enum":["auto","low","medium","high","xhigh","max"]}},"required":["resolution","unit","usdMicros"],"additionalProperties":false},"RoutePublishedPricing":{"type":"object","properties":{"summary":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"conditions":{"type":"array","items":{"type":"string"}},"outputRates":{"type":"array","items":{"$ref":"#/components/schemas/PublishedOutputRate"}}},"required":["summary","source","conditions"],"additionalProperties":false},"RoutePricingOperationOverride":{"type":"object","properties":{"resolutions":{"type":"array","items":{"type":"string"}},"durations":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"pricingSource":{"$ref":"#/components/schemas/Source"},"publishedPricing":{"$ref":"#/components/schemas/RoutePublishedPricing"}},"required":[],"additionalProperties":false},"RoutePricing":{"type":"object","properties":{"routeId":{"type":"string"},"modelId":{"type":"string"},"modelName":{"type":"string"},"modality":{"enum":["image","video","audio"]},"deploymentId":{"type":"string"},"providerId":{"type":"string"},"providerName":{"type":"string"},"official":{"type":"boolean"},"endpointRegion":{"type":"string"},"processingScope":{"$ref":"#/components/schemas/DeploymentScope"},"processingRegions":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]},"status":{"enum":["documented","live-verified","retired"]},"liveVerification":{"type":"object","properties":{"checkedAt":{"type":"string"},"operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"operations":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]},"minItems":1},"resolution":{"type":"string"},"duration":{"type":"number","exclusiveMinimum":0}},"required":["checkedAt","operation","resolution"]},"feature":{"$ref":"#/components/schemas/RouteFeature"},"operations":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["text-to-image","image-edit","image-upscale","background-remove","text-to-video","image-to-video","reference-to-video","video-edit","video-extend","text-to-speech"]}},"resolutions":{"type":"array","items":{"type":"string"}},"durations":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"currency":{"const":"USD"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"publishedPricing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RoutePublishedPricing"}]},"pricingSource":{"$ref":"#/components/schemas/Source"},"operationPricing":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RoutePricingOperationOverride"}}},"required":["routeId","modelId","modelName","modality","deploymentId","providerId","providerName","official","endpointRegion","processingScope","processingRegions","status","operations","resolutions","durations","currency","rates","publishedPricing","pricingSource"],"additionalProperties":false},"OwnedAsset":{"type":"object","properties":{"assetKey":{"type":"string"},"state":{"enum":["prepared","uploading","processing","ready","failed","expired","deleted"]},"mediaType":{"type":["string","null"]},"byteLength":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"sha256":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"deletionPending":{"type":"boolean"}},"required":["assetKey","state","mediaType","byteLength","sha256","expiresAt","deletionPending"]},"OwnedAssetListPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OwnedAsset"}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]},"PreparedUpload":{"type":"object","properties":{"key":{"type":"string"},"uploadUrl":{"type":"string","format":"uri"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["key","uploadUrl","headers","expiresAt"]},"ModelDetail":{"type":"object","properties":{"model":{"$ref":"#/components/schemas/CatalogModel"},"series":{"oneOf":[{"$ref":"#/components/schemas/ModelSeries"},{"type":"null"}]},"routes":{"type":"array","items":{"$ref":"#/components/schemas/CatalogRoute"}},"pricing":{"type":"array","items":{"$ref":"#/components/schemas/RoutePricing"}},"deployments":{"type":"array","items":{"type":"object"}}},"required":["model","series","routes","pricing","deployments"]},"WorkspaceAnalytics":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"sampleCount":{"type":"integer","minimum":0},"settledMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"heldMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"unknownAccountingCount":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"attributionTruncated":{"type":"boolean"},"tagsTruncated":{"type":"boolean"},"byKey":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":["string","null"]},"sampleCount":{"type":"integer","minimum":0},"settledMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"heldMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"unknownAccountingCount":{"type":"integer","minimum":0}},"required":["keyId","sampleCount","settledMicros","heldMicros","unknownAccountingCount"]}},"byTag":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"sampleCount":{"type":"integer","minimum":0},"settledMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"heldMicros":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"unknownAccountingCount":{"type":"integer","minimum":0}},"required":["name","value","sampleCount","settledMicros","heldMicros","unknownAccountingCount"]}},"cohorts":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"},"operation":{"type":"string"},"routeId":{"type":"string"},"deploymentId":{"type":"string"},"providerId":{"type":["string","null"]},"endpointRegion":{"type":["string","null"]},"configuration":{"type":"object"},"configurationFingerprint":{"type":"string"},"sampleCount":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0},"unresolved":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"unverifiedDelivery":{"type":"integer","minimum":0},"providerOutcomeLatency":{"type":"object","properties":{"sampleCount":{"type":"integer","minimum":0},"p50Ms":{"type":["number","null"]},"p95Ms":{"type":["number","null"]}},"required":["sampleCount","p50Ms","p95Ms"]},"queueLatency":{"type":["object","null"]},"executionLatency":{"type":["object","null"]},"deliveryLatency":{"type":["object","null"]},"endToEndLatency":{"type":["object","null"]}},"required":["modelId","operation","routeId","deploymentId","providerId","endpointRegion","configuration","configurationFingerprint","sampleCount","succeeded","failed","cancelled","unresolved","delivered","unverifiedDelivery","providerOutcomeLatency","queueLatency","executionLatency","deliveryLatency","endToEndLatency"]}}},"required":["since","until","sampleCount","settledMicros","heldMicros","unknownAccountingCount","truncated","attributionTruncated","tagsTruncated","byKey","byTag","cohorts"]},"WebhookPublicJwk":{"type":"object","properties":{"kty":{"const":"OKP"},"crv":{"const":"Ed25519"},"alg":{"const":"EdDSA"},"use":{"const":"sig"},"kid":{"type":"string"},"x":{"type":"string"}},"required":["kty","crv","alg","use","kid","x"],"additionalProperties":false},"WebhookJwks":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/WebhookPublicJwk"}}},"required":["keys"],"additionalProperties":false},"OutputAsset":{"type":"object","properties":{"outputIndex":{"type":"integer","minimum":0,"maximum":19,"description":"Stable original receipt slot for owned output reuse, independent of this output’s current array position. Use this value with POST /v1/assets ({ source: \"job_output\" }) or MCP upload_asset."},"url":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"fidelity":{"const":"unverified"},"expiresAt":{"type":"string","format":"date-time"},"sha256":{"type":"string"},"byteLength":{"type":"integer","minimum":1},"c2pa":{"type":"object","properties":{"status":{"enum":["trusted","valid","invalid","absent","unknown","unavailable"]},"checkedAt":{"type":"string","format":"date-time"},"sha256":{"type":"string"},"tool":{"const":"c2patool"},"validationCodes":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"manifestLabel":{"type":"string"},"signer":{"type":"string"},"reportSha256":{"type":"string"}},"required":["status","checkedAt","sha256","tool","validationCodes"]}},"required":["url","mediaType","fidelity"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"},"limit":{"type":["number","string"]},"received":{"type":["number","string"]}},"required":["code","field","message"]}}},"required":["code","message"]}},"required":["error"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Workspace-scoped OpenGen API key or configured external resource token. Provider credentials are never OpenGen client credentials."},"browserSession":{"type":"apiKey","in":"cookie","name":"og_session"},"operatorToken":{"type":"http","scheme":"bearer","description":"Privileged installation bootstrap credential. Never expose to customers or anonymous frontend requests."}}}}