
Portrait of an elderly fisherman mending a net at dawn, shot on 35mm film1024×1536, medium 
Night market noodle stall in the rain, neon reflected in puddles1536×1024, medium 
Vintage travel poster for Kyoto, the word KYOTO in bold letters across the top1024×1536, medium 
Isometric illustration of a tiny bookshop on a rainy street corner1024×1024, medium 
Watercolour botanical study of a fern, labelled in pencil1024×1536, medium
GPT Image 2, $0.02 a print.
OpenAI-compatible. Change one base_url; failed calls cost nothing.
Request accessSame SDK, new base_url.
Keep your OpenAI SDK. Point base_url at apiaiapi, use an apiaiapi key, and images.generate and images.edit run as they are.
from openai import OpenAI
client = OpenAI(
base_url="https://api.apiaiapi.com/v1",
api_key="sk-...",
)
img = client.images.generate(
model="gpt-image-2",
prompt="Night market noodle stall in the rain",
size="1536x1024",
)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.apiaiapi.com/v1",
apiKey: "sk-...",
});
const img = await client.images.generate({
model: "gpt-image-2",
prompt: "Night market noodle stall in the rain",
size: "1536x1024",
});
curl https://api.apiaiapi.com/v1/images/generations \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"model": "gpt-image-2",
"prompt": "Night market noodle stall in the rain",
"size": "1536x1024"}'
Hand it in, come back for it.
A print takes a while. The async endpoints answer at once with a task id; poll it and collect a hosted URL.
- 01
Submit
Returns 202 straight away.
POST /v1/images/generations/async 202 { "id": "task_JQ40Zws5uSYUQFPIwV0tJg", "object": "image.task", "status": "queued" } - 02
Develop
Poll the task while it runs.
GET /v1/tasks/task_JQ40Zws5uSYUQFPIwV0tJg { "id": "task_JQ40Zws5uSYUQFPIwV0tJg", "status": "running" } - 03
Collect
Image URLs stay up for 7 days.
GET /v1/tasks/task_JQ40Zws5uSYUQFPIwV0tJg { "status": "succeeded", "data": [{ "url": "https://img.apiaiapi.com/2026-12-04/task_JQ40Zws5uSYUQFPIwV0tJg-0.png" }], "size": "1536x1024", "quality": "medium" }
Night market noodle stall in the rain, neon reflected in puddles
One price, per print.
$0.02
per image, any size or quality
You pay for the images that come back.
- Model
- GPT Image 2
- Sizes
- 1024×1024, 1024×1536, 1536×1024, auto
- Quality
- Low, medium, high, auto
- Endpoints
- Generations and edits, sync or async
- Failed calls
- Refunded in full
Lab notes.
- What happens when a call fails?
- Upstream errors and timeouts are refunded in full. If fewer images come back than you asked for, you pay only for those.
- Sync or async?
- Sync holds the request open until the image is ready. Async answers at once with a task id, which suits serverless timeouts.
- Why invite-only?
- Generation runs on shared capacity. Seats open in batches so the queue stays short for everyone already in.
- Which SDKs work?
- Any OpenAI SDK, or plain HTTP. Only the base_url and the key change.