GPT Image 2.6 Flare API
Generate animated GIF loops and stills from text prompts.
POST /v2/gpt-image-2.6-flare · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "gpt-image-2.6-flare",
9 prompt="A dark iron foundry: a heavy steel ladle tips and a glowing stream of molten metal pours into a sand mould below, a continuous fountain of bright orange sparks spitting off the falling stream and skittering across the cast-iron floor, heat haze rippling above the metal, deep shadows on the sooty brick walls behind. The pour runs steadily and the shower of sparks keeps cascading, so the last frame flows back into the first for a seamless loop. Gritty industrial realism, hard rim light from the molten glow. No people, no text, no logos, no brand marks, no readable signage.",
10 image_urls=[],
11 size="960x960",
12 quality="high",
13 complexity="high",
14 background="opaque",
15 moderation="auto",
16 output_format="gif",
17 frame_count=9,
18 frame_duration_ms=200,
19 output_compression=100,
20)
21print(result["status"]) # COMPLETED
22print(result.get("output")) # model output (e.g. media URL)
23print(result["metrics"]["inference_time"]) # server compute seconds
24
25# --- Or submit + poll manually (track request_id, control the cadence) ---
26from segmind import SegmindClient, InferenceFailed, InferenceTimeout
27
28client = SegmindClient() # reads SEGMIND_API_KEY
29payload = {
30 "prompt": "A dark iron foundry: a heavy steel ladle tips and a glowing stream of molten metal pours into a sand mould below, a continuous fountain of bright orange sparks spitting off the falling stream and skittering across the cast-iron floor, heat haze rippling above the metal, deep shadows on the sooty brick walls behind. The pour runs steadily and the shower of sparks keeps cascading, so the last frame flows back into the first for a seamless loop. Gritty industrial realism, hard rim light from the molten glow. No people, no text, no logos, no brand marks, no readable signage.",
31 "image_urls": [],
32 "size": "960x960",
33 "quality": "high",
34 "complexity": "high",
35 "background": "opaque",
36 "moderation": "auto",
37 "output_format": "gif",
38 "frame_count": 9,
39 "frame_duration_ms": 200,
40 "output_compression": 100,
41}
42job = client.submit_async("gpt-image-2.6-flare", **payload)
43print(job.request_id) # available immediately
44try:
45 result = job.wait(timeout=600, interval=1.0)
46except InferenceTimeout as e:
47 print("still running:", e.request_id)
48except InferenceFailed as e:
49 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "gpt-image-2.6-flare",
9 prompt="A dark iron foundry: a heavy steel ladle tips and a glowing stream of molten metal pours into a sand mould below, a continuous fountain of bright orange sparks spitting off the falling stream and skittering across the cast-iron floor, heat haze rippling above the metal, deep shadows on the sooty brick walls behind. The pour runs steadily and the shower of sparks keeps cascading, so the last frame flows back into the first for a seamless loop. Gritty industrial realism, hard rim light from the molten glow. No people, no text, no logos, no brand marks, no readable signage.",
10 image_urls=[],
11 size="960x960",
12 quality="high",
13 complexity="high",
14 background="opaque",
15 moderation="auto",
16 output_format="gif",
17 frame_count=9,
18 frame_duration_ms=200,
19 output_compression=100,
20)
21print(result["status"]) # COMPLETED
22print(result.get("output")) # model output (e.g. media URL)
23print(result["metrics"]["inference_time"]) # server compute seconds
24
25# --- Or submit + poll manually (track request_id, control the cadence) ---
26from segmind import SegmindClient, InferenceFailed, InferenceTimeout
27
28client = SegmindClient() # reads SEGMIND_API_KEY
29payload = {
30 "prompt": "A dark iron foundry: a heavy steel ladle tips and a glowing stream of molten metal pours into a sand mould below, a continuous fountain of bright orange sparks spitting off the falling stream and skittering across the cast-iron floor, heat haze rippling above the metal, deep shadows on the sooty brick walls behind. The pour runs steadily and the shower of sparks keeps cascading, so the last frame flows back into the first for a seamless loop. Gritty industrial realism, hard rim light from the molten glow. No people, no text, no logos, no brand marks, no readable signage.",
31 "image_urls": [],
32 "size": "960x960",
33 "quality": "high",
34 "complexity": "high",
35 "background": "opaque",
36 "moderation": "auto",
37 "output_format": "gif",
38 "frame_count": 9,
39 "frame_duration_ms": 200,
40 "output_compression": 100,
41}
42job = client.submit_async("gpt-image-2.6-flare", **payload)
43print(job.request_id) # available immediately
44try:
45 result = job.wait(timeout=600, interval=1.0)
46except InferenceTimeout as e:
47 print("still running:", e.request_id)
48except InferenceFailed as e:
49 print("failed:", e.detail)API Endpoint
https://api.segmind.com/v1/gpt-image-2.6-flareParameters
promptrequiredstringDescribes the image or animation, with legible in-image text. For GIFs, name the subject, the big motion and how the loop closes.
"A photoreal product photograph of a frosted glass bottle of artisanal hot sauce standing on a weathered wooden market stall, with three fresh red habanero peppers and a halved lime beside it. The wraparound kraft-paper label reads, in bold condensed serif lettering: 'EMBER & ASH' across the top, 'Smoked Habanero Hot Sauce' as the tagline beneath it, a small legible line 'habanero · smoked paprika · lime · sea salt', and '148 ml' in the lower corner. Condensation beads on the glass, a red wax-sealed cork, visible paper grain on the label, bright even daylight."backgroundoptionalstringBackground fill: opaque, transparent or auto. Use transparent with png, webp or gif for stickers and overlays; jpeg stays opaque.
"opaque""opaque""transparent""auto"complexityoptionalstringHow much Flare plans before rendering (high when omitted). Use low for quick drafts and simple edits; high for busy scenes.
"high""low""medium""high"frame_countoptionalintegerGIF only: number of frames, 2 to 16 (default 9). Use 9 at 1280x720 or 960x960; up to 16 at Auto size.
9Range: 2 - 16frame_duration_msoptionalintegerGIF only: how long each frame shows, in milliseconds (default 200). Use 80-120 for fast action, 200-300 for calmer loops.
200Range: 20 - 2000image_urlsoptionalstring[]Optional reference image URLs; adding any switches to edit mode. Add one clean photo to restyle it or set it in motion.
[]mask_image_urloptionalstring (uri)Optional alpha-channel PNG mask matching the first reference; transparent areas are regenerated. Use it to repaint one region precisely.
moderationoptionalstringContent-filter strictness: auto or low. Keep auto for most work; use low only for permitted use cases.
"auto""low""auto"output_compressionoptionalintegerCompression 0-100 for jpeg and webp. Keep 100 for crisp text; lower it to shrink files. Ignored for png and gif.
100Range: 0 - 100output_formatoptionalstringFile type: png, jpeg, webp or gif. Use gif for a looping animation, png for crisp text, webp for smaller files.
"png""png""jpeg""webp""gif"qualityoptionalstringRendering fidelity: low, medium, high or auto. Use low for fast motion drafts, high for final loops and crisp text.
"high""low""medium""high""auto"sizeoptionalstringOutput size; for GIF it is one frame. Use 1024x1536 for portrait stills, 1280x720 or 720x1280 for GIF loops up to 9 frames.
"1024x1536""1024x1024""1536x1024""1024x1536""1280x960""960x1280""1536x864""864x1536""1280x720""720x1280""960x960"+6 moreResponse Type
Returns: Text/JSON
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/gpt-image-2.6-flareSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out