Skip to main content
APIPod exposes an OpenAI-native, synchronous images API under a dedicated base URL. Point any OpenAI SDK, agent framework, or OpenAI-compatible software at it and the image result is returned in the HTTP response itself — no task polling required.
The asynchronous task API under https://api.apipod.ai/v1 is unchanged. The /openai/v1 prefix exists so both styles can coexist on the same API key. Short requests also work against https://api.apipod.ai/openai/v1.

Create image

POST /openai/v1/images/generations Returns the generated images directly, in the standard OpenAI response format.

Request body

Unknown fields sent by OpenAI SDKs (for example input_fidelity) are ignored.

Python SDK example

Edit image

POST /openai/v1/images/edits Accepts multipart/form-data with the image to edit, an optional mask for inpainting, and a text prompt. Use an edit-capable model such as gpt-image-2 / gpt-image-2-edit or a seedream-*-edit variant.
Uploaded image/mask files (and any base64 data URIs sent as image_urls) are persisted to your asset storage when the task is created. The stored task request keeps asset URLs instead of inline base64, so the same record also serves later status queries and worker retries.

Timeouts

Synchronous calls block until the image is ready. If the task takes longer than the server-side wait window (default 300 seconds, tunable via OPENAI_IMAGE_SYNC_TIMEOUT), the API responds with HTTP 504 and a sync_image_timeout error whose message contains the task_id:
The task is not cancelled — it keeps running to completion, billing settles normally, and the result can be fetched with the standard asynchronous status endpoint:
Configure your client’s HTTP timeout above the server wait window (for example 320 seconds) so slow generations surface as the API’s 504 with a queryable task_id instead of a client-side disconnect.

Errors

Errors use the OpenAI error envelope: Billing, moderation, retries, failover, and asset storage behave exactly like the asynchronous API — the synchronous endpoints are a delivery-mode wrapper over the same pipeline.