GET
/v1/schemas/fal/image/microsoft/mai-image-2.7/text-to-image
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace42921c313a4ab80369b51c41a3530b8311c50f1c84129a89db590e69d6d11c36{
"fetchedAt": 1794978001,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
6 properties · 1 required · 1 $defs| property | type | description | constraints |
|---|---|---|---|
| prompt* | string | The text prompt to generate an image from. | length ≥ 1 · length ≤ 32000 |
| image_size | ImageSize | enum | The size of the generated image. Each side must be at least 768 pixels and the total pixel count at most 4,194,304 (2048x2048). Custom sizes are rounded down to a multiple of 16. | default: "square_hd" |
| background | enum | Use "transparent" for a transparent background (requires png or webp output). | opaque | transparent · default: "opaque" |
| sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. | default: false |
| resolution | enum | Resolution of preset image sizes: "1K" (about 1 megapixel) or "2K" (each side doubled). Ignored for custom sizes. | 1K | 2K · default: "1K" |
| output_format | enum | The format of the generated image. | jpeg | png | webp · default: "png" |
Types
1 $defsImageSizeobject
| height | integer | The height of the generated image. | 0 < n ≤ 14142 · default: 512 |
| width | integer | The width of the generated image. | 0 < n ≤ 14142 · default: 512 |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"fal","endpointId":"microsoft/mai-image-2.7/text-to-image","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}