Notice: Black Friday 2026 × Cyber Monday: Get up to 30% extra on top-ups, DeepSeek free to use · View the promotion
Blog

Guide

MAI Image 2.7 Text-to-Image Getting Started Guide: Capability Boundaries, Pricing, and Integration Practices

From capability boundaries to per-image billing integration practices, all in one place

Nov 27, 2026
Large prismatic geometric cover image divided by flat planes on a deep pine-green background, accented with sage-green and mist-green blocks.
On this page

Why this Microsoft text-to-image model is worth your attention

The positioning of mai-image-2.7/text-to-image is straightforward: provided by Microsoft, it takes text as input and outputs images, with exactly one capability — text-to-image. No image-to-image, no localized editing, and no conversational multi-turn retouching. Such a "narrow" model actually makes it easier to do one thing well: reliably turning a prompt into an image you can use directly.

For developers, there are usually three categories of scenarios where it is worth adding to the shortlist. The first is batch image generation with stable demand and cost sensitivity per image, such as marketing assets, article illustrations, and product placeholder images — these tasks do not demand extreme creativity from a single image, but are highly sensitive to unit price, success rate, and batch throughput. The second is validating a visual direction quickly during the prototyping phase: using a unified interface to run dozens of images from a prompt and see the results is simpler than integrating multiple vendors. The third is auxiliary "fill in missing images" steps in an existing product, such as automatically generating cover thumbnails in the backend.

Conversely, if your requirements include "change this image into that," "keep the subject and swap the background," or "produce ten consistent images of the same character," it is not on the shortlist, so don't waste time adapting it. Getting the first step of model selection right — confirming whether the task type falls within its capability domain — saves far more effort than tuning parameters later. You can verify model details and current capability descriptions on the mai-image-2.7/text-to-image model page on HiAPI.ai; integration uniformly uses the same set of interfaces, so you don't need to learn a separate calling convention for it.

On a dark green background, a central prism is split into flat color blocks, with a group of thin prisms on the left pointing toward a group of wide prisms on the right, and small prism branches splitting off above and below.
The central prism sits between text input and image output; the branches above and below represent other paths that could be included as candidates.

Capability boundaries: what it does and does not do

Clarifying boundaries is more useful than listing strengths. The following is based on publicly stated capabilities:

What it can do is text-to-image generation — give it a prompt, and get an image output. This is its only claimed capability, and it should be the only place you reserve for it in your architecture.

What it does not do includes: image-to-image (using a reference image to create variants or derivatives), localized inpainting and editing (modifying specified regions), multi-image consistency control (keeping a character or style fully consistent across multiple images), and image understanding (reading an image to answer questions). These tasks are often lumped together in engineering, but their implementation paths are completely different. If your product requirements document says "users upload a photo and generate an illustration in the same style," that is essentially image-to-image; handing it to a pure text-to-image model will produce an awkward result: the model can only redraw based on text and cannot "preserve this person."

There is another easily overlooked boundary: details such as the model's specific parameter set, supported size tiers, and number of images returned per request are not covered by the factual materials. Do not guess this information, and do not map it from other models in memory; always refer to the official documentation. Before integration, it is recommended to write a minimal validation script to turn these "uncertain items" into "verified items" one by one — for example, request a size parameter and see whether the return matches expectations, rather than discovering during joint debugging that a parameter name does not match.

On a dark pine green background, there is a light green boundary ring; inside the ring are several neat prisms, while outside the ring are scattered, fragmented, notched, and separated prism blocks, representing the distinction between what is inside and outside the expressive capability range.
Boundary map: inside the ring is what text-to-image can do; outside the ring are capabilities such as image-to-image, localized editing, and multi-image consistency that require other solutions.

API parameters and prompt tuning essentials

The most effective approach during the tuning phase is not to optimize all parameters at once, but to split "style confirmation" and "batch production" into two stages.

In the first stage, confirm the direction with a small sample. Fix the same prompt and generate just a few images, looking at only two things: whether the style falls within the expected range, and whether the size and composition suit your usage slot (hero images, thumbnails, and in-article illustrations have different aspect ratio requirements). The goal of this step is to rule out directional errors, not to pursue perfection.

In the second stage, solidify the prompt template. Break the prompt into reusable structure, such as "subject description + scene/environment + style constraints + aspect ratio and composition requirements + exclusions." The value of a fixed template is that all subsequent batch generation starts from the same baseline, and when problems arise you can attribute them — is it template degradation, or is some batch of input data abnormal?

Only in the third stage should you discuss parameter fine-tuning. Size, number of generations, and any model-specific controls should be centrally configured in batch scripts, not scattered across business code. The materials do not provide a specific parameter list for this model, so please refer to the official documentation for parameter names and value ranges; before the documentation confirms them, do not put guessed parameters into production code.

