OpenAI
GPT Image 2 Generation
Create asynchronous image generation tasks with gpt-image-2 via POST /v1/predictions (function image).
POST
Authorizations
Authorization: Bearer YOUR_API_KEY
Body
application/json
Model ID. Use gpt-image-2 for this endpoint.
Available options:
gpt-image-2 Example:
"gpt-image-2"
Task type. Must be image for image generation.
Available options:
image Example:
"image"
Optional HTTPS callback URL when the task completes, fails, or is cancelled (Predictions API).
Response
Async task created