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 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/gpt-image-1-mini"; const 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" }; (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

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.

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

Edited by Segmind Team on October 12, 2025.

What is GPT Image 1 Mini?

GPT Image 1 Mini is a dynamic text-to-image AI model that works through a sophisticated API interface. Its ability to create sharp images from descriptive text prompts makes it a go-to tool for developers and businesses who need high-quality images in quick succession. GPT Image 1 Mini is also packed with crucial editing options, including inpainting and style reference, empowering users with greater control over the image quality. It renders premium images while maintaining resource efficiency, making it optimal for applications and automated workflow integration.

Key Features of GPT Image 1 Mini

  • Flexible image resolution: It supports multiple resolution options: 1024x1024, 1536x1024, 1024x1536
  • Adjustable quality settings: Users can optimize the output quality via the available settings: low, medium, and high
  • Multiple output formats: The model supports versatile image formats, including PNG, JPEG, and WebP, with customizable compression
  • Dual Background options: It has the settings for either a transparent or an opaque background
  • Content moderation: It can manage the output to ensure it falls within the acceptable standards for safe deployment
  • Multiple editing options: It comes with inpainting and style reference capabilities for better control over the image quality
  • API-first architecture: It makes it possible to integrate the model seamlessly

Best Use Cases

  • Digital Content Creation: It is a perfect model to generate magazine covers, blog imagery, and social media visuals
  • E-commerce: It can create product visualization and catalog imagery
  • Marketing Materials: It can be a great platform to design banners, advertisements, and promotional content
  • Publishing: Writers and publishing firms can use it to produce book covers and editorial illustrations
  • Prototyping: It can save precious time by generating quick design concepts and mockups
  • Bulk Image Generation: It is optimum for automating visual content creation for large-scale projects

Prompt Tips and Output Quality

  • Specify the visual details in your prompts, e.g.: "modern minimalist style" rather than just "modern"
  • Include artistic direction, i.e., lighting, perspective, and mood, for more precise results
  • Use the high-quality setting for detailed illustrations and professional output
  • Incorporate transparent backgrounds when creating assets for layered designs
  • Adjust output compression based on your use case:100 for maximum quality and lower for web optimization

FAQs

How does GPT Image 1 Mini compare to other image models? GPT Image 1 Mini focuses on efficiency by rendering production-ready images with robust API integration capabilities, making it ideal for business applications and automated workflows.

What's the recommended image size for best results? Go with 1024x1024 for the most balanced output. Use 1536x1024 or 1024x1536 for specialized aspect ratios that need more detail.

Can I use the model for commercial projects? Yes, GPT Image 1 Mini is designed for commercial projects; it can also be integrated into various business applications through its API.

How can I optimize image quality vs. generation speed? Balance the quality parameter (high/ medium/ low) with your desired image output. Use 'medium' for rapid prototyping and 'high' for final assets. The output compression setting can further improve the results.

Does the model support image editing features? Yes, it supports inpainting and style reference features, for image modification and style-guided generation.