There are two general lessons at the prompt level worth keeping: first, clearly state "what you don't want" — negative constraints are often more effective than piling up adjectives; second, describe visually observable attributes (lighting, material, viewpoint) and avoid abstract evaluative words ("premium feel," "textured"), which are highly unstable across batches.

On a dark pine green background, several prisms split into light and dark planes by diagonal lines are arranged along a circular arrow, forming a cyclical debugging process.
Prompt tuning is a closed loop: draft, generate a small batch, review, adjust, until the template is locked.

Pricing structure and cost estimation

This model is billed per image, at a unit price of $0.0504 per image. The billing basis is simple: one image generated, one charge, regardless of prompt length or image purpose.

The cost estimation formula is "number of images × unit price"; the difficulty is never the multiplication, but where the number of images comes from. It is recommended to reason in this order: first calculate the "final usable image count" on the business side, then multiply by a "generation multiplier." Generation multiplier = actual requested images ÷ finally adopted images; it absorbs all costs from image selection, retries, and discarded images. During prototyping this multiplier is usually several times, and it drops noticeably once the template stabilizes, but it will never be 1.

Use an example to illustrate the method rather than give a conclusion: if you need 1,000 usable images per day and the current generation multiplier is 2, then the daily request volume is 2,000 images, and the cost is 2,000 × $0.0504. Monthly cost is the daily cost multiplied by the actual number of operating days. The value of this model is that you can directly reduce costs by lowering the generation multiplier — optimizing the prompt template and reducing invalid retries is equivalent to getting a discount.

Two easily missed amplifiers. The first is retries: if timeout retries are not idempotent or deduplicated, one failure becomes two charges. The second is discarded images: without a caching mechanism, the same image is generated multiple times, each time billed. Include both in your budget so the range you present during review holds up. For real-time prices, refer to the site's pricing panel.

Typical usage and engineering practices

The scenarios suitable for deployment are fairly concentrated: marketing campaign assets (high volume, consistent style, batchable), cover and illustration completion for content platforms, placeholder assets in prototypes and demo environments, and batch image generation for multilingual sites by language. The common thread across these scenarios is "the number of images matters more than the uniqueness of any single image."

Four things must be completed before launch.

Timeouts and retries. Image generation usually takes longer than text interfaces, so client timeouts should leave ample margin; retry strategies should limit the number of attempts and add backoff, while recording a unique identifier for each request to avoid duplicate billing and actual duplicate writes from retries.

Failure metrics. Instrument four metrics separately: request count, success count, failure count, and adoption count. With only request count and adoption count, you cannot tell whether cost waste occurs in generation failures or in image selection.

Result caching. Cache generated results using a key of "prompt template version + key parameters + input variables," so repeated requests hit the cache directly. This saves considerable cost in batch image completion and backend rerun scenarios, and makes online behavior more predictable.

Content compliance. Generated results should go through a review step before reaching users' eyes, including input filtering on the prompt side and output checks on the image side. For externally displayed images, it is recommended to keep generation records for traceability.

In terms of engineering form, wrap model calls into an independent service; the business side only passes semantic generation requirements and does not assemble parameters directly. This way, when you switch models or add a second vendor in the future, the scope of changes is confined to one place.

Common troubleshooting and decision checklist

Follow this order for troubleshooting, starting from the cheapest possibility: first confirm whether the task type really falls within the text-to-image scope (many "wrong results" are actually requirement mismatches); then check whether parameter names and values match the official documentation (items not covered by the materials are especially error-prone); then compare whether the prompt template has been modified, and reproduce with the baseline prompt; finally inspect the request chain to distinguish whether the model returned an anomaly or whether your timeout, retry, or parsing logic has a problem. Caching is also a common source of "false failures" — when you see an old image, suspect the cache key design first, not the model.

To decide whether to keep using it or switch solutions, use the following checklist. Signals to keep using it: the task really is text-to-image; the output style is acceptable and stable; the generation multiplier is declining as the template is optimized; per-image billing costs are controllable within your budget model. Signals to switch: requirements include image-to-image, localized editing, or multi-image consistency; the style never hits the target and prompt optimization does not improve it; the failure rate remains high over time, causing retry costs to dominate the bill; or the business has a hard upper limit on generation latency that the current pipeline cannot meet. The first two are capability-domain mismatches that tuning cannot fix — the earlier you switch, the more you save.

Once you understand the boundaries, solidify the template, and factor billing and retries into the budget, integrating this model should be largely surprise-free. If you are ready to get started, you can begin at the model page to confirm current capabilities and billing basis, then run your first small sample batch.

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs