Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the result through the unified Query Task Status endpoint.
MAI Image 2.7 Flash Text to Image creates one image per request from a text prompt. MAI Image 2.7 Flash is the faster, lower-cost tier of Microsoft’s MAI Image 2.7, suited to drafts and high-volume work. Use it for product shots, posters with readable text, and assets that need a transparent background. To edit or combine reference images, use MAI Image 2.7 Flash Edit. MAI Image 2.7 Flash and MAI Image 2.7 accept the same parameters; see MAI Image 2.7 Text to Image.

Models

  • microsoft/mai-image-2.7-flash/text-to-image — Text-to-image with MAI Image 2.7 Flash, one image per request.

Features

  • Seven aspect-ratio presets at 1K (about 1 megapixel) or 2K (about 4 megapixels).
  • Custom WIDTHxHEIGHT sizes up to 4,194,304 pixels.
  • Transparent backgrounds; PNG, JPEG or WebP output.
  • Long prompts up to 32,000 characters.

Required parameters

  • prompt (string): Description of the image. 1–32,000 characters of text. Put exact on-image text in quotes.

Optional parameters

  • size (string): Aspect-ratio preset or custom WIDTHxHEIGHT. Default 1:1. See Size.
  • resolution (string): 1K or 2K. Default 1K. Applies to aspect-ratio presets only.
  • background (string): opaque or transparent. Default opaque. transparent requires output_format png or webp.
  • output_format (string): png, jpeg or webp. Default png.

Size

  • Presets: 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16. They use the selected resolution: 1K is about 1 megapixel (1:1 is 1024x1024), 2K is about 4 megapixels (16:9 is 2720x1536).
  • Custom WIDTHxHEIGHT (use x or X, for example 3072x1344): both sides must be multiples of 16, each side at least 768 pixels, and total pixels at most 4,194,304. The image is rendered at exactly this size; other custom values return 400. resolution applies to presets.

Examples

  • Square 1K image: a product still life with quoted label text, using the defaults.
  • 16:9 at 2K: a landscape at about 4 megapixels (2720x1536).
  • Transparent cutout: custom 3072x1344, background: transparent, WebP.

Notes

  • Each request returns exactly one image. input accepts the fields listed above; other fields return 400. Put model and callback_url at the request root, next to input.
  • background: transparent with output_format: jpeg returns 400.
  • For edits with reference images, use MAI Image 2.7 Flash Edit.
  • Credits are billed by tokens: prompt text tokens and output image tokens (output width × height / 1024). The price follows the output size, so 2K and larger custom sizes cost more. The maximum for the request is reserved at submission; when the task finishes you are charged for the actual output size, up to that maximum, and the rest is refunded. A failed task is refunded in full. See the pricing page for current rates.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer VIDGO_API_KEY.

Body

application/json
model
string
required
Example:

"microsoft/mai-image-2.7-flash/text-to-image"

input
object
required
callback_url
string<uri>

Optional webhook URL for completion or failure notifications.

Example:

"https://your-domain.com/callback"

Response

Task submission result. A task ID identifies asynchronous work; generation may still be running.

code
integer
required
Example:

200

data
object
required