Skip to main content
This quickstart creates a GPT Image 2 task, captures its APIPod task ID, and polls the result endpoint.
1

Create an API key

Sign in to the APIPod Console, create an API key, and copy it when it is displayed.
2

Set local environment variables

Use a stable, unique idempotency key for one logical create operation. If a network failure makes the result ambiguous, retry with the same key and unchanged JSON body.
3

Create an image task

A successful create response has this envelope:
4

Poll the task

Continue polling while the status is pending or processing. Stop when it becomes completed, failed, or cancelled.

Completed response

HTTP 200 from the create endpoint means the task was accepted. It does not mean the image or video has finished generating.

GPT Image 2 parameters

Review every supported field and all five language examples.

Task lifecycle

Add production polling, webhooks, and terminal-state handling.