Open API
GPT Image 2 API Reference
Explore the standard OpenAPI documentation for image generation, task lookup, and credits. Agents and developer tools can read the same spec directly from /openapi.json.
Recommended API workflow
Use the API when you want your own tools, agents, or scripts to create GPT Image 2 tasks. The API returns a task first, then you query that task until the provider finishes generating the image.
Create a key
Create a paid-account API key and send it as Authorization: Bearer sk-gip-...
Create and poll
POST a prompt to /api/open/v1/images/generations, then GET the returned task id until status becomes success or failed.
Review results
API-created images appear in /workspace/history with an API badge, alongside web-generated images.
OpenAPI 3.1 Reference
Human-readable docs and the machine-readable spec are generated from the same OpenAPI source.