{"openapi":"3.1.0","info":{"title":"Stability AI via Locus MPP","version":"1.0.0","description":"Generative AI platform for images, 3D models, and audio — text-to-image, editing, upscaling, and more.","contact":{"email":"api@paywithlocus.com"},"x-guidance":"Use the documented POST operations for Stability AI. Send JSON matching each requestBody schema. Unpaid public x402 requests return an x402 v2 payment challenge; retry the same body with PAYMENT-SIGNATURE and the returned x-locus-request-id."},"x-agentcash-guidance":{"llmsTxtUrl":"https://paywithlocus.com/mpp/stability-ai.md"},"x-service-info":{"categories":["ai","media"],"docs":{"homepage":"https://stability.ai","apiReference":"https://platform.stability.ai/docs/api-reference","llms":"https://paywithlocus.com/mpp/stability-ai.md"}},"paths":{"/stability-ai/generate-ultra":{"post":{"operationId":"stability_ai_generate_ultra","summary":"Generate Ultra","description":"Stable Image Ultra — highest quality text-to-image generation.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"92000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.092"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text prompt"},"negative_prompt":{"type":"string","description":"Things to exclude from the image"},"aspect_ratio":{"type":"string","description":"Output aspect ratio: 21:9|16:9|3:2|5:4|1:1|4:5|2:3|9:16 (default 1:1)"},"output_format":{"type":"string","description":"jpeg|png|webp (default jpeg)"},"seed":{"type":"number","description":"Random seed"},"style_preset":{"type":"string","description":"Style preset (e.g. photographic, digital-art, cinematic)"},"image":{"type":"string","description":"Input image for img2img (requires strength) Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"strength":{"type":"number","description":"img2img influence 0–1"}},"required":["prompt"],"additionalProperties":true},"example":{"prompt":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/generate-core":{"post":{"operationId":"stability_ai_generate_core","summary":"Generate Core","description":"Stable Image Core — fast, high-quality text-to-image generation.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"34000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text prompt"},"negative_prompt":{"type":"string","description":"Things to exclude from the image"},"aspect_ratio":{"type":"string","description":"Output aspect ratio: 21:9|16:9|3:2|5:4|1:1|4:5|2:3|9:16 (default 1:1)"},"output_format":{"type":"string","description":"jpeg|png|webp (default jpeg)"},"seed":{"type":"number","description":"Random seed"},"style_preset":{"type":"string","description":"Style preset (e.g. photographic, digital-art)"}},"required":["prompt"],"additionalProperties":true},"example":{"prompt":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/generate-sd3":{"post":{"operationId":"stability_ai_generate_sd3","summary":"Generate SD3","description":"Stable Diffusion 3.5 family — choose model for quality/speed/cost balance.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.029–$0.075 (model-dependent)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text prompt"},"model":{"type":"string","description":"sd3.5-large ($0.075) | sd3.5-large-turbo ($0.046) | sd3.5-medium ($0.040) | sd3.5-flash ($0.029) — default sd3.5-medium"},"mode":{"type":"string","description":"text-to-image (default) | image-to-image"},"image":{"type":"string","description":"Input image for image-to-image mode Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"strength":{"type":"number","description":"img2img influence 0–1"},"negative_prompt":{"type":"string","description":"Things to exclude from the image"},"aspect_ratio":{"type":"string","description":"Output aspect ratio (default 1:1)"},"cfg_scale":{"type":"number","description":"Classifier-free guidance scale"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["prompt"],"additionalProperties":true},"example":{"prompt":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/erase":{"post":{"operationId":"stability_ai_erase","summary":"Erase","description":"Remove objects from an image using a mask.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"mask":{"type":"string","description":"Mask image (white = erase) Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"grow_mask":{"type":"number","description":"Expand mask by N pixels"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","mask":"<mask png base64: supply valid media bytes>","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/inpaint":{"post":{"operationId":"stability_ai_inpaint","summary":"Inpaint","description":"Fill a masked region with AI-generated content guided by a prompt.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Fill prompt"},"mask":{"type":"string","description":"Mask image (white = fill) Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"negative_prompt":{"type":"string","description":"Things to exclude"},"grow_mask":{"type":"number","description":"Expand mask by N pixels"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","mask":"<mask png base64: supply valid media bytes>","prompt":"clean purple background","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/outpaint":{"post":{"operationId":"stability_ai_outpaint","summary":"Outpaint","description":"Extend image borders by generating new content outside the frame.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"46000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.046"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"left":{"type":"number","description":"Pixels to add on the left"},"right":{"type":"number","description":"Pixels to add on the right"},"up":{"type":"number","description":"Pixels to add on top"},"down":{"type":"number","description":"Pixels to add on bottom"},"prompt":{"type":"string","description":"Guide prompt"},"creativity":{"type":"number","description":"Creativity level 0–1"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","left":64,"right":64,"prompt":"extend the existing background","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/search-and-replace":{"post":{"operationId":"stability_ai_search_and_replace","summary":"Search and Replace","description":"Find an object by description and replace it with something new.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"What to replace the object with"},"search_prompt":{"type":"string","description":"Description of the object to find and replace"},"negative_prompt":{"type":"string","description":"Things to exclude"},"grow_mask":{"type":"number","description":"Expand detection mask by N pixels"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt","search_prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"a purple circle","search_prompt":"the illustrated character","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/search-and-recolor":{"post":{"operationId":"stability_ai_search_and_recolor","summary":"Search and Recolor","description":"Find an object by description and recolor it.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"New color/appearance for the object"},"select_prompt":{"type":"string","description":"Description of the object to recolor"},"negative_prompt":{"type":"string","description":"Things to exclude"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt","select_prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"purple","select_prompt":"the illustrated character","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/remove-background":{"post":{"operationId":"stability_ai_remove_background","summary":"Remove Background","description":"Automatically remove the background from an image.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"output_format":{"type":"string","description":"png|webp (default png)"}},"required":["image"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/replace-background-and-relight":{"post":{"operationId":"stability_ai_replace_background_and_relight","summary":"Replace Background & Relight","description":"Replace the background of a subject image and adjust lighting. Returns async ID — poll /results/{id}.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"92000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.092"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject_image":{"type":"string","description":"Foreground subject image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"background_prompt":{"type":"string","description":"Text description of the new background"},"background_reference":{"type":"string","description":"Reference image for the new background Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"foreground_prompt":{"type":"string","description":"Description of the foreground subject"},"light_source_direction":{"type":"string","description":"left|right|above|below"},"light_source_strength":{"type":"number","description":"Light intensity 0–1"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["subject_image"],"additionalProperties":true},"example":{"subject_image":"<png base64: supply valid media bytes>","background_prompt":"simple white studio background","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/upscale-fast":{"post":{"operationId":"stability_ai_upscale_fast","summary":"Upscale Fast","description":"4× fast upscaling in ~1 second.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"23000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.023"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"output_format":{"type":"string","description":"jpeg|png|webp"}},"required":["image"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","output_format":"jpeg"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/upscale-conservative":{"post":{"operationId":"stability_ai_upscale_conservative","summary":"Upscale Conservative","description":"Upscale to 4K preserving original detail with minimal AI changes.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"460000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.46"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Description of the image content"},"negative_prompt":{"type":"string","description":"Things to exclude"},"creativity":{"type":"number","description":"Detail enhancement level 0–1 (default 0.35)"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"clean purple illustration","creativity":0.2,"output_format":"jpeg"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/upscale-creative":{"post":{"operationId":"stability_ai_upscale_creative","summary":"Upscale Creative","description":"Upscale to 4K with AI-enhanced detail generation. Returns async ID — poll /results/{id}.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"690000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.69"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Description of the image content"},"negative_prompt":{"type":"string","description":"Things to exclude"},"creativity":{"type":"number","description":"AI enhancement level 0–1 (default 0.3)"},"style_preset":{"type":"string","description":"Style preset"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"clean purple illustration","creativity":0.2,"output_format":"jpeg"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/sketch":{"post":{"operationId":"stability_ai_sketch","summary":"Sketch","description":"Convert a rough sketch into a detailed image guided by a prompt.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Sketch / line art image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Target image description"},"control_strength":{"type":"number","description":"Sketch adherence 0–1 (default 0.7)"},"negative_prompt":{"type":"string","description":"Things to exclude"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"clean purple illustration","control_strength":0.7,"output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/structure":{"post":{"operationId":"stability_ai_structure","summary":"Structure","description":"Generate an image that preserves the structural layout of a source image.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Structure reference image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Target image description"},"control_strength":{"type":"number","description":"Structure adherence 0–1 (default 0.7)"},"negative_prompt":{"type":"string","description":"Things to exclude"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"clean purple illustration","control_strength":0.7,"output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/style-guide":{"post":{"operationId":"stability_ai_style_guide","summary":"Style Guide","description":"Extract a visual style from a reference image and apply it to new content.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"57000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.058"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Style reference image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Target image description"},"fidelity":{"type":"number","description":"Style fidelity 0–1 (default 0.5)"},"aspect_ratio":{"type":"string","description":"Output aspect ratio"},"negative_prompt":{"type":"string","description":"Things to exclude"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["image","prompt"],"additionalProperties":true},"example":{"image":"<png base64: supply valid media bytes>","prompt":"minimal purple geometric icon","fidelity":0.5,"aspect_ratio":"1:1","output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/style-transfer":{"post":{"operationId":"stability_ai_style_transfer","summary":"Style Transfer","description":"Transfer the artistic style of one image onto another.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"92000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.092"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"init_image":{"type":"string","description":"Content image to restyle Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"style_image":{"type":"string","description":"Style reference image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Additional prompt guidance"},"style_strength":{"type":"number","description":"Style intensity 0–1"},"composition_fidelity":{"type":"number","description":"Preserve original composition 0–1"},"change_strength":{"type":"number","description":"Overall change strength 0–1"},"output_format":{"type":"string","description":"jpeg|png|webp"},"seed":{"type":"number","description":"Random seed"}},"required":["init_image","style_image"],"additionalProperties":true},"example":{"init_image":"<subject png base64: supply valid media bytes>","style_image":"<subject png base64: supply valid media bytes>","prompt":"subtle purple geometric style","style_strength":0.5,"composition_fidelity":0.8,"change_strength":0.5,"output_format":"png"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/stable-fast-3d":{"post":{"operationId":"stability_ai_stable_fast_3d","summary":"Stable Fast 3D","description":"Generate a 3D GLTF model from a single image in seconds.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"115000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.115"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image of the object Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"texture_resolution":{"type":"number","description":"512|1024|2048 (default 1024)"},"foreground_ratio":{"type":"number","description":"Subject scale in frame (default 0.85)"},"remesh":{"type":"string","description":"none|triangle|quad"}},"required":["image"],"additionalProperties":true},"example":{"image":"<subject png base64: supply valid media bytes>","texture_resolution":512,"foreground_ratio":0.85,"remesh":"none"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/stable-point-aware-3d":{"post":{"operationId":"stability_ai_stable_point_aware_3d","summary":"Stable Point Aware 3D","description":"Generate a 3D GLTF model with point-cloud awareness (SPAR3D).","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"46000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.046"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Source image of the object Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"texture_resolution":{"type":"number","description":"512|1024|2048 (default 1024)"},"foreground_ratio":{"type":"number","description":"Subject scale in frame (default 1.3)"},"guidance_scale":{"type":"number","description":"Generation guidance scale (default 3)"},"seed":{"type":"number","description":"Random seed"}},"required":["image"],"additionalProperties":true},"example":{"image":"<subject png base64: supply valid media bytes>","texture_resolution":512,"foreground_ratio":1.3,"guidance_scale":3}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/text-to-audio-3":{"post":{"operationId":"stability_ai_text_to_audio_3","summary":"Stable Audio 3 Text to Audio","description":"Start a Stable Audio 3.0 generation. Returns an ID; poll audio-result until the audio is ready.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"299000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.299"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Audio description prompt"},"duration":{"type":"number","description":"Output duration in seconds, up to six minutes"},"cfg_scale":{"type":"number","description":"Guidance scale"},"output_format":{"type":"string","description":"mp3|wav (default mp3)"},"seed":{"type":"number","description":"Random seed"}},"required":["prompt"],"additionalProperties":true},"example":{"prompt":"A short, quiet instrumental piano melody.","duration":6,"output_format":"mp3"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/audio-to-audio-3":{"post":{"operationId":"stability_ai_audio_to_audio_3","summary":"Stable Audio 3 Audio to Audio","description":"Start a Stable Audio 3.0 transformation. Returns an ID; poll audio-result until the audio is ready.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"299000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.299"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","description":"Input audio file Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Transformation description"},"strength":{"type":"number","description":"Transformation intensity from 0 to 1"},"output_format":{"type":"string","description":"mp3|wav"},"seed":{"type":"number","description":"Random seed"}},"required":["audio","prompt"],"additionalProperties":true},"example":{"audio":"<mp3 base64: supply valid media bytes>","prompt":"quiet ambient piano tone","strength":0.5,"output_format":"mp3"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/audio-inpaint-3":{"post":{"operationId":"stability_ai_audio_inpaint_3","summary":"Stable Audio 3 Inpaint","description":"Start Stable Audio 3.0 inpainting. Returns an ID; poll audio-result until the audio is ready.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"299000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.299"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","description":"Input audio file Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Description of replacement content"},"mask_start":{"type":"number","description":"Start of the region to replace, in seconds"},"mask_end":{"type":"number","description":"End of the region to replace, in seconds"},"output_format":{"type":"string","description":"mp3|wav"}},"required":["audio","prompt"],"additionalProperties":true},"example":{"audio":"<mp3 base64: supply valid media bytes>","prompt":"quiet ambient piano tone","mask_start":1,"mask_end":3,"output_format":"mp3"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/text-to-audio":{"post":{"operationId":"stability_ai_text_to_audio","summary":"Text to Audio","description":"Generate music or sound effects from a text prompt.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.23 (50 steps, stable-audio-2)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Audio description prompt"},"model":{"type":"string","description":"stable-audio-2.5 ($0.23) | stable-audio-2 (step-based, default)"},"duration":{"type":"number","description":"Output duration in seconds (default 190)"},"steps":{"type":"number","description":"Inference steps — affects cost for stable-audio-2 (default 50)"},"cfg_scale":{"type":"number","description":"Guidance scale"},"output_format":{"type":"string","description":"mp3|wav (default mp3)"},"seed":{"type":"number","description":"Random seed"}},"required":["prompt"],"additionalProperties":true},"example":{"prompt":"A short, quiet instrumental piano melody.","duration":6,"output_format":"mp3","model":"stable-audio-2.5"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/audio-to-audio":{"post":{"operationId":"stability_ai_audio_to_audio","summary":"Audio to Audio","description":"Transform an existing audio file guided by a text prompt.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.23 (50 steps, stable-audio-2)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","description":"Input audio file Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Transformation description"},"model":{"type":"string","description":"stable-audio-2.5 | stable-audio-2 (default)"},"strength":{"type":"number","description":"Transformation intensity 0–1 (default 1)"},"steps":{"type":"number","description":"Inference steps (default 50)"},"output_format":{"type":"string","description":"mp3|wav"},"seed":{"type":"number","description":"Random seed"}},"required":["audio","prompt"],"additionalProperties":true},"example":{"audio":"<mp3 base64: supply valid media bytes>","prompt":"quiet ambient tone","model":"stable-audio-2.5","strength":0.5,"steps":8,"output_format":"mp3"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/audio-inpaint":{"post":{"operationId":"stability_ai_audio_inpaint","summary":"Audio Inpaint","description":"Replace a section of an audio file with AI-generated content.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.23 (50 steps, stable-audio-2)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","description":"Input audio file Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."},"prompt":{"type":"string","description":"Description of replacement content"},"mask_start":{"type":"number","description":"Start of masked region in seconds (default 30)"},"mask_end":{"type":"number","description":"End of masked region in seconds (default 190)"},"model":{"type":"string","description":"stable-audio-2.5 | stable-audio-2 (default)"},"steps":{"type":"number","description":"Inference steps (default 8)"},"output_format":{"type":"string","description":"mp3|wav"}},"required":["audio","prompt"],"additionalProperties":true},"example":{"audio":"<mp3 base64: supply valid media bytes>","prompt":"quiet ambient tone","mask_start":1,"mask_end":3,"model":"stable-audio-2.5","steps":8,"output_format":"mp3"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/result":{"post":{"operationId":"stability_ai_result","summary":"Result","description":"Poll the result of an async operation (creative upscale, replace-background-and-relight).","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"0","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Free"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Async generation ID returned by the initiating call"}},"required":["id"],"additionalProperties":true},"example":{"id":"<from stability-ai/upscale-creative>"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/stability-ai/audio-result":{"post":{"operationId":"stability_ai_audio_result","summary":"Audio Result","description":"Poll a Stable Audio 3 generation. Returns progress while pending and base64 audio with content_type when ready.","tags":["AI / Generative"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"0","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Free"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Generation ID returned by a Stable Audio 3 initiating call"}},"required":["id"],"additionalProperties":true},"example":{"id":"<from stability-ai/text-to-audio-3>"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}}}}