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);
}
})();
Text input to generate the desired image. For a 3D action figure, describe clothing and accessories vividly.
URLs of source images. Include multiple URLs for diverse image references.
Input Image for masking. Use when specific parts of the image need editing.
Image resolution selection. Use 'auto' for default or 1024x1024 for quicker generation.
Allowed values:
Controls output image quality. 'Auto' suits most needs while 'high' is best for detailed outputs.
Allowed values:
Chooses between transparent or opaque background. Use 'transparent' for standalone figures.
Allowed values:
Set compression level from 1-100. Use 100 for no compression and optimal quality.
Choose image format: PNG for transparency, JPEG for smaller file size.
Allowed values:
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.
Edited by Segmind Team on October 13, 2025.
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.
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.