GPT-4o Image API

Build with GPT-4o image generation for text-to-image, image-to-image, and inpainting workflows. EvoLink routes requests asynchronously, returns task IDs, and delivers time-limited image URLs.

77 (suggested: 2,000)

Upload reference images

Click to upload or drag and drop

Supported formats: JPG, JPEG, PNG, WEBP
Maximum file size: 10MB; Maximum files: 10

Generated image 1

History

Max 20 items

0 running · 0 completed

Your generation history will appear here

GPT-4o Image API: text-accurate visuals and controllable edits

Create marketing graphics, product shots, and design assets with improved text rendering and instruction following. Use masks for precise edits, iterate with image-to-image, and pick sizes like 1024x1024, 1024x1536, or 1536x1024.

example 1

What can you build with the GPT-4o Image API?

Readable text in real designs

Generate posters, menus, UI mockups, and slides where copy stays legible and aligned to your layout.

example 2

Product and brand imagery at scale

Create consistent product shots and lifestyle scenes, then iterate with image-to-image for fast variations.

example 3

Targeted edits with masks

Submit a base image plus a transparency mask to replace or refine only the region you need.

example 4

Why developers choose the GPT-4o Image API

A single endpoint for generation and edits, backed by GPT-4o image generation. Async task IDs, flexible sizes, and reference-image guidance help teams ship faster.

Text fidelity for real-world assets

GPT-4o image generation is designed to improve text rendering and instruction adherence for production-ready visuals.

Unified modes in one API

Text-to-image, image-to-image, and image editing workflows share the same endpoint with a simple payload.

Reference-image guidance

Use uploaded images as visual references to keep details and style aligned across iterations.

How to integrate the GPT-4o Image API

Create, edit, and retrieve images through an async task flow.

1

Step 1 - Choose mode and size

Set your model to `gpt-4o-image`, then pick `1:1`, `2:3`, `3:2` or pixel sizes like `1024x1024`, `1024x1536`, and `1536x1024`.

2

Step 2 - Provide prompt and inputs

Send detailed instructions. For edits, include a base image and a mask so only the target region changes.

3

Step 3 - Poll task and download

Receive a task ID, query status, and download results. Image links are temporary, so save them promptly.

Core API Capabilities

Powered by GPT-4o image generation

Text

Text-Accurate Rendering

Designed to improve legible text in images and reduce spelling errors.

Editing

Image-to-Image and Editing

Support for text-to-image, image-to-image, and mask-based edits in one endpoint.

Sizes

Flexible Aspect Ratios

Use `1:1`, `2:3`, `3:2` or explicit pixel sizes like `1024x1536`.

Async

Async Task Workflow

Receive task IDs for generation and edits, then poll for completion.

Control

Reference Image Guidance

Use uploaded images as references to guide composition and detail.

Limits

Prompt Length Control

Prompts support up to 2000 tokens for detailed instructions.

GPT-4o Image API - Frequently Asked Questions

Everything you need to know about the product and billing.

Use text-to-image, image-to-image, and image editing workflows through a single endpoint.
Send a base image plus a mask image that marks the region to change; the model edits only that area.
Yes. Provide an input image and a prompt to preserve composition or style through image-to-image generation.
Use `1:1`, `2:3`, `3:2` or pixel sizes such as `1024x1024`, `1024x1536`, and `1536x1024`.
Yes. The API returns a task ID that you can poll for status.
Generated image links are valid for 24 hours, so download and store them promptly.
Prompts support up to 2000 tokens.
Pricing is usage-based and varies by size and plan. Check your EvoLink dashboard for current rates.
POST
/v1/images/generations

Generate Image

Create an image generation task using text prompts or reference images. Supports text-to-image, image-to-image, and image editing modes.

Asynchronous processing mode, use the returned task ID to .

Generated image links are valid for 24 hours, please save them promptly.

Request Parameters

modelstringRequiredDefault: gpt-4o-image

Image generation model name.

Examplegpt-4o-image
promptstringRequired

Prompt describing the image to be generated or how to edit the input image.

Notes
  • Limited to 2000 tokens
ExampleA cat playing in the grass
sizestringOptional

Size of the generated image. Supports ratio format and pixel format.

ValueDescription
1:1Square ratio
2:3Portrait ratio
3:2Landscape ratio
1024x1024Square (1024×1024)
1024x1536Portrait (1024×1536)
1536x1024Landscape (1536×1024)
Example1024x1024
nintegerOptional

Number of images to generate.

ValueDescription
1Generate 1 image
2Generate 2 images
4Generate 4 images
Notes
  • Pre-charged based on n value, actual charge based on generated count
Example1
image_urlsarrayOptional

Reference image URL list for image-to-image and image editing functions.

Notes
  • Max 5 images per request
  • Max size: 10MB per image
  • Formats: .jpeg, .jpg, .png, .webp
  • URLs must be directly accessible by the server
Examplehttps://example.com/image1.png
mask_urlstringOptional

Mask image URL for image editing.

Notes
  • Mask and reference image must be PNG format with same dimensions
  • Max size: 4MB
  • Cannot be used when image_urls contains more than 1 image
Examplehttps://example.com/mask.png
callback_urlstringOptional

HTTPS callback address after task completion.

Notes
  • Triggered on completion, failure, or cancellation
  • Sent after billing confirmation
  • HTTPS only, no internal IPs
  • Max length: 2048 chars
  • Timeout: 10s, Max 3 retries
Examplehttps://your-domain.com/webhooks/image-task-completed

Request Example

{
  "model": "gpt-4o-image",
  "prompt": "A beautiful sunset over the ocean with vibrant colors",
  "size": "1024x1024",
  "n": 1
}

Response Example

{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "gpt-4o-image",
  "object": "image.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "image",
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 2.5,
    "user_group": "default"
  }
}