Skip to content
Docs menu

Image models

GPT-4o Image

On this page

High-fidelity image generation with strong text rendering.

modelIdgpt-4o-image
Modalityimage
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationEndpointDescription
Text to imagePOST /api/v1/generateBase generation from a text prompt.
Image to imagePOST /api/v1/generateCondition on a reference image — upload it via /api/v1/files/upload and pass the URL.
Poll taskGET /api/v1/task/{id}?model=gpt-4o-imageRetrieve state and result URLs.

Input parameters

FieldTypeRequiredValues / example
imageUrlimageoptionalPNG, JPG, or WEBP
prompttextarearequiredDescribe how you want to transform your image
sizeselectrequired3:2, 2:3, 1:1
isEnhanceselectoptionalfalse, 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"}}'