Blog
AI Image & Video API Guides
Hands-on model tests, production tutorials, prompt techniques, and current API pricing for generative media teams.

Inside Codex's Agent Loop: Lessons from Datadog and Sora's 28-Day Android Launch
The Codex agent loop is a simple control flow — prepare prompt, model inference, optional tool call, append result, repeat — that terminates when the model emits a normal assistant message. Three implementation details make it production-grade: prefix caching on the Responses API, tool-call results that live inside the conversation, and termination detected from output shape (not a turn counter). Datadog uses the loop for system-level code review on every PR across 1,000+ engineers; its incident-replay harness showed Codex catching ~22% of historical incident-related issues human reviewers had missed. OpenAI shipped Sora for Android in 28 days with four engineers, ~85% Codex-generated code, and a 99.9% crash-free rate — by scaffolding with exemplars and AGENTS.md, not by prompting 'go build it.' The same agent-loop architecture transfers to media-generation agents built on hiapi: stable system prompt + tool-call accumulation + critique-based termination, wrapping image and video endpoints.

Does GPT Image 2 Really Nail Text? We Stress-Tested Signage, Posters and Labels
Across 24 text-heavy generations — including English headlines, CJK calligraphy, multi-string infographics, embedded brand blocks, currency, and dense UI mockups — every primary string rendered correctly. GPT Image 2 will sometimes add contextually appropriate text you didn't ask for (brand monograms, founding-year badges, scent names). Useful most of the time, undesired occasionally. The remaining ~1% error rate at production scale shows up on the smallest text — sub-12pt captions, dense legal copy, ingredient lists. Always proof at 100% zoom before shipping. If text matters, lock it in straight quotes. Smart quotes get rendered as smart quotes. Special characters (em-dashes, ampersands) work; single-character substitutions are the most common failure mode when they occur.

GPT Image 2 E-commerce Workflow: From Product Spec to Listing Set
Write one fixed product specification, then vary only the shot instructions to build a more consistent listing set. The workflow covers a white-background packshot, alternate angle, detail, lifestyle scene, and packaging with verified on-pack text. Three retained outputs include their exact prompts, aspect ratios, task IDs, and recorded task costs. A reusable Python script submits a complete shot list without repeating generic task-polling documentation.

GPT Image 2 Review: A Hands-On Honest Take
Text rendering is the real upgrade — English headlines, CJK calligraphy, in-image labels and prices all render correctly the first time. Photorealism is genuinely strong for product photography and detailed interiors. Portraits are good but occasionally read as slightly 'too symmetric'. Speed is a step backward from GPT Image 1.5: ~107 seconds per image versus 18–36 seconds. Plan workflows around it. Hard limit: no transparent backgrounds. If you need PNG cutouts, you're still going to need a second model or a background remover.

15 GPT Image 2 Prompt Templates With Real Outputs
Fifteen copy-ready prompts are paired with the real outputs retained from HiAPI's first-party generation tests. The collection covers product photography, product ads, posters, infographics, brand concepts, icons, food, and editorial illustration. Three product-ad recipes retain their aspect ratios, task IDs, filled variables, and recorded task costs. Each template separates reusable creative direction from the product, headline, scene, or subject you need to replace.

GPT Image 2 vs Nano Banana 2: Side-by-Side With the Same Prompts
GPT Image 2's marquee text-rendering advantage has narrowed — Nano Banana 2 renders English and CJK headlines just as accurately, and even adds contextually appropriate label text on its own. Nano Banana 2 produces more believable photorealism (portraits, product photography), while GPT Image 2 keeps a slight edge on editorial typography craft. Nano Banana 2 effectively ignores precise aspect-ratio requests — square or near-square is what you get. GPT Image 2 honors 3:2, 2:3, and 9:16 reliably. Regular 1K pricing: GPT Image 2 is $0.03 per image, Nano Banana 2 is $0.036 — 20% more. Speed is comparable on average.

GPT Image 2 API Pricing: Cost per Image vs OpenAI, fal and Kie
HiAPI matches Kie at 1K, costs less at 2K and 4K, and sits below the medium-quality price on OpenAI, fal and WaveSpeed. On HiAPI, GPT Image 2 is $0.03 / $0.04 / $0.06 at 1K / 2K / 4K, for text-to-image and image-to-image alike. Real outputs at all three resolutions show when 2K or 4K is worth paying for.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.