GPT Image 1 Mini

GPT Image 1 Mini generates high-quality images from text descriptions, empowering efficient visual content creation.


API

If you're looking for an API, you can choose from your desired programming language.

POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') # Use this function to convert a list of image URLs to base64 def image_urls_to_base64(image_urls): return [image_url_to_base64(url) for url in image_urls] api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/gpt-image-1-mini" # Request payload data = { "prompt": "Design a pop-art urban street-inspired cover. Bright yellow, red, cyan with black/white contrast. Include graffiti textures, comic-style murals, playful stickers, and hand-drawn typography. Bold, energetic, and vibrant style, ideal for street festivals, concerts, or city cultural events.", "size": "1024x1024", "quality": "high", "moderation": "auto", "background": "opaque", "output_compression": 100, "output_format": "png" } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr * Affects Pricing

Describe the image you want to generate. Try using descriptive keywords and context for creative imagery or straight-forward terms for clear visuals.


sizeenum:str ( default: 1024x1024 ) Affects Pricing

Choose how big the image should be. Use square for fast results and larger sizes for detailed or wide visuals.

Allowed values:


qualityenum:str ( default: high ) Affects Pricing

Set the image's visual quality. Use high for intricate details or medium for efficiency without much compromise.

Allowed values:


moderationenum:str ( default: auto )

Choose moderation level for content. Use low for creative freedom, auto for balanced safety.

Allowed values:


backgroundenum:str ( default: opaque )

Decide if background should be see-through or solid. Transparent is best for overlays; opaque suits standalone images.

Allowed values:


output_compressionint ( default: 100 )

Select how compressed the output image is. A higher number preserves quality; lower numbers shrink file size.


output_formatenum:str ( default: png )

Choose the file type for saving. PNG is great for quality; jpeg for smaller files.

Allowed values:

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Resources to get you started

Everything you need to know to get the most out of GPT Image 1 Mini

GPT Image 1 Mini Guide

GPT Image 1 Mini is an API-driven text-to-image model that balances high-quality visuals with resource efficiency. Whether you’re building an e-commerce site, crafting social media graphics, or prototyping brand assets, this guide will help you pick the right parameters and write prompts that unlock the model’s full potential.

1. Crafting Effective Prompts

  • •Be specific. Instead of “futuristic city,” try “sleek neon-lit skyline at dusk with flying cars.”
  • •Include style cues. Add “watercolor,” “hyper-realistic,” or “flat design” to steer the mood.
  • •Describe composition. Mention camera angles (“overhead view,” “wide shot”) and lighting (“soft morning light,” “dramatic backlight”).
  • •Call out key elements. Specify objects, colors, textures, and focal points: “a red racing bicycle against a graffiti wall.”

2. Key Parameters & Recommendations

ParameterBest PracticeUse Case Examples
size1024x1024 for balanced detail & speed.Social posts, blog images.
1536x1024 or 1024x1536 for widescreen.Banners, header images.
auto for dynamic layouts.Responsive web design.
qualityhigh for final assets with fine detail.Print, marketing collateral.
medium for quick iterations.Prototyping, A/B tests.
low for thumbnails or placeholders.Wireframes, drafts.
moderationauto for safe defaults.Public-facing applications.
low for full creative freedom.Internal experimentation.
backgroundtransparent for overlays & compositing.UI elements, logos.
opaque for standalone visuals.Social media posts, presentations.
output_compression100 for max quality.Print, detailed art.
60–80 for web-optimized files.Websites, email campaigns.
output_formatpng for lossless quality.Logos, graphics with transparency.
jpeg for smaller photographs.Photo galleries, portfolios.
webp for modern web use.High-performance sites.

3. Advanced Tips

  • •Inpainting: Pass an existing image plus mask to refine or extend visuals.
  • •Style reference: Supply a URL to an example image and mention “in the style of this reference” to match textures or color palettes.
  • •Batch requests: Send arrays of prompts with shared parameters for bulk generation—ideal for catalog images or product variations.
  • •Rate limits & caching: Implement local caching of generated outputs to reduce repeated calls and speed up your app.

4. Workflow Examples

  1. •E-commerce Catalog: size=1024x1024, quality=medium, background=opaque, format=jpeg, compression=80.
  2. •Blog Feature Image: size=1536x1024, quality=high, background=opaque, format=png, compression=100.
  3. •UI Icon Set: size=1024x1024, quality=high, background=transparent, format=png, compression=100.

Use these guidelines to streamline your integration with GPT Image 1 Mini and produce compelling visuals at scale.

Other Popular Models

Discover other models you might be interested in.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.