MiniMax H3 Image Now on AI Gateway: Text-to-Image and Editing with a Single Key

Two MiniMax H3 Image models now on AI Gateway, covering text-to-image and image editing with a single key.
MiniMax H3 Image and H3 Image Highspeed are now on AI Gateway, so developers no longer need a separate MiniMax account—a single API key handles both text-to-image generation and image editing. Both models offer identical functionality, supporting text-to-image generation and editing via passing back original images to change colors, swap subjects, or adjust composition; the difference is that Highspeed prioritizes faster generation. Both support custom sizes and aspect ratios with output covering 2K and 4K, and output formats like PNG can be specified via providerOptions. There are two calling paths: directly using the model name with AI SDK's generateImage, or going through OpenAI-compatible /v1/images/generations and /v1/images/edits routes. The gateway passes through vendor pricing without markup and provides unified usage and cost management.
MiniMax H3 Image and MiniMax H3 Image Highspeed are now available on AI Gateway. Developers no longer need a separate MiniMax account—a single API key is all it takes to handle both text-to-image generation and image editing. For teams looking to simplify multi-model call chains and cut down on account and billing management overhead, this is a noteworthy integration change.

One Integration, Two Paths: Generation and Editing
According to the official documentation, both models support text-to-image generation as well as editing of existing images. For generation, you can use text prompts directly to produce product visuals or illustrations; for editing, you pass the generated result back along with instructions to change colors, swap subjects, adjust composition, and more.
This "generate—pass back—re-edit" loop means the same model name serves as both an image production entry point and a modification tool. The example provided in the source material demonstrates this: first generating an image with the prompt "A blue ceramic vase with wildflowers on a sunlit wooden table," then passing that image back with the instruction "Change the vase to terracotta and keep the flowers and setting" to obtain the edited version. For design and marketing workflows that require repeated iteration on visual drafts, this is far more seamless than shuffling between two separate tools.
Two Variants: Same Capabilities, Different Speed Focus
H3 Image and H3 Image Highspeed share identical functionality—both offer the same generation and editing options. The difference is that the Highspeed variant prioritizes faster generation. The official documentation describes it as "faster generation with the same generation and editing options"—compressing image output wait times without sacrificing generation or editing capabilities.
For latency-sensitive scenarios like interactive products or batch image generation pipelines, Highspeed is the better fit. For creative workflows where image quality refinement takes priority and slightly longer waits are acceptable, the standard version is the default choice. Since both models share the same calling convention, switching is just a matter of swapping the model name—migration cost is minimal.
Resolution and Aspect Ratio: Custom Sizes, 2K and 4K Support
Both models support custom sizes and aspect ratios, with output covering 2K and 4K. This is particularly important for real-world deployment—e-commerce banners, social media assets, and print materials all have different aspect ratio requirements, and being able to specify dimensions directly eliminates the need for post-processing crops and upscaling. The example code specifies size: '2048x2048' for square output, confirming that the size parameter is an explicit configuration option at call time.
For output format, the example specifies PNG via outputFormat: 'png' in providerOptions, showing that format is also configurable as needed.
2K and 4K typically refer to the long-edge pixel dimensions of the output image: 2K is roughly in the 2000-pixel range (e.g., 2048×2048), and 4K is roughly in the 4000-pixel range. For image generation models, higher resolution isn't just about more pixels—it involves trade-offs in VRAM usage, generation time, and detail consistency. High resolution often requires longer inference times and is more prone to localized structural artifacts in complex compositions. In practice, you should choose dimensions based on the final deployment scenario: 2K is sufficient for social media and web assets, while 4K is only needed for print materials or scenarios requiring large crops—avoiding unnecessary latency costs for pixels you don't need.
Calling Methods: Direct Model Name, OpenAI-Compatible Routing
There are two integration paths. The first is to use the model name minimax/minimax-h3-image or minimax/minimax-h3-image-highspeed directly with the AI SDK's generateImage interface. Here's the generation example from the source material:
import { writeFile } from 'node:fs/promises';
import { generateImage } from 'ai';
const { image } = await generateImage({
model: 'minimax/minimax-h3-image',
prompt: 'A blue ceramic vase with wildflowers on a sunlit wooden table.',
size: '2048x2048',
maxRetries: 0,
providerOptions: {
minimax: { outputFormat: 'png' },
},
});
await writeFile('image.png', image.uint8Array);
For editing calls, you change the prompt to an object structure and place the original image in the images array:
const { image: editedImage } = await generateImage({
model: 'minimax/minimax-h3-image',
prompt: {
text: 'Change the vase to terracotta and keep the flowers and setting.',
images: [image.uint8Array],
},
size: '2048x2048',
maxRetries: 0,
providerOptions: {
minimax: { outputFormat: 'png' },
},
});
The second path uses OpenAI-compatible /v1/images/generations and /v1/images/edits routes. For teams that already have code built on OpenAI's image API, this path means minimal changes—you can swap in the model without rewriting your calling layer.
AI SDK is an open-source TypeScript toolkit from Vercel for unified server-side calls to different vendors' large models. Its generateImage function accepts a model string (e.g., minimax/minimax-h3-image), prompt, size, and other parameters, returning an object containing image byte data that developers then write to files or upload to object storage. providerOptions is the field for passing vendor-specific parameters—each vendor's unique configuration (like output format or sampling steps) goes here, decoupled from generic parameters. maxRetries controls automatic retry attempts after failures, defaulting to 2; the example explicitly sets it to 0 to disable automatic retries and let the caller handle exceptions—useful for batch tasks where you want unified failure fallback and log attribution.
The Cost and Governance Value of a Unified Gateway
AI Gateway's positioning is a unified API: call models, track usage and costs, and manage access permissions with a single key. Together, these three address the operational fragmentation of the multi-model era—previously, each vendor integration meant another set of credentials, another bill, and another usage dashboard; now everything converges into a single console.
On pricing, the official statement is clear: AI Gateway passes through vendor pricing as-is, with no markup and no inference platform fees. For cost-sensitive teams, this eliminates concerns about "gateway markup"; combined with the dashboard for viewing requests and spending, budget attribution becomes more straightforward.
OpenAI-compatible routing means the gateway exposes endpoints following OpenAI's official image API request and response structures, including /v1/images/generations (text-to-image) and /v1/images/edits (image editing, typically uploading the original image and prompt as multipart). This means existing code only needs to point baseURL to the gateway, swap apiKey for the gateway key, and change the model name to MiniMax's identifier—request body fields generally require no changes to switch vendors. This compatibility layer lowers migration costs, but be aware of subtle differences in parameter semantics across vendors—such as size value ranges or how original images are encoded for editing—and check the gateway documentation before integrating to avoid call failures or unexpected output from carrying over old parameters.
Key Practical Considerations
First, write the full model name—the vendor-prefixed format like minimax/minimax-h3-image is what the gateway uses for routing, and a typo will cause the call to fail. Second, for editing scenarios, the original image must be passed back as a byte array along with the instruction, and the prompt structure changes from a string to an object containing text and images. Third, maxRetries is explicitly set to 0 in the examples, showing that the caller has full control over retry strategy—useful for deciding on fallback behavior in batch tasks.
For teams building image generation capabilities, the practical significance of this integration is: text-to-image and image editing are consolidated under the same model name and the same key, combined with 2K/4K custom sizing and a low-latency Highspeed option—giving more room for model selection and switching than before.
One-line Summary
Two MiniMax H3 Image models now on AI Gateway, covering text-to-image and image editing with a single key.
Paragraph Summary
MiniMax H3 Image and H3 Image Highspeed are now on AI Gateway, so developers no longer need a separate MiniMax account—a single API key handles both text-to-image generation and image editing tasks. Both models offer identical functionality, supporting text-to-image generation and editing via passing back original images to change colors, swap subjects, or adjust composition, forming a generate—pass back—re-edit loop; the difference is that Highspeed prioritizes faster generation. Both support custom sizes and aspect ratios with output covering 2K and 4K, and output formats like PNG can be specified via providerOptions. There are two calling paths: directly using the model name with AI SDK's generateImage, or going through OpenAI-compatible /v1/images/generations and /v1/images/edits routes. The gateway passes through vendor pricing without markup and provides unified usage and cost management.
Related articles

Lewis's Scoring Completely Out of Control: An Absurd Observation of Gaming Entertainment
Lewis's scoring rules completely out of control in gameplay, switching from rewards to penalties at will, even offsetting deductions and additions to zero. This article analyzes the entertainment logic and rule transparency issues behind such absurd scoring.

The Democrats' Leftward Path for 2028: Blurry Labels and Backroom Games
Using Florida candidate Angie Nixon's case, this analysis examines the Democrats' leftward path for 2028: the mismatch between national media label wars and local voter perception, and how elite donations, polls, and endorsements will decide candidates' fates before the 2027 primary.

One Glass of Orange Juice Contains a Shocking Amount of Sugar: How Continuous Glucose Monitoring Changes Dietary Perception
A glass of orange juice contains up to eight teaspoons of sugar. Continuous glucose monitoring reveals individualized dietary responses. This article explores the link between blood sugar and brain health and how CGM helps ordinary people make smarter dietary choices.