Image OpenAI

GPT Image API

Use the GPT 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_image/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-1.5",
  "prompt": "Generate a flat-design illustration of a team collaborating around a whiteboard, vibrant colors, clean lines."
}'
import { GptImageClient } from "@runapi.ai/gpt-image";

const client = new GptImageClient();
const result = await client.textToImage.run({
    model: "gpt-image-1.5",
    prompt: "Generate a flat-design illustration of a team collaborating around a whiteboard, vibrant colors, clean lines.",
});
<?php

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

use RunApi\GptImage\GptImageClient;

$client = new GptImageClient();
$result = $client->textToImage->run([
        'model' => 'gpt-image-1.5',
        'prompt' => 'Generate a flat-design illustration of a team collaborating around a whiteboard, vibrant colors, clean lines.',
]);
require "runapi/gpt_image"

client = RunApi::GptImage::Client.new
result = client.text_to_image.run(
    model: "gpt-image-1.5",
    prompt: "Generate a flat-design illustration of a team collaborating around a whiteboard, vibrant colors, clean lines."
)
npx skills add runapi-ai/gpt-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-image v1
OVERVIEW

About GPT Image

GPT Image is OpenAI's image generation model supporting both text-to-image and image editing creation with strong compositional control. It produces high-quality visuals across photorealistic and stylized outputs.

Provider
OpenAI
Modality
Image
PRICING

Pricing

Failed generations are not charged
Edit image
$0.22 / image
Text to image
$0.12-$0.22 / image
Quality: high $0.22
Quality: medium $0.12
SPEC SHEET

Technical details

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

Run GPT Image From an Agent

HOW IT WORKS

Get Started with GPT 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 Image on RunAPI

GPT Image is OpenAI's image generation model, supporting text-to-image and image editing. Through RunAPI, all GPT Image endpoints share one key and per-call pricing.

Provider
OpenAI
See all →
Modality
Image
Browse models →

Why Use GPT 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 Image Questions

What endpoints does GPT Image support?

Text-to-image and image editing. Both accept detailed text prompts with compositional instructions.

How does compositional control work?

GPT Image follows spatial layout instructions in your prompt — you can specify where objects appear, relative sizes, and arrangement within the frame.

What output sizes are available?

3 fixed sizes up to 1536 pixels.

How does GPT Image compare to GPT Image 2?

GPT Image 2 is the newer model with near-perfect multilingual text rendering and up to 4K output. GPT Image is the prior generation with strong compositional control.

Can I use GPT Image for editing?

Yes — the image editing endpoint accepts a source image and modifies it based on your text prompt, acting as an image editing tool.

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 Image

Endpoints

  • edit_image
  • text_to_image

Category

Provider

Docs