There is no public download endpoint that accepts a ChatGPT `gen_id` — it is internal generation metadata, not a file reference. The app's own image links (`chatgpt.com/backend-api/...`) are signed and session-scoped: stripped params give HTTP 422 listing missing `p`/`ts` fields; aged-out files give 404 `ResourceNotFound`. To retrieve an existing image: use the in-app download button while the conversation exists, then re-upload the file to storage you control. For programmatic image URLs, generate via hiapi `POST /v1/tasks` with bare model id `gpt-image-2` ($0.03/image per the live pricing page) and read `output[0].url` from the task result. Every generated-image URL is a pickup token with an expiry — download the bytes before `expireAt` and host your own copy.
hiapi
Guide · Jul 21, 2026


ChatGPT image links (`chatgpt.com/backend-api/...`, `files.oaiusercontent.com/...`) are signed, session-scoped, and expire — they were never meant to be embedded or fetched programmatically. A `gen_id` is internal generation metadata; no public endpoint resolves it to an image file. Real failure modes: HTTP 422 listing missing `p`/`ts` signature params, and HTTP 404 `ResourceNotFound` once the file or link ages out. For programmatic images, generate via an API and download immediately: hiapi `/v1/tasks` with bare model id `gpt-image-2` returns `output[0].url` with an explicit `expireAt`. The only stable image URL is one you host yourself: download the bytes, upload to your own storage, store your own URL.

A complete short-form video pipeline built on veo-3.1/image-to-video: generate a 9:16 source still, submit one async task, and get back a vertical clip with model-generated audio — every output in the post is a real first take. Includes the live-verified input schema, a draft-cheap-finish-sharp workflow using veo-3.1-fast at $0.25/s, batch submission code, and measured generation times.

Three copy-paste image-to-video prompt recipes for the standard hailuo-2.3 tier, each shown with the exact prompt and the real, first-take 6-second clip it produced. Recipes stress what the standard tier is best at: sustained full-body human motion with trailing cloth, backlit water-droplet physics, and style-faithful animation of an ink-wash illustration. Includes the strict three-field task API schema, a standard-vs-fast tier workflow, and per-clip pricing ($0.40/6s) verified against the live pricing API.

Six copy-paste text-to-image prompts for seedream-4.5, each shown with its real, unretouched first output. All 14 quoted text strings across the post — headlines, date lines, labels, menu items, a button — rendered correctly on first takes; the single retake was a branding fix, not a text fix. Covers the tier's practical edge: $0.045 flat per image at 2K or 4K, eight aspect ratios, 61-112 s per task, and a strict 3-field schema.

Five copy-paste grok-imagine/image-to-image prompts, each paired with its reference image(s) and the raw first-take output it produced on the live hiapi task API - hosted permanently, no retries hidden. The base tier costs a flat $0.035 per image - half the quality tier - and handled a recolor, a scene relocation, a watercolor restyle, a two-reference composite and a sticker conversion first-take. With no strength, seed or negative-prompt fields, the prompt is the whole control surface: every recipe leans on a change-clause plus an explicit keep-clause.

Four copy-paste grok imagine image editing prompts, each paired with its input image and the raw first-take output it produced on the live hiapi API - hosted permanently, no retries hidden. The live-verified schema is prompt + image_urls (1-3 public URLs) plus optional resolution (lowercase 1k/2k) and aspect_ratio (auto + 13 fixed ratios) - no strength, seed or mask; unknown fields 400. The core technique is a change-clause/keep-clause split: state the edit first, then enumerate everything that must survive - the keep-clause is the only consistency control the API gives you. Covers targeted relighting (golden hour with identity locked), photo-to-watercolor style transfer, studio packshot to lifestyle scene swaps, and multi-reference product-into-scene composites. Flat $0.07 per output image at either resolution, with edits returning in 27-39 seconds - the whole article's media bill, bases and cover included, was $0.37.

Four copy-paste kling-3.0-turbo image-to-video prompt recipes, each showing the input first frame, the exact motion prompt, and the real clip generated on the live hiapi API — raw first outputs, hosted permanently. Covers a product-shot orbit for e-commerce, a vertical 9:16 portrait cinemagraph, a frozen action moment continued with believable physics, and a living-photo landscape loop. Schema verified live before generating: prompt + image_urls (exactly one public URL) + duration (integer 3-15s) + resolution (720p/1080p); no aspect_ratio field — output follows the input frame. Pricing is per second: $0.13/s at 720p and $0.16/s at 1080p, same flat rate as the t2v variant — a 5s clip is $0.65, a 3s probe $0.39. The core i2v prompting rule: never re-describe the frame — reference its contents, then spend the whole prompt on motion, camera, and what must stay put.

Six copy-paste image-to-image prompts for seedream-4.5, each shown with its real input and unretouched output. Covers the budget tier's distinctive strengths: $0.045 per edit, up to 14 reference images, and 4K output that the 5.0-pro tier doesn't offer. Includes the exact 4-field task API schema (probed against the live endpoint), a working curl example, and the failure modes we hit — spreading materials and drifting ingredient counts.

hiapi's image-to-image endpoints (flux-2, seedream-4.5, seedream-5.0-pro, gpt-image-2) do object removal and inpainting without masks — you describe the edit in the prompt and the model localizes it. All four share the same async lifecycle (POST /v1/tasks, poll or callback, download output[0].url) but have strict, mutually incompatible input schemas, each validated against the live API in this guide.
Get the latest model launches, engineering deep-dives, and API tutorials delivered straight to your inbox.
Email subscription is coming soon
No spam. Quality content on AI image & video generation, unsubscribe anytime.