GET
/v1/schemas/stability/image/v2alpha/generation/stable-image/inpaint
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace1ea5455da5ce2efef103daa142cc44a3e70b4fb3cfcdfa0c9a6a6f46d93912ea{
"fetchedAt": 1789536057,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
0 properties · 0 required · 0 $defsThis schema isn’t a plain object with properties — showing the raw JSON instead.
application/json
{
"provider": "stability",
"activity": "image",
"endpointId": "v2alpha/generation/stable-image/inpaint",
"kind": "input",
"contentHash": "83f6aab60d77537d049af516df03366b63d76f687b64e62cda2f6556f5e188a5",
"specRevision": null,
"provenance": {
"sourceUrl": "https://api.stability.ai/v2alpha/openapi",
"sourceHash": "1ea5455da5ce2efef103daa142cc44a3e70b4fb3cfcdfa0c9a6a6f46d93912ea",
"fetchedAt": 1789536057,
"extractorVersion": "1",
"derivation": "upstream-spec",
"verifiedAt": null
},
"createdAt": 1789536057,
"supersededAt": null,
"schema": {
"oneOf": [
{
"$ref": "#/$defs/InpaintingSearchModeRequestBody"
},
{
"$ref": "#/$defs/InpaintingMaskingModeRequestBody"
}
],
"discriminator": {
"propertyName": "mode",
"mapping": {
"search": "#/components/schemas/InpaintingSearchModeRequestBody",
"mask": "#/components/schemas/InpaintingMaskingModeRequestBody"
}
},
"$defs": {
"InpaintingMaskingModeRequestBody": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"mask"
],
"description": "Controls how the model decides which areas to inpaint and which areas to leave alone.\n\nSpecifying `mask` requires:\n - Provide an explicit mask image in the `mask` parameter\n - Use the alpha channel of the `image` parameter as the mask\n\nSpecifying `search` requires:\n - Provide a small description of what to inpaint in the `search_prompt` parameter"
},
"mask": {
"type": "string",
"description": "Controls the strength of the inpainting process on a per-pixel basis, either via a\nsecond image (passed into this parameter) or via the alpha channel of the `image` parameter.\n\n**Passing in a Mask**\n\nThe image passed to this parameter should be a black and white image that represents,\nat any pixel, the strength of inpainting based on how dark or light the given pixel is.\nCompletely black pixels represent no inpainting strength while completely white pixels\nrepresent maximum strength.\n\nIn the event the mask is a different size than the `image` parameter, it will be automatically resized.\n\n**Alpha Channel Support**\n\nIf you don't provide an explicit mask, one will be derived from the alpha channel of the `image` parameter.\nTransparent pixels will be inpainted while opaque pixels will be preserved.\n\nIn the event an `image` with an alpha channel is provided along with a `mask`, the `mask` will take precedence.",
"format": "binary",
"example": "./some/image.png"
},
"image": {
"type": "string",
"description": "The image you wish to inpaint.\n\nSupported Formats:\n- jpeg\n- png\n- webp\n\nValidation Rules:\n- Every side must be at least 64 pixels\n- Total pixel count must be between 4,096 and 9,437,184 pixels",
"format": "binary",
"example": "./some/image.png"
},
"prompt": {
"$ref": "#/$defs/Prompt"
},
"negative_prompt": {
"$ref": "#/$defs/NegativePrompt"
},
"seed": {
"$ref": "#/$defs/Seed"
},
"output_format": {
"type": "string",
"enum": [
"jpeg",
"png",
"webp"
],
"default": "png",
"description": "Dictates the `content-type` of the generated image."
}
},
"required": [
"image",
"prompt",
"mode"
]
},
"InpaintingSearchModeRequestBody": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"search"
],
"description": "Controls how the model decides which areas to inpaint and which areas to leave alone.\n\nSpecifying `mask` requires:\n - Provide an explicit mask image in the `mask` parameter\n - Use the alpha channel of the `image` parameter as the mask\n\nSpecifying `search` requires:\n - Provide a small description of what to inpaint in the `search_prompt` parameter"
},
"search_prompt": {
"type": "string",
"description": "Short description of what to inpaint in the `image`.",
"example": "glasses"
},
"image": {
"type": "string",
"description": "The image you wish to inpaint.\n\nSupported Formats:\n- jpeg\n- png\n- webp\n\nValidation Rules:\n- Every side must be at least 64 pixels\n- Total pixel count must be between 4,096 and 9,437,184 pixels",
"format": "binary",
"example": "./some/image.png"
},
"prompt": {
"$ref": "#/$defs/Prompt"
},
"negative_prompt": {
"$ref": "#/$defs/NegativePrompt"
},
"seed": {
"$ref": "#/$defs/Seed"
},
"output_format": {
"type": "string",
"enum": [
"jpeg",
"png",
"webp"
],
"default": "png",
"description": "Dictates the `content-type` of the generated image."
}
},
"required": [
"image",
"prompt",
"mode",
"search_prompt"
]
},
"NegativePrompt": {
"type": "string",
"maxLength": 10000,
"description": "A blurb of text describing what you **do not** wish to see in the output image.\nThis is an advanced feature."
},
"Prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "What you wish to see in the output image. A strong, descriptive prompt that clearly defines\nelements, colors, and subjects will lead to better results.\n\nTo control the weight of a given word use the format `(word:weight)`,\nwhere `word` is the word you'd like to control the weight of and `weight`\nis a value between 0 and 1. For example: `The sky was a crisp (blue:0.3) and (green:0.8)`\nwould convey a sky that was blue and green, but more green than blue."
},
"Seed": {
"type": "number",
"minimum": 0,
"maximum": 4294967294,
"default": 0,
"description": "A specific value that is used to guide the 'randomness' of the generation. (Omit this parameter or pass `0` to use a random seed.)"
}
}
}
}Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"stability","endpointId":"v2alpha/generation/stable-image/inpaint","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}