Skip to content
Main Site News Console

Image Compression and Output Resolution

Resolution is determined by the model name

Section titled “Resolution is determined by the model name”

4All API image resolution is selected via the model suffix; do not rely on the size parameter:

SuffixDescription
NoneStandard resolution (about 1K)
-2k2K high definition
-4k4K ultra-high definition (GPT-Image series)

Use this in combination with the aspect-ratio suffix, such as gpt-image-2-portrait-2k and gemini-3.1-flash-image-square-2k. For the full rules, see Image and Video Generation Models.

  • Web/social media display: the standard tier is enough; it loads fast and costs less;
  • Printing / enlarged crops / main product images for e-commerce: start at 2K;
  • Finished assets that need post-processing: 4K, but both unit cost and processing time increase significantly;
  • It is recommended to iterate on prompts with the standard tier until satisfactory, then generate the final result in high resolution—avoid repeated trial and error at 4K.
  • When a URL is returned, download the original image directly; when base64 is returned, note that the response body is large (4K can reach several MB), so the client and proxy body size limits should be increased;
  • After obtaining the original image, compress and generate multiple specs on your own (webp/avif + thumbnails) before uploading to the CDN; do not send the original image directly to the frontend;
  • Generated image URLs are time-limited, so be sure to transfer them to your own object storage first.
  • Blurry images: most likely the standard tier is being upscaled on the frontend; switch to the 2K/4K tier;
  • Gray edges on white-background images: specify in the prompt “pure white background #FFFFFF, no shadows”;
  • File size too large: converting to webp on the server side (quality 80) can usually reduce size by 60–80% with no visible loss.