POST
javascript
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 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/gpt-image-1-edit-mini"; const data = { "prompt": "Use the reference airship scene. Make it larger scale and more dynamic, with multiple airships in the sky, steam trails, moving propellers, and adventurous characters posing heroically. Retain steampunk details and style.", "image_urls": "https://segmind-resources.s3.amazonaws.com/input/be87b383-38d7-435e-a795-5ece083301e9-0f4a926b22d2b98cf40bf1e17385deed_0.jpeg", "size": "auto", "quality": "auto", "background": "opaque", "output_compression": 100, "output_format": "png", "moderation": "auto" }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
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

Text input to generate the desired image. For a 3D action figure, describe clothing and accessories vividly.


image_urlsstr *

URLs of source images. Include multiple URLs for diverse image references.


maskstr *

Input Image for masking. Use when specific parts of the image need editing.


sizeenum:str ( default: auto ) Affects Pricing

Image resolution selection. Use 'auto' for default or 1024x1024 for quicker generation.

Allowed values:


qualityenum:str ( default: auto ) Affects Pricing

Controls output image quality. 'Auto' suits most needs while 'high' is best for detailed outputs.

Allowed values:


backgroundenum:str ( default: opaque )

Chooses between transparent or opaque background. Use 'transparent' for standalone figures.

Allowed values:


output_compressionint ( default: 100 )

Set compression level from 1-100. Use 100 for no compression and optimal quality.


output_formatenum:str ( default: png )

Choose image format: PNG for transparency, JPEG for smaller file size.

Allowed values:


moderationenum:str ( default: auto )

Controls image generation moderation strictness. Opt for 'low' to reduce restrictions.

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.

GPT Image 1 Mini: Text-to-Image Generation Model

Edited by Segmind Team on October 13, 2025.

What is GPT Image 1 Mini?

GPT Image 1 Mini is an intuitive AI model that seamlessly processes text and image inputs together, generating the finest quality images. In addition to it, it is also integrated with 'inpainting', a versatile editing feature, enabling users to fine-tune their images as per their requirements. GPT Image 1 Mini's creative power and smooth performance make this multimodal tool a trusted option for developers and teams aiming to produce impressive images at scale.

Key Features of GPT Image 1 Mini

  • Multimodal processing that processes text and image inputs simultaneously
  • Flexible resolution can support options up to 1536×1024
  • Advanced inpainting offers precise image editing
  • Customizable output option that includes quality levels and image formats
  • Transparent backgrounds for enhanced image quality
  • Multiple output format that supports multiple options: PNG, JPEG, and WebP
  • Adjustable moderation controls for content generation to further fine-tune the images

Best Use Cases

  • Product visualization and e-commerce imagery
  • Digital content creation and marketing assets
  • Character design and concept art development
  • Bulk image generation for web applications
  • Professional editing and image manipulation
  • UI/UX design mockups and prototypes
  • Educational content and visual aids

Prompt Tips and Output Quality

  • Provide precise descriptions: Especially when you need to focus on clothing, accessories, and environmental details in the image
  • Utilize size parameters strategically: Go for 1024x1024 for faster generation and 1536x1024 for higher detail
  • Set quality to "high": To get the best results when there are intricate details in the image or you need professional-level quality
  • Use transparent background: When the image has standalone objects
  • Consider compression levels: Depending on the use case, select 100 for maximum quality, or a lower value for optimization
  • Choose output formats: Depending on the desired output, opt for: **PNG **for transparency, JPEG for smaller files, or WebP for web optimization

FAQs

How does GPT Image 1 Mini handle complex scenes? GPT Image 1 Mini excels at generating detailed scenes, and it further gives enhanced outputs with clear and specific prompts. Breaking complex scenes into clear, descriptive prompts renders more effective and accurate results.

What's the recommended resolution for most use cases? The 1024x1024 resolution is ideal for most applications as it offers a balance of speed and quality; use 1536x1024 when higher detail is crucial.

Can I use this model for commercial projects? Yes, the model is designed for professional and commercial use; it supports various business applications from e-commerce to digital marketing with the capability to generate images at scale.

How can I optimize image quality for my specific needs? You can easily adjust the quality parameter based on your use case: "high" for detailed professional work, "medium" for general use, and "low" for rapid prototyping. You can further integrate this with appropriate compression levels and output formats for the desired results.