{"openapi":"3.1.0","info":{"title":"X Image Splitter API","version":"1"},"servers":[{"url":"https://ximagesplitter.com/api/v1"}],"tags":[{"name":"product","x-displayName":"Product","description":"Public facts about the product: its profile, the Seedream 5.5 image model, generation prices and Credit Packs. No credential needed."},{"name":"generation","x-displayName":"Generation","description":"Start image generations, follow their status, open results in the Image Splitter and manage the Creations they produce."},{"name":"billing","x-displayName":"Billing","description":"Orders, Credit Pack checkout, and management of an existing Subscription, as URLs a person opens to confirm."},{"name":"account","x-displayName":"Account","description":"The signed-in User’s own profile."},{"name":"credits","x-displayName":"Credits","description":"The Credit balance and the history of grants, charges and refunds."},{"name":"uploads","x-displayName":"Uploads","description":"Signed upload URLs for files you use as generation inputs or as an avatar."},{"name":"support","x-displayName":"Support","description":"Support Requests and Refund Requests to the operator."},{"name":"feedback","x-displayName":"Feedback","description":"Posts to the public feedback board."},{"name":"webhooks","x-displayName":"Webhooks","description":"Register, verify and manage the endpoints that receive signed event notifications."}],"paths":{"/product-profile":{"get":{"operationId":"get_product_profile","summary":"Read the Product Profile","description":"The public, machine-readable description of the product, an X multi-image creative toolkit (Image Splitter and Seedream 5.5 image generation): identity, positioning, capabilities, models, pricing and links (docs, legal pages, llms.txt, OpenAPI, MCP, support).","tags":["product"],"security":[{}],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"identity":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"canonicalUrl":{"type":"string","format":"uri"},"logo":{"type":"string","format":"uri"},"previewImage":{"type":"string","format":"uri"},"supportEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"sameAs":{"minItems":1,"type":"array","items":{"type":"string","format":"uri"}}},"required":["canonicalUrl","supportEmail"],"additionalProperties":false},"positioning":{"type":"object","properties":{"audience":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"problemsSolved":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"useCases":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"differentiators":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"mediaTypes":{"minItems":1,"type":"array","items":{"type":"string","enum":["image","video","audio","music"]}},"capabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"useCases":{"type":"array","items":{"type":"string","minLength":1}},"inputs":{"type":"array","items":{"type":"string","minLength":1}},"outputs":{"type":"array","items":{"type":"string","minLength":1}},"constraints":{"type":"array","items":{"type":"string","minLength":1}},"docs":{"type":"array","items":{"type":"string","minLength":1}}},"required":["id","name","summary","useCases","inputs","outputs","constraints"],"additionalProperties":false}},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["seedream-5-5"]},"name":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"provider":{"type":"string","enum":["kie","wavespeed","fal"]},"available":{"type":"boolean"},"defaultOperation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"operations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"outputMediaType":{"type":"string","enum":["image","video","audio","music"]},"prompt":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxLength"],"additionalProperties":false},"negativePromptMaxLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"required":{"type":"boolean"},"conditional":{"type":"boolean"},"maxFiles":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxFileBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mimeTypes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["id","mediaType","role","required","conditional","maxFiles","maxFileBytes"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"values":{"type":"array","items":{"type":["string","number","boolean"]}},"default":{"type":["string","number","boolean"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"conditional":{"type":"boolean"}},"required":["id","conditional"],"additionalProperties":false}},"creditsAtDefaultOptions":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","outputMediaType","prompt","negativePromptMaxLength","inputAssets","options","creditsAtDefaultOptions"],"additionalProperties":false}}},"required":["id","name","mediaType","provider","available","defaultOperation","operations"],"additionalProperties":false}},"pricing":{"type":"object","properties":{"currencies":{"minItems":1,"type":"array","items":{"type":"string","enum":["USD"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["starter","pro","premium"]},"name":{"type":"string","minLength":1},"annualSavingsPercent":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"required":["USD"]},"offers":{"type":"array","items":{"type":"object","properties":{"prices":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]},"creditsGranted":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"id":{"type":"string","minLength":1},"billingCycle":{"type":"string","enum":["monthly","yearly"]}},"required":["prices","creditsGranted","validDays","id","billingCycle"],"additionalProperties":false}}},"required":["id","name","annualSavingsPercent","offers"],"additionalProperties":false}},"creditPacks":{"type":"array","items":{"type":"object","properties":{"prices":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]},"creditsGranted":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"discountPercent":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]}},"required":["prices","creditsGranted","validDays","discountPercent"],"additionalProperties":false}},"promptImprovementCredits":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["currencies","plans","creditPacks","promptImprovementCredits"],"additionalProperties":false},"links":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","format":"uri"}}},"required":["schemaVersion","identity","positioning","mediaTypes","capabilities","models","pricing","links"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models":{"get":{"operationId":"list_available_models","summary":"List generation models","description":"Every image model on offer (Seedream 5.5) with its Operations, prompt and input limits, options and default price. `available` is false while its Model Provider is not configured in this deployment.","tags":["generation"],"security":[{}],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["seedream-5-5"]},"name":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"provider":{"type":"string","enum":["kie","wavespeed","fal"]},"available":{"type":"boolean"},"defaultOperation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"operations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"outputMediaType":{"type":"string","enum":["image","video","audio","music"]},"prompt":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxLength"],"additionalProperties":false},"negativePromptMaxLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"required":{"type":"boolean"},"conditional":{"type":"boolean"},"maxFiles":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxFileBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mimeTypes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["id","mediaType","role","required","conditional","maxFiles","maxFileBytes"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"values":{"type":"array","items":{"type":["string","number","boolean"]}},"default":{"type":["string","number","boolean"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"conditional":{"type":"boolean"}},"required":["id","conditional"],"additionalProperties":false}},"creditsAtDefaultOptions":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","outputMediaType","prompt","negativePromptMaxLength","inputAssets","options","creditsAtDefaultOptions"],"additionalProperties":false}}},"required":["id","name","mediaType","provider","available","defaultOperation","operations"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models/{modelId}":{"get":{"operationId":"get_model_capabilities","summary":"Read one model","description":"One model's Operations, prompt limits, input assets and options, as `list_available_models` lists them.","tags":["generation"],"security":[{}],"parameters":[{"in":"path","name":"modelId","schema":{"type":"string","enum":["seedream-5-5"]},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","enum":["seedream-5-5"]},"name":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"provider":{"type":"string","enum":["kie","wavespeed","fal"]},"available":{"type":"boolean"},"defaultOperation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"operations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"outputMediaType":{"type":"string","enum":["image","video","audio","music"]},"prompt":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxLength"],"additionalProperties":false},"negativePromptMaxLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"required":{"type":"boolean"},"conditional":{"type":"boolean"},"maxFiles":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxFileBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mimeTypes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["id","mediaType","role","required","conditional","maxFiles","maxFileBytes"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"values":{"type":"array","items":{"type":["string","number","boolean"]}},"default":{"type":["string","number","boolean"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"conditional":{"type":"boolean"}},"required":["id","conditional"],"additionalProperties":false}},"creditsAtDefaultOptions":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","outputMediaType","prompt","negativePromptMaxLength","inputAssets","options","creditsAtDefaultOptions"],"additionalProperties":false}}},"required":["id","name","mediaType","provider","available","defaultOperation","operations"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/estimate":{"post":{"operationId":"estimate_generation_cost","summary":"Estimate the Credits of a generation","description":"The Credits a generation would cost, from the same pricing resolver that charges it. Pass the input assets by role only. Nothing is charged or started.","tags":["generation"],"security":[{}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelKey":{"type":"string","enum":["seedream-5-5"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"prompt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]}},"required":["role"],"additionalProperties":false}}},"required":["modelKey","operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"appCredits":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["appCredits"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pricing":{"get":{"operationId":"get_pricing","summary":"Read Credit Packs and Credit prices","description":"The one-time Credit Packs on sale, priced explicitly per currency in minor units, with the Credits each grants and how long they stay valid, plus the Improve Prompt price. `plans` lists Subscription Plans only while they are on sale; it is empty now. Generation prices per request come from estimate_generation_cost.","tags":["billing"],"security":[{}],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"currencies":{"minItems":1,"type":"array","items":{"type":"string","enum":["USD"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["starter","pro","premium"]},"name":{"type":"string","minLength":1},"annualSavingsPercent":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"required":["USD"]},"offers":{"type":"array","items":{"type":"object","properties":{"prices":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]},"creditsGranted":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"id":{"type":"string","minLength":1},"billingCycle":{"type":"string","enum":["monthly","yearly"]}},"required":["prices","creditsGranted","validDays","id","billingCycle"],"additionalProperties":false}}},"required":["id","name","annualSavingsPercent","offers"],"additionalProperties":false}},"creditPacks":{"type":"array","items":{"type":"object","properties":{"prices":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]},"creditsGranted":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"discountPercent":{"type":"object","propertyNames":{"type":"string","enum":["USD"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["USD"]}},"required":["prices","creditsGranted","validDays","discountPercent"],"additionalProperties":false}},"promptImprovementCredits":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["currencies","plans","creditPacks","promptImprovementCredits"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account/profile":{"get":{"operationId":"get_account_profile","summary":"Read the account profile","description":"The caller's own name, email and avatar URL.","tags":["account"],"security":[{"apiKey":[]},{"oauth2":["profile:read"]}],"x-required-scopes":["profile:read"],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"image":{"type":["string","null"]},"name":{"type":"string"}},"required":["email","image","name"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_account_profile","summary":"Rename the account or change its avatar","description":"Sets the display name and, when given, the avatar: a permanent https URL from create_upload_target with the profile-image target, or an empty string to clear it.","tags":["account"],"security":[{"apiKey":[]},{"oauth2":["profile:write"]}],"x-required-scopes":["profile:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"image":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"responses":{"204":{"description":"Done.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/balance":{"get":{"operationId":"get_credit_balance","summary":"Read the Credit balance","description":"The Credits the caller can spend right now.","tags":["credits"],"security":[{"apiKey":[]},{"oauth2":["credits:read"]}],"x-required-scopes":["credits:read"],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"remainingCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["remainingCredits"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/history":{"get":{"operationId":"get_credit_history","summary":"List Credit history","description":"Grants, consumption and refunds, newest first. `credits` is signed: `+` for a grant, `-` for consumption.","tags":["credits"],"security":[{"apiKey":[]},{"oauth2":["credits:read"]}],"x-required-scopes":["credits:read"],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"transactionNo":{"type":"string"},"transactionType":{"type":"string","enum":["consume","grant"]},"source":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"purchase"},"product":{"type":"object","properties":{"kind":{"type":"string","const":"plan"},"offerId":{"type":"string"},"planId":{"type":"string","enum":["starter","pro","premium"]},"billingCycle":{"type":"string","enum":["monthly","yearly"]}},"required":["kind","offerId","planId","billingCycle"],"additionalProperties":false}},"required":["kind","product"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"grant_reason"},"reason":{"type":"string","enum":["credit_pack_purchase","admin_grant"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"consumption_scene"},"scene":{"type":"string"}},"required":["kind","scene"],"additionalProperties":false}],"type":"object"},{"type":"null"}]},"refundedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"credits":{"type":"string"},"activatesAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["transactionNo","transactionType","source","refundedAt","credits","activatesAt","expiresAt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations":{"post":{"operationId":"create_generation","summary":"Start a generation","description":"Starts one Generation Job and charges its Credits when accepted. Inputs are public https URLs: a `publicUrl` from create_upload_target, or any public https URL. A failed generation refunds its Credits.\n\nAsynchronous: Returns at once with the `creationId`; poll get_generation_status until `status` is `succeeded` or `failed`.\n\nSend an `Idempotency-Key` to make retries safe: the same key with the same body returns the first result, with a different body 409.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["generations:write"]}],"x-required-scopes":["generations:write"],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"description":"A client key, unique per request.","type":"string","minLength":1,"maxLength":255},"description":"A client key, unique per request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"image"},"modelKey":{"type":"string","enum":["seedream-5-5"]},"prompt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1}},"required":["slotId","url"],"additionalProperties":false}},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"operation":{"type":"string","enum":["text-to-image","image-to-image"]},"negativePrompt":{"type":"string","minLength":1}},"required":["mode","modelKey","prompt","assets","options","operation"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"video"},"modelKey":{"type":"string","enum":["seedream-5-5"]},"prompt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1}},"required":["slotId","url"],"additionalProperties":false}},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"operation":{"type":"string","enum":["text-to-video","image-to-video","video-to-video"]},"negativePrompt":{"type":"string","minLength":1}},"required":["mode","modelKey","prompt","assets","options","operation"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"audio"},"modelKey":{"type":"string","enum":["seedream-5-5"]},"prompt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"slotId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1}},"required":["slotId","url"],"additionalProperties":false}},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"operation":{"type":"string","enum":["text-to-audio"]}},"required":["mode","modelKey","prompt","assets","options","operation"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"music"},"modelKey":{"type":"string","enum":["seedream-5-5"]},"prompt":{"type":"string"},"assets":{"type":"array","prefixItems":[],"items":false,"maxItems":0},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"operation":{"type":"string","enum":["text-to-music"]}},"required":["mode","modelKey","prompt","assets","options","operation"],"additionalProperties":false}],"type":"object"},"originalPrompt":{"type":"string","minLength":1}},"required":["submission"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string"},"status":{"type":"string","enum":["generating","succeeded","failed"]},"remainingCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["creationId","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency Key was used with a different request.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"list_generation_jobs","summary":"List generations","description":"The caller’s generations, newest first, with their status.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["generations:read"]}],"x-required-scopes":["generations:read"],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"creationId":{"type":"string"},"status":{"type":"string","enum":["generating","succeeded","failed"]},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"modelKey":{"type":"string","enum":["nano-banana-2","nano-banana-2-lite","nano-banana-pro","nano-banana","seedream-5-0-lite","seedream-4-5","seedance-2","seedance-2-fast","seedance-1-5-pro","kling-3-0","veo-3-1","seed-audio-1-0","elevenlabs-tts-multilingual-v2","elevenlabs-tts-turbo-2-5","suno-music-v6","minimax-h3","seedream-5-5"]},"modelFamily":{"type":"string"},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"optionValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slotId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","exclusiveMinimum":0},"referenceName":{"type":"string","minLength":1,"maxLength":60}},"required":["id","slotId","type","role","url"],"additionalProperties":false}},"outputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false}},"primaryOutput":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false},{"type":"null"}]},"aspectRatio":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"resolution":{"type":["string","null"]},"recreatable":{"type":"boolean"},"createdAt":{"type":"string"},"isReadyForPreview":{"type":"boolean"},"shared":{"type":"boolean"},"originalPrompt":{"type":["string","null"]}},"required":["creationId","status","mediaType","operation","modelKey","modelFamily","prompt","negativePrompt","optionValues","primaryOutput","aspectRatio","durationSeconds","resolution","recreatable","createdAt","isReadyForPreview","shared","originalPrompt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/{creationId}":{"get":{"operationId":"get_generation_status","summary":"Read a generation","description":"The status of one of the caller’s generations and, once `succeeded`, its outputs with a `splitterLinks` URL per image that opens it in the Image Splitter.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["generations:read"]}],"x-required-scopes":["generations:read"],"parameters":[{"in":"path","name":"creationId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string"},"status":{"type":"string","enum":["generating","succeeded","failed"]},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"modelKey":{"type":"string","enum":["nano-banana-2","nano-banana-2-lite","nano-banana-pro","nano-banana","seedream-5-0-lite","seedream-4-5","seedance-2","seedance-2-fast","seedance-1-5-pro","kling-3-0","veo-3-1","seed-audio-1-0","elevenlabs-tts-multilingual-v2","elevenlabs-tts-turbo-2-5","suno-music-v6","minimax-h3","seedream-5-5"]},"modelFamily":{"type":"string"},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"optionValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slotId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","exclusiveMinimum":0},"referenceName":{"type":"string","minLength":1,"maxLength":60}},"required":["id","slotId","type","role","url"],"additionalProperties":false}},"outputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false}},"primaryOutput":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false},{"type":"null"}]},"aspectRatio":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"resolution":{"type":["string","null"]},"recreatable":{"type":"boolean"},"createdAt":{"type":"string"},"isReadyForPreview":{"type":"boolean"},"shared":{"type":"boolean"},"originalPrompt":{"type":["string","null"]},"splitterLinks":{"type":"array","items":{"type":"object","properties":{"output":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"}},"required":["output","url"],"additionalProperties":false}}},"required":["creationId","status","mediaType","operation","modelKey","modelFamily","prompt","negativePrompt","optionValues","primaryOutput","aspectRatio","durationSeconds","resolution","recreatable","createdAt","isReadyForPreview","shared","originalPrompt","splitterLinks"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/creations":{"get":{"operationId":"list_creations","summary":"List Creations","description":"The caller’s Creations, newest first.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:read"]}],"x-required-scopes":["creations:read"],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"creationId":{"type":"string"},"status":{"type":"string","enum":["generating","succeeded","failed"]},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"modelKey":{"type":"string","enum":["nano-banana-2","nano-banana-2-lite","nano-banana-pro","nano-banana","seedream-5-0-lite","seedream-4-5","seedance-2","seedance-2-fast","seedance-1-5-pro","kling-3-0","veo-3-1","seed-audio-1-0","elevenlabs-tts-multilingual-v2","elevenlabs-tts-turbo-2-5","suno-music-v6","minimax-h3","seedream-5-5"]},"modelFamily":{"type":"string"},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"optionValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slotId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","exclusiveMinimum":0},"referenceName":{"type":"string","minLength":1,"maxLength":60}},"required":["id","slotId","type","role","url"],"additionalProperties":false}},"outputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false}},"primaryOutput":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false},{"type":"null"}]},"aspectRatio":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"resolution":{"type":["string","null"]},"recreatable":{"type":"boolean"},"createdAt":{"type":"string"},"isReadyForPreview":{"type":"boolean"},"shared":{"type":"boolean"},"originalPrompt":{"type":["string","null"]}},"required":["creationId","status","mediaType","operation","modelKey","modelFamily","prompt","negativePrompt","optionValues","primaryOutput","aspectRatio","durationSeconds","resolution","recreatable","createdAt","isReadyForPreview","shared","originalPrompt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/creations/{creationId}":{"get":{"operationId":"get_creation","summary":"Read a Creation","description":"One of the caller’s Creations with its inputs and outputs, and a `splitterLinks` URL per image that opens it in the Image Splitter.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:read"]}],"x-required-scopes":["creations:read"],"parameters":[{"in":"path","name":"creationId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"creationId":{"type":"string"},"status":{"type":"string","enum":["generating","succeeded","failed"]},"mediaType":{"type":"string","enum":["image","video","audio","music"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"modelKey":{"type":"string","enum":["nano-banana-2","nano-banana-2-lite","nano-banana-pro","nano-banana","seedream-5-0-lite","seedream-4-5","seedance-2","seedance-2-fast","seedance-1-5-pro","kling-3-0","veo-3-1","seed-audio-1-0","elevenlabs-tts-multilingual-v2","elevenlabs-tts-turbo-2-5","suno-music-v6","minimax-h3","seedream-5-5"]},"modelFamily":{"type":"string"},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"optionValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"inputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slotId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio"]},"role":{"type":"string","enum":["source","reference","first-frame","last-frame","mask","reference-image","reference-video","reference-audio","soundtrack"]},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","exclusiveMinimum":0},"referenceName":{"type":"string","minLength":1,"maxLength":60}},"required":["id","slotId","type","role","url"],"additionalProperties":false}},"outputAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false}},"primaryOutput":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","audio","music"]},"url":{"type":"string","format":"uri"},"isPrimary":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":0},"hasAudio":{"type":"boolean"},"storageKey":{"type":"string","minLength":1}},"required":["id","type","url","isPrimary"],"additionalProperties":false},{"type":"null"}]},"aspectRatio":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"resolution":{"type":["string","null"]},"recreatable":{"type":"boolean"},"createdAt":{"type":"string"},"isReadyForPreview":{"type":"boolean"},"shared":{"type":"boolean"},"originalPrompt":{"type":["string","null"]},"splitterLinks":{"type":"array","items":{"type":"object","properties":{"output":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"}},"required":["output","url"],"additionalProperties":false}}},"required":["creationId","status","mediaType","operation","modelKey","modelFamily","prompt","negativePrompt","optionValues","primaryOutput","aspectRatio","durationSeconds","resolution","recreatable","createdAt","isReadyForPreview","shared","originalPrompt","splitterLinks"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_creation","summary":"Delete a Creation","description":"Removes one of the caller’s Creations from their library and its Share Link. Credits are not refunded.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:write"]}],"x-required-scopes":["creations:write"],"parameters":[{"in":"path","name":"creationId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"removedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["removedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/creations/{creationId}/sharing":{"patch":{"operationId":"update_creation_sharing","summary":"Turn a Creation’s Share Link on or off","description":"With `shared: true` anyone with the Share Link sees the outputs (never the prompt, inputs or owner).","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:write"]}],"x-required-scopes":["creations:write"],"parameters":[{"in":"path","name":"creationId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shared":{"type":"boolean"}},"required":["shared"],"additionalProperties":false}}}},"responses":{"204":{"description":"Done.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/prompt-improvements":{"post":{"operationId":"improve_prompt","summary":"Improve an image prompt (1 Credit)","description":"Returns a suggested rewrite of an image prompt for the given composition (`x-carousel` or `general`). Costs 1 Credit, charged only when a valid suggestion is returned; a failed request charges nothing. With an Idempotency Key a retry replays the first suggestion without a second charge. Nothing is generated.\n\nSend an `Idempotency-Key` to make retries safe: the same key with the same body returns the first result, with a different body 409.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["generations:write"]}],"x-required-scopes":["generations:write"],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"description":"A client key, unique per request.","type":"string","minLength":1,"maxLength":255},"description":"A client key, unique per request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":3000},"composition":{"type":"string","enum":["x-carousel","general"]}},"required":["prompt","composition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"chargedCredits":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["prompt","chargedCredits"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency Key was used with a different request.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/images":{"get":{"operationId":"list_image_assets","summary":"List saved reference images","description":"The caller’s saved reference images (uploaded for earlier generations), newest first. Each `url` can be passed again as a generation reference.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:read"]}],"x-required-scopes":["creations:read"],"parameters":[{"in":"query","name":"page","schema":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","url","mimeType","createdAt"],"additionalProperties":false}},"nextPage":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["items","nextPage"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/images/{assetId}":{"delete":{"operationId":"delete_image_asset","summary":"Delete a saved reference image","description":"Removes one image from the caller’s saved reference images. Past Creations that used it keep showing it.","tags":["generation"],"security":[{"apiKey":[]},{"oauth2":["creations:write"]}],"x-required-scopes":["creations:write"],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"204":{"description":"Done.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads":{"post":{"operationId":"create_upload_target","summary":"Get a signed upload URL","description":"A presigned URL for one file into the target: `PUT` the bytes to `signedUrl` with `Content-Type` set to `mimeType` and `Content-Length` to `sizeBytes`, within minutes. Then pass `publicUrl`, which is permanent, as a generation input or avatar. A file already at a public https URL needs no upload: pass that URL directly.","tags":["uploads"],"security":[{"apiKey":[]},{"oauth2":["uploads:write"]}],"x-required-scopes":["uploads:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"profile-image"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image-splitter"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation-slot"},"modelId":{"type":"string","enum":["seedream-5-5"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"slotId":{"type":"string","minLength":1}},"required":["kind","modelId","operation","slotId"],"additionalProperties":false}],"type":"object"}},"required":["fileName","mimeType","sizeBytes","target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"signedUrl":{"type":"string","format":"uri"},"publicUrl":{"type":"string","format":"uri"}},"required":["key","signedUrl","publicUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/status":{"post":{"operationId":"get_upload_status","summary":"Check that an upload landed","description":"Whether the object behind a `key` from create_upload_target exists, with its size and type. A read: it sends the target in the body because the target is structured.","tags":["uploads"],"security":[{"apiKey":[]},{"oauth2":["uploads:read"]}],"x-required-scopes":["uploads:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"profile-image"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image-splitter"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation-slot"},"modelId":{"type":"string","enum":["seedream-5-5"]},"operation":{"type":"string","enum":["text-to-image","image-to-image","text-to-video","image-to-video","video-to-video","text-to-audio","text-to-music"]},"slotId":{"type":"string","minLength":1}},"required":["kind","modelId","operation","slotId"],"additionalProperties":false}],"type":"object"}},"required":["key","target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"exists":{"type":"boolean","const":false}},"required":["exists"],"additionalProperties":false},{"type":"object","properties":{"exists":{"type":"boolean","const":true},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentType":{"type":["string","null"]}},"required":["exists","size","contentType"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/checkout":{"post":{"operationId":"create_checkout","summary":"Start a checkout","description":"Creates an Order for a one-time Credit Pack and returns `checkout_url`, the page where the human pays: Stripe’s hosted Checkout, or for PayPal our page hosting PayPal’s approval for that Order. Opening it charges nothing; Credits arrive only after the payment provider confirms the payment. Plans are not on sale, so a Plan selection is refused.\n\nSend an `Idempotency-Key` to make retries safe: the same key with the same body returns the first result, with a different body 409.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:write"]}],"x-required-scopes":["billing:write"],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"description":"A client key, unique per request.","type":"string","minLength":1,"maxLength":255},"description":"A client key, unique per request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerCode":{"type":"string","enum":["stripe","paypal"]},"selection":{"oneOf":[{"type":"object","properties":{"planId":{"type":"string","enum":["starter","pro","premium"]},"billingCycle":{"type":"string","enum":["monthly","yearly"]},"purchaseKind":{"type":"string","const":"plan"}},"required":["planId","billingCycle","purchaseKind"],"additionalProperties":false},{"type":"object","properties":{"purchaseKind":{"type":"string","const":"credit_pack"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["purchaseKind","credits"],"additionalProperties":false}],"type":"object"}},"required":["providerCode","selection"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe","paypal"]},"checkout_url":{"type":"string","format":"uri"},"order_no":{"type":"string"}},"required":["provider","checkout_url","order_no"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency Key was used with a different request.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/orders":{"get":{"operationId":"list_orders","summary":"List Orders","description":"The caller’s Orders, newest first.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:read"]}],"x-required-scopes":["billing:read"],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"orderNo":{"type":"string"},"status":{"type":"string","enum":["canceled","checkout_created","checkout_failed","completed","created","expired","replaced"]},"purchaseKind":{"type":"string","enum":["plan","credit_pack"]},"offerId":{"type":["string","null"]},"packCredits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"providerCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["orderNo","status","purchaseKind","offerId","packCredits","amount","currency","providerCode","createdAt","completedAt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/orders/{orderNo}":{"get":{"operationId":"get_order","summary":"Read an Order","description":"One of the caller’s Orders.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:read"]}],"x-required-scopes":["billing:read"],"parameters":[{"in":"path","name":"orderNo","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"orderNo":{"type":"string"},"status":{"type":"string","enum":["canceled","checkout_created","checkout_failed","completed","created","expired","replaced"]},"purchaseKind":{"type":"string","enum":["plan","credit_pack"]},"offerId":{"type":["string","null"]},"packCredits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"providerCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["orderNo","status","purchaseKind","offerId","packCredits","amount","currency","providerCode","createdAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/subscription":{"get":{"operationId":"get_subscription","summary":"Read the current Subscription","description":"The caller’s current Subscription, or `null` when they have none.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:read"]}],"x-required-scopes":["billing:read"],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"anyOf":[{"type":"object","properties":{"subscriptionNo":{"type":"string"},"providerCode":{"type":"string"},"planId":{"anyOf":[{"type":"string","enum":["starter","pro","premium"]},{"type":"null"}]},"billingCycle":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]},"providerStatus":{"type":"string"},"lifecycleStatus":{"type":"string","enum":["active","canceled","cancellation_scheduled","expired","incomplete","past_due","unpaid"]},"willRenew":{"type":"boolean"},"nextRenewalAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pendingPlanChange":{"anyOf":[{"type":"object","properties":{"planId":{"type":"string","enum":["starter","pro","premium"]},"billingCycle":{"type":"string","enum":["monthly","yearly"]},"effectiveAt":{"type":"string","format":"date-time"}},"required":["planId","billingCycle","effectiveAt"],"additionalProperties":false},{"type":"null"}]},"currency":{"type":["string","null"]},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"billingPortalAvailable":{"type":"boolean"}},"required":["subscriptionNo","providerCode","planId","billingCycle","providerStatus","lifecycleStatus","willRenew","nextRenewalAt","scheduledEndAt","pendingPlanChange","currency","currentPeriodEnd","billingPortalAvailable"],"additionalProperties":false},{"type":"null"}]}},"required":["subscription"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/subscription/change":{"post":{"operationId":"change_subscription","summary":"Get a URL to change the Plan","description":"Returns a URL where the human confirms moving their current Subscription to another Plan or cycle; nothing changes until they do. The Subscription’s own provider decides the page: Stripe’s Billing Portal, or our confirmation page for PayPal, where the change applies from the next cycle. No Subscription answers 404; a change the provider cannot make answers 400 or 422 with `details.reason`.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:write"]}],"x-required-scopes":["billing:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string","enum":["starter","pro","premium"]},"billingCycle":{"type":"string","enum":["monthly","yearly"]}},"required":["planId","billingCycle"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe","paypal"]},"url":{"type":"string","format":"uri"}},"required":["provider","url"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/subscription/cancel":{"post":{"operationId":"cancel_subscription","summary":"Get a URL to cancel the Subscription","description":"Returns a URL where the human confirms cancelling their current Subscription; nothing changes until they do. Stripe opens its Billing Portal; PayPal opens our confirmation page, and PayPal ends the Subscription at once once confirmed. No Subscription answers 404.","tags":["billing"],"security":[{"apiKey":[]},{"oauth2":["billing:write"]}],"x-required-scopes":["billing:write"],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe","paypal"]},"url":{"type":"string","format":"uri"}},"required":["provider","url"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/refund-requests":{"post":{"operationId":"submit_refund_request","summary":"Ask for a refund","description":"Records a Refund Request for one of the caller’s paid Invoices for the operator to handle. It moves no money; follow it with get_refund_status.\n\nSend an `Idempotency-Key` to make retries safe: the same key with the same body returns the first result, with a different body 409.","tags":["support"],"security":[{"apiKey":[]},{"oauth2":["support:write"]}],"x-required-scopes":["support:write"],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"description":"A client key, unique per request.","type":"string","minLength":1,"maxLength":255},"description":"A client key, unique per request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":10,"maxLength":5000},"invoiceNo":{"type":"string","minLength":1}},"required":["message","invoiceNo"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["general","refund"]},"status":{"type":"string","enum":["open","resolved","declined"]},"invoiceNo":{"type":["string","null"]},"message":{"type":"string"},"userResponse":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","kind","status","invoiceNo","message","userResponse","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency Key was used with a different request.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/requests":{"post":{"operationId":"create_support_request","summary":"Write to the operator","description":"Sends the operator a question or problem report; the reply is emailed to the caller.\n\nSend an `Idempotency-Key` to make retries safe: the same key with the same body returns the first result, with a different body 409.","tags":["support"],"security":[{"apiKey":[]},{"oauth2":["support:write"]}],"x-required-scopes":["support:write"],"parameters":[{"in":"header","name":"Idempotency-Key","schema":{"description":"A client key, unique per request.","type":"string","minLength":1,"maxLength":255},"description":"A client key, unique per request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":10,"maxLength":5000}},"required":["message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["general","refund"]},"status":{"type":"string","enum":["open","resolved","declined"]},"invoiceNo":{"type":["string","null"]},"message":{"type":"string"},"userResponse":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","kind","status","invoiceNo","message","userResponse","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency Key was used with a different request.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/support/requests/{requestId}/refund-status":{"get":{"operationId":"get_refund_status","summary":"Read a refund’s status","description":"The handling status of a Refund Request and, separately, how much money the payment provider actually returned: `none`, `pending`, `partial`, `full` or `not_returned`.","tags":["support"],"security":[{"apiKey":[]},{"oauth2":["support:read"]}],"x-required-scopes":["support:read"],"parameters":[{"in":"path","name":"requestId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"requestStatus":{"type":"string","enum":["open","resolved","declined"]},"refundStatus":{"type":"string","enum":["none","pending","partial","full","not_returned"]}},"required":["requestStatus","refundStatus"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/feedback":{"post":{"operationId":"submit_feedback","summary":"Post an idea or a problem to the feedback board","description":"Creates a feedback board post. A public post is visible to everyone; titles are unique on the board.","tags":["feedback"],"security":[{"apiKey":[]},{"oauth2":["support:write"]}],"x-required-scopes":["support:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":20000},"category":{"type":"string"},"isPublic":{"type":"boolean"}},"required":["title","description","category","isPublic"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"}},"required":["id","code"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/endpoints":{"get":{"operationId":"list_webhook_endpoints","summary":"List Webhook Endpoints","description":"The caller’s Webhook Endpoints. Secrets never appear.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}],"x-required-scopes":["webhooks:read"],"parameters":[],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_webhook_endpoint","summary":"Register a Webhook Endpoint","description":"Registers a public https URL for the chosen event types. It receives nothing until verify_webhook_endpoint succeeds. The plaintext `secret` (`whsec_…`) appears only in this response and can never be read again; store it now to verify deliveries.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"x-required-scopes":["webhooks:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"eventTypes":{"minItems":1,"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}}},"required":["url","eventTypes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false},"secret":{"type":"string"}},"required":["endpoint","secret"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/endpoints/{endpointId}":{"get":{"operationId":"get_webhook_endpoint","summary":"Read a Webhook Endpoint","description":"One of the caller’s Webhook Endpoints. The secret never appears.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}],"x-required-scopes":["webhooks:read"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_webhook_endpoint_event_types","summary":"Change an endpoint’s event types","description":"Replaces the event types one Webhook Endpoint receives.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"x-required-scopes":["webhooks:write"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventTypes":{"minItems":1,"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}}},"required":["eventTypes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_webhook_endpoint","summary":"Delete a Webhook Endpoint","description":"Deletes one Webhook Endpoint; it receives nothing more.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"x-required-scopes":["webhooks:write"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"204":{"description":"Done.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/endpoints/{endpointId}/deliveries":{"get":{"operationId":"list_webhook_endpoint_deliveries","summary":"List an endpoint’s deliveries","description":"Recent deliveries to one Webhook Endpoint, newest first, with their state and last response status.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}],"x-required-scopes":["webhooks:read"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"type":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]},"state":{"type":"string","enum":["pending","enqueued","delivering","delivered","retry_scheduled","failed"]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastStatusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"nextAttemptAt":{"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))$"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","eventId","type","state","attempt","lastStatusCode","nextAttemptAt","createdAt","updatedAt"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/endpoints/{endpointId}/rotate-secret":{"post":{"operationId":"rotate_webhook_endpoint_secret","summary":"Rotate an endpoint’s signing secret","description":"Replaces the signing secret of one Webhook Endpoint. The plaintext `secret` (`whsec_…`) appears only in this response and can never be read again; store it now to verify deliveries.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"x-required-scopes":["webhooks:write"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false},"secret":{"type":"string"}},"required":["endpoint","secret"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/endpoints/{endpointId}/verify":{"post":{"operationId":"verify_webhook_endpoint","summary":"Verify a Webhook Endpoint","description":"Sends a signed `webhook.verification` challenge to an unverified endpoint, which must echo it back; on success the endpoint becomes active. A failure answers 400 with `details.reason`.","tags":["webhooks"],"security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}],"x-required-scopes":["webhooks:write"],"parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Success.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["generation.queued","generation.completed","generation.failed","credits.updated","billing.payment_succeeded","subscription.updated","support_request.updated"]}},"status":{"type":"string","enum":["unverified","active","disabled"]},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","url","eventTypes","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input; `details.issues` names each field.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or refused credential; see `WWW-Authenticate`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential lacks the required Scope (`insufficient_scope`).","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, including another User’s resource.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see `Retry-After`.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error; the message never names a cause.","headers":{"x-request-id":{"description":"Server-generated id of this request; quote it to support.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"A stable `ErrorCode`."},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"description":"Deliberately public facts about the failure, such as invalid fields."}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API Key the User creates in account settings, sent as `Authorization: Bearer <key>`. It holds the Scopes chosen at creation."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 authorization code with PKCE (S256) for a Connected App; request the token for this API as the `resource`.","flows":{"authorizationCode":{"authorizationUrl":"https://ximagesplitter.com/api/auth/oauth2/authorize","tokenUrl":"https://ximagesplitter.com/api/auth/oauth2/token","scopes":{"profile:read":"See your name and email","profile:write":"Change your profile","credits:read":"See your credit balance","generations:read":"See your generations","generations:write":"Start generations that spend your credits","creations:read":"See your saved creations","creations:write":"Change and delete your creations","uploads:read":"See the files you uploaded","uploads:write":"Upload files to your account","billing:read":"See your orders, invoices and any existing subscription","billing:write":"Start Credit Pack purchases for you to complete","support:read":"See your support requests","support:write":"Send support requests for you","webhooks:read":"See your webhook endpoints and their deliveries","webhooks:write":"Add, change and remove webhook endpoints that receive your account events"}}}}}}}