GPT Image 2.6 Flare API

Generate animated GIF loops and stills from text prompts.

PlaygroundAPI
Pricing
~14.48s
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)

API Endpoint

POSThttps://api.segmind.com/v1/gpt-image-2.6-flare

Parameters

promptrequired
string

Describes the image or animation, with legible in-image text. For GIFs, name the subject, the big motion and how the loop closes.

Default: "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."
backgroundoptional
string

Background fill: opaque, transparent or auto. Use transparent with png, webp or gif for stickers and overlays; jpeg stays opaque.

Default: "opaque"
Allowed values :
Opaque→"opaque"
Transparent→"transparent"
Auto→"auto"
complexityoptional
string

How much Flare plans before rendering (high when omitted). Use low for quick drafts and simple edits; high for busy scenes.

Default: "high"
Allowed values :
Low→"low"
Medium→"medium"
High→"high"
frame_countoptional
integer

GIF only: number of frames, 2 to 16 (default 9). Use 9 at 1280x720 or 960x960; up to 16 at Auto size.

Default: 9Range: 2 - 16
frame_duration_msoptional
integer

GIF only: how long each frame shows, in milliseconds (default 200). Use 80-120 for fast action, 200-300 for calmer loops.

Default: 200Range: 20 - 2000
image_urlsoptional
string[]

Optional reference image URLs; adding any switches to edit mode. Add one clean photo to restyle it or set it in motion.

Default: []
mask_image_urloptional
string (uri)

Optional alpha-channel PNG mask matching the first reference; transparent areas are regenerated. Use it to repaint one region precisely.

moderationoptional
string

Content-filter strictness: auto or low. Keep auto for most work; use low only for permitted use cases.

Default: "auto"
Allowed values :
Low→"low"
Auto→"auto"
output_compressionoptional
integer

Compression 0-100 for jpeg and webp. Keep 100 for crisp text; lower it to shrink files. Ignored for png and gif.

Default: 100Range: 0 - 100
output_formatoptional
string

File type: png, jpeg, webp or gif. Use gif for a looping animation, png for crisp text, webp for smaller files.

Default: "png"
Allowed values :
PNG→"png"
JPEG→"jpeg"
WEBP→"webp"
GIF→"gif"
qualityoptional
string

Rendering fidelity: low, medium, high or auto. Use low for fast motion drafts, high for final loops and crisp text.

Default: "high"
Allowed values :
Low→"low"
Medium→"medium"
High→"high"
Auto→"auto"
sizeoptional
string

Output size; for GIF it is one frame. Use 1024x1536 for portrait stills, 1280x720 or 720x1280 for GIF loops up to 9 frames.

Default: "1024x1536"
Allowed values (16 total):
"1024x1024""1536x1024""1024x1536""1280x960""960x1280""1536x864""864x1536""1280x720""720x1280""960x960"+6 more

Response 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. 1
    POST /v2/gpt-image-2.6-flare

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • 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.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out