Image OpenAI

GPT-4o Image API

Use the GPT-4o Image API via RunAPI with a model skill, unified auth, and pay-as-you-go pricing.

runapi.ai
curl -X POST https://runapi.ai/api/v1/gpt_4o_image/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-4o-image",
  "prompt": "Based on our conversation about the brand redesign, generate a mockup of the new homepage hero section."
}'
import { Gpt4oImageClient } from "@runapi.ai/gpt-4o-image";

const client = new Gpt4oImageClient();
const result = await client.textToImage.run({
    model: "gpt-4o-image",
    prompt: "Based on our conversation about the brand redesign, generate a mockup of the new homepage hero section.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\Gpt4oImage\Gpt4oImageClient;

$client = new Gpt4oImageClient();
$result = $client->textToImage->run([
        'model' => 'gpt-4o-image',
        'prompt' => 'Based on our conversation about the brand redesign, generate a mockup of the new homepage hero section.',
]);
require "runapi/gpt_4o_image"

client = RunApi::Gpt4oImage::Client.new
result = client.text_to_image.run(
    model: "gpt-4o-image",
    prompt: "Based on our conversation about the brand redesign, generate a mockup of the new homepage hero section."
)
npx skills add runapi-ai/gpt-4o-image -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/gpt-4o-image v1
OVERVIEW

About GPT-4o Image

GPT-4o Image enables native image generation directly within GPT-4o conversations, combining language understanding with visual creation in a single model. It interprets conversational context to produce contextually accurate images.

Provider
OpenAI
Modality
Image
PRICING

Pricing

Failed generations are not charged
Text to image
$0.06-$0.24 / image
2 images $0.12
4 images $0.24
SPEC SHEET

Technical details

Model ID gpt-4o-image
Provider OpenAI
Modality image
Task type asynchronous
Billing unit call
API endpoint /api/v1/gpt_4o_image/text_to_image
Commercial license Yes — included via API
Catalog status Operational
Agent integration

Run GPT-4o Image From an Agent

HOW IT WORKS

Get Started with GPT-4o Image

  1. Create an API key

    Sign up and generate an API key from the dashboard.

  2. Pick a version

    Choose the version that best matches your quality and cost requirements.

  3. Send a request

    Submit your prompt and parameters to the model's documented endpoint.

  4. Get your result

    Poll the task or set a webhook, then download the completed output.

CONTEXT

About GPT-4o Image on RunAPI

GPT-4o Image integrates visual creation natively into GPT-4o, combining reasoning with generation. Through RunAPI, it shares the same API access and billing as all OpenAI models.

Provider
OpenAI
See all →
Modality
Image
Browse models →

Why Use GPT-4o Image Through RunAPI

One auth, every provider

A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.

Unified pricing & billing

Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.

Schema-first SDK

Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.

GPT-4o Image Questions

What makes GPT-4o Image different from GPT Image?

GPT-4o Image generates images natively within the GPT-4o conversation, using conversational context to inform the image. GPT Image is a standalone generation endpoint.

How does conversational context help?

The model uses the full conversation history to understand what you want — you can iteratively refine images by describing changes in natural language.

How many objects can it handle in one image?

GPT-4o Image handles many distinct objects in a single scene while maintaining compositional coherence and object identity.

Can I edit a previously generated image?

Yes — describe the changes in the conversation and the model modifies the existing image while preserving the rest of the scene.

Is it good for iterative design workflows?

Yes — the conversational interface makes it natural to iterate: generate, review, describe adjustments, and regenerate without rewriting the full prompt.

Which variant should I start with?

Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.

SIMILAR MODELS

Similar Image Models

Start generating with GPT-4o Image