2 Image APIs for Landscape, Portrait, and Square Output
MiniMax’s current image-generation API supports output sizing by width and height or by aspect ratio, while the OpenAI Images API exposes shape-related output controls such as size. The two approaches differ in how the application states the target frame: MiniMax can calculate dimensions from a named proportion, while OpenAI organizes output around the sizes supported by the selected model.
That difference becomes important when the output frame is part of the task rather than an artistic preference. A product catalogue may need one image in 1:1, a presentation header in 16:9, and a mobile creative in 9:16. If the requested shape is expressed as a ratio, the implementation can select a compatible proportion without first calculating pixel dimensions. If the API accepts fixed sizes instead, the caller must map the design requirement to a supported size and decide whether later cropping is acceptable.
The smallest practical request is also not the same as the smallest possible description. A usable image request still needs enough visual information to identify the subject, scene, composition, and exclusions. A weak description such as “product photo” can satisfy the schema while producing an image that does not meet the actual requirement. The better minimum is a concise description of one intended scene, one explicit frame target, and one observable acceptance condition—for example, a centered product with clean margins in a square frame, or a wide environment with enough empty space for a headline. This article compares two API approaches on the control exposed, the request content, the result that can be checked, and the cases where a separate crop or resize step remains necessary.
Other candidates to compare
Adobe Firefly is another candidate for image generation and editing; for API integration, Stability AI Stable Image is also worth comparing. These entry points differ from the MiniMax workflow described here. Check generation, local editing, dimensions and commercial terms using the same inputs rather than assuming identical reference-image controls.
1. MiniMax image generation: direct ratio selection
MiniMax-H3-Image is suitable when the main requirement is to state the desired proportion directly. The current image-generation endpoint accepts aspect_ratio in X:Y form when size is omitted or set to auto. The ratio must fall between 1:3 and 3:1, and the official documentation gives 16:9, 3:4, 21:9, and 3:1 as examples. The same endpoint also accepts direct WIDTHxHEIGHT dimensions, but the two forms cannot be combined in one request.
The ratio covers several practical needs. A 1:1 image fits square tiles and compact catalogue placements. Landscape values such as 4:3, 3:2, and 16:9 serve horizontal layouts, while portrait values such as 3:4 and 9:16 serve vertical placements. A 21:9 ratio supports a much wider editorial or banner composition. Because the interface accepts integer ratios within the documented range, it is not limited to a short fixed menu of display formats.
The minimum useful request
A minimal request still needs a visual description and a frame requirement. The description should identify what is visible, where the main subject appears, and which visual constraints matter. For a catalogue task, that may mean one object, a plain background, a centered position, and even illumination. For an editorial image, it may mean one environment, a specific subject placement, and empty area reserved for text.
The aspect_ratio field supplies the structural requirement without pixel arithmetic. A caller can request a 16:9 composition for a wide header, a 9:16 composition for a vertical placement, or 1:1 for a square asset. The current endpoint supports 1K, 2K, and 4K area levels when it calculates dimensions from the ratio. The returned item includes its actual size, which should be used for final verification.
After integration and authentication, call the MiniMax image-generation API with a sanitized product brief, explicit output dimensions or aspect ratio, and layout constraints, then inspect the returned image reference against the destination frame.
How to check the result
A successful request does not remove the need for visual review. Open the returned image, confirm its actual dimensions, and verify the composition rather than assuming that the requested proportion was applied perfectly.
The practical checks are straightforward:
- Confirm that the returned dimensions match the selected landscape, square, portrait, or extended-wide orientation.
- Check that the primary subject remains in the intended position.
- Inspect the edges for accidental cropping of important content.
- Look for text or graphic elements that overlap the area needed for later layout.
- Confirm that the visual description was followed in the dimensions that affect the task.
For example, a 9:16 request used in a mobile placement should be checked for face, product, or logo clearance rather than only for its vertical orientation. A 21:9 request used behind a headline needs enough negative space in the intended region. A 1:1 catalogue image should be checked for symmetry, object visibility, and consistent margins. The ratio determines the frame; the acceptance condition determines whether that frame is useful.
Where direct ratio control is particularly useful
Direct ratio selection is most valuable when the output will be placed in a layout whose proportions are already fixed. Design teams often know the target frame even when they do not care about a specific pixel resolution. Presenting the requirement as 16:9 or 9:16 communicates that intention more clearly than an arbitrary width and height.
It also helps when several assets form a related set. A square product view, a wider contextual view, and a vertical detail shot can use supported ratios while retaining a similar visual brief. The common elements can be stated once: subject, material, lighting, background, and exclusions. The ratio then changes the composition without requiring every request to introduce a new scene.
The practical limitation is that the caller must still choose a sensible ratio. The parameter does not decide whether an object should be centered or cropped, nor whether a banner needs protected space for text. Direct ratio control removes one conversion step; it does not remove editorial judgment.
2. OpenAI Images API: size-based generation
The OpenAI Images API provides a different route to shape control through its size parameter and image-output customization. The current documentation confirms that output quality, size, format, and compression can be adjusted for supported image models. The allowed sizes depend on the selected model and endpoint configuration, so a workflow should read the current parameter constraints rather than reuse a fixed size list from another model generation.
The distinction is practical rather than cosmetic. If a layout calls for 16:9, the caller must determine whether the configured size produces that exact frame or whether the nearest supported output will require cropping, resizing, or letterboxing. If the final asset must fill the frame without losing content, that difference belongs in the acceptance criteria from the beginning.
The minimum useful request
The minimum OpenAI request has the same content requirement as any image task: a concise description of the intended scene plus the relevant size setting. The description should cover the subject, composition, lighting or style where it matters, and details that would make the result unsuitable if omitted. The size value then provides the output frame defined by the selected model’s current constraints.
Automatic or model-selected sizing should not be used when the frame itself is a hard requirement. Automatic selection is useful for open-ended exploration but unsuitable when the output must immediately enter a fixed banner, card, or product grid. For a controlled asset, the caller should choose an explicitly supported size and verify the delivered dimensions.
A compact visual brief remains important. For a square product image, specifying the product, background, camera angle, and need for balanced margins is enough to create a checkable result. For a landscape editorial image, the description can identify the scene, subject placement, and area that must remain open for a headline.
How to check the result
Open the returned image and check its pixel dimensions before judging the composition. Compare those dimensions with the final container and determine whether the production pipeline will crop, resize, or letterbox the image.
The composition check should match the selected size. A landscape product image may leave too little space on the right for copy, while a portrait version may cut off contextual details that were important in the original concept. For square output, check the balance around the subject and confirm that the product is not clipped by the frame. If the image contains no text, inspect for generated lettering or markings that could conflict with a later design layer.
Where size-based selection is suitable
Size-based selection works well when the production system already uses the same dimensions. An asset library that stores every image in one approved format can avoid an initial conversion step. It also works when the output is a direct interface element rather than a frame that must later be adapted for several channels.
The boundary appears when the design system specifies ratios that do not match the available sizes. In that case, the caller has three practical options: choose the closest supported size and crop during composition, resize the delivered image to the target frame, or use another service whose request schema exposes the required ratio directly. None should be described as an exact native match unless the final dimensions and visible crop actually meet the requirement.
Selection summary
Both candidates support square, landscape, and portrait generation, but they expose the same requirement through different request fields. MiniMax is the clearer fit when the production brief is expressed as a named target proportion, particularly when the workflow uses a ratio within its supported range. The OpenAI Images API is the more direct fit when the production pipeline already stores assets in its documented fixed pixel sizes and accepts the selected model’s available options.
| Decision factor | MiniMax image generation | OpenAI Images API |
|---|---|---|
| Primary shape control | aspect_ratio or direct size | size and related output settings |
| Ratio handling | Accepts X:Y ratios from 1:3 through 3:1 | Uses the sizes supported by the selected model and configuration |
| Best fit | Layouts defined by editorial or display ratios | Pipelines already standardized to fixed pixel dimensions |
| Minimum request content | Concise visual description plus explicit frame control | Concise visual description plus explicit size control |
| Main operational check | Confirm the delivered dimensions and composition | Confirm dimensions and placement in the final container |
| Additional consideration | Choose the ratio while specifying composition and safe areas | Choose a supported size or plan for crop, resize, or letterboxing |
The practical decision does not require the caller to choose an API based on output quality alone. It starts with the frame required by the destination. If that frame is defined as a named ratio and the application benefits from passing it through directly, MiniMax’s request model is economical. If the application already manages a fixed set of pixel dimensions, the OpenAI size parameter may align with the existing storage and rendering logic without adding a ratio-mapping layer.
Minimal-input workflow
A compact implementation can begin by writing the image requirement as three separate fields: the visual content, the frame, and the check. The visual content should be one sentence that identifies the subject and the details that affect acceptance. The frame should use the API’s explicit shape control. The check should describe what makes the output unusable, such as a clipped subject, missing headline space, an incorrect orientation, or accidental text.
This structure prevents two common errors. The first is overloading the visual description with every downstream preference. Storage names, campaign labels, and publishing rules do not belong in the generation request unless they affect the pixels. The second is leaving the frame implicit. “Create an image for a campaign” is not enough when the campaign contains several placements with different proportions.
For a workflow that produces one asset, the request can remain minimal. For a set, repeat the same content and acceptance condition while changing only the frame control. Compare the resulting outputs as a set, because a composition that works in 1:1 may need repositioning in 9:16 even when the subject is unchanged.
Applicable boundaries
Neither API eliminates the need for output inspection. A valid request can still produce a composition that does not meet the placement requirement, so the final check should happen on the actual image rather than on the request parameters alone.
A ratio-only requirement does not necessarily demand an image-generation API. When the source is already a photograph or finished graphic, a conventional crop-and-resize workflow may be cheaper and more deterministic. Generation is most relevant when the required frame must be created together with new visual content.
A fixed-size workflow may also be the simpler option when all destinations use the same supported dimensions. If the team needs numerous exact editorial ratios, direct ratio selection removes repeated conversion logic, but the caller remains responsible for composing each frame and checking that important content stays inside it.
FAQ
Does a supported aspect ratio guarantee that the subject will be positioned correctly?
No. The ratio controls the frame, while the visual description and acceptance condition control composition. Check the returned image for subject placement, edge clearance, and space for later text or graphics.
Can an image be generated directly at 16:9 through either API?
MiniMax exposes 16:9 directly through aspect_ratio. For OpenAI, the exact result depends on the selected model’s current size options; if the generated dimensions do not match a 16:9 container, the workflow may need a later crop, resize, or letterboxing step.
Is automatic sizing appropriate for a fixed layout?
It is less appropriate when the frame is a hard constraint. Automatic sizing is useful for open-ended exploration, while an explicit ratio or size is easier to verify against a fixed destination.
What is the smallest description that remains useful?
Include the subject, the important visual treatment, and the placement or exclusion that affects acceptance. The request should be brief, but it must be concrete enough to distinguish an acceptable output from an unrelated or unusable one.
This article covers two API approaches: use named ratio parameters when the destination is defined by proportions, and use explicit sizes when the surrounding production system already standardizes on them; in either case, make the frame explicit and verify the delivered image against one observable layout requirement.
原文:https://www.a8q9.cn/en/article/2-image-apis-for-landscape-portrait-and-square-output-405b0c.html