Image models
GPT-4o Image
On this page
High-fidelity image generation with strong text rendering.
| modelId | gpt-4o-image |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | Endpoint | Description |
|---|---|---|
| Text to image | POST /api/v1/generate | Base generation from a text prompt. |
| Image to image | POST /api/v1/generate | Condition on a reference image — upload it via /api/v1/files/upload and pass the URL. |
| Poll task | GET /api/v1/task/{id}?model=gpt-4o-image | Retrieve state and result URLs. |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| imageUrl | image | optional | PNG, JPG, or WEBP |
| prompt | textarea | required | Describe how you want to transform your image |
| size | select | required | 3:2, 2:3, 1:1 |
| isEnhance | select | optional | false, true |
Example request
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"gpt-4o-image","input":{"prompt":"A watercolor map of a fictional seaside town, hand-lettered street names, tiny sailboats in the bay, pastel palette.","size":"3:2","isEnhance":"false"}}'