Size & Aspect Ratio
The canvas is as important as the content. Mynth provides a flexible system for managing image dimensions, ranging from fully automatic “Magic Size” for dynamic applications to strict pixel-perfect control for professionals.Magic Size (Auto)
Magic Size is our recommended way to handle dimensions when you are building dynamic systems like role-play apps, story generators, or any interface where the prompt is user-generated or unpredictable. Instead of your system having to use an LLM to figure out the right aspect ratio before calling our API, you can simply offload that logic to us. We analyze the prompt’s context and pick the perfect orientation (Portrait, Landscape, etc.) automatically. To enable it, just setsize to auto:
Size Shorthand & Presets
For cases where you know the general shape you want, you can use our shorthand presets or direct resolution strings.Resolution Shorthand
You can pass a string in the format${width}x${height}:
Named Presets
We provide several curated presets that are optimized for common use cases:portrait: Standard vertical (e.g., for mobile).landscape: Standard horizontal.square: 1:1 aspect ratio.instagram: Optimized for social media posts.
Note: We are constantly adding more presets to simplify common integration patterns.
Advanced Size Configuration
For full control, you can pass a structuredsize object. This allows you to specify precise dimensions and how Mynth should handle them relative to the model’s capabilities.
Size Modes
Different models have different rules for supported resolutions (e.g., some require dimensions to be multiples of 8 or 64). Themode property determines how we reconcile your request with these rules.
| Mode | Behavior |
|---|---|
preset (Default) | Highly Recommended. We adjust your requested size to the nearest “High Quality” preset specifically optimized for the selected model. This ensures the highest aesthetic quality. |
aligned | We find the closest technically valid resolution for the model (e.g., adjusting to the nearest multiple of 64). A great balance of control and stability. |
strict | We send your exact pixels to the provider. Not recommended, as it can lead to errors if the model doesn’t support those specific dimensions. You are still charged the service fee for failed generations caused by strict size errors. |
Recommendations
- For dynamic content: Use
"size": "auto"(Magic Size). - For custom designs: Use the structured object with
mode: "preset"ormode: "aligned". - For safety: Avoid
strictunless you are absolutely certain the model provider supports your specific pixel count.
Roadmap: Dynamic Scale Control ⚡
We are working on a Scale parameter that will allow you to control the fidelity of your generations independently of the aspect ratio.Soon, when using
auto or preset modes, you’ll be able to specify a scale like hd, fhd, or 4k.Why this matters:- Precision: Get a
portraitimage in4kor aninstagrampost inhd. - Cost Management: Choose a lower scale for rapid prototyping and a higher scale for final assets, giving you granular control over your generation costs.
Included in your standard service fee, these intelligent sizing features ensure your generations always have the right framing for the job.