Image OpenAI

GPT Image 2 API

Use the GPT Image 2 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_2/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "Generate a greeting card with '新年快乐 Happy New Year' in decorative calligraphy, gold and red theme."
}'
import { GptImage2Client } from "@runapi.ai/gpt-image-2";

const client = new GptImage2Client();
const result = await client.textToImage.run({
    model: "gpt-image-2",
    prompt: "Generate a greeting card with '新年快乐 Happy New Year' in decorative calligraphy, gold and red theme.",
});
<?php

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

use RunApi\GptImage2\GptImage2Client;

$client = new GptImage2Client();
$result = $client->textToImage->run([
        'model' => 'gpt-image-2',
        'prompt' => 'Generate a greeting card with \'新年快乐 Happy New Year\' in decorative calligraphy, gold and red theme.',
]);
require "runapi/gpt_image_2"

client = RunApi::GptImage2::Client.new
result = client.text_to_image.run(
    model: "gpt-image-2",
    prompt: "Generate a greeting card with '新年快乐 Happy New Year' in decorative calligraphy, gold and red theme."
)
npx skills add runapi-ai/gpt-image-2 -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-2 v1
OVERVIEW

About GPT Image 2

GPT Image 2 is OpenAI's latest image generation model featuring near-perfect multilingual text rendering within generated images. It improves on instruction following and fine-grained visual detail over its predecessor.

Provider
OpenAI
Modality
Image
PRICING

Pricing

Failed generations are not charged
Text to image
$0.06-$0.16 / image
Output resolution: 1k $0.06
Output resolution: 2k $0.10
Output resolution: 4k $0.16
Edit image
$0.16 / image
SPEC SHEET

Technical details

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

Run GPT Image 2 From an Agent

HOW IT WORKS

Get Started with GPT Image 2

  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 2 on RunAPI

GPT Image 2 is OpenAI's newest image model, notable for near-perfect multilingual text rendering. Through RunAPI, both text-to-image and image editing endpoints share one key.

Provider
OpenAI
See all →
Modality
Image
Browse models →

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

How accurate is the multilingual text rendering?

GPT Image 2 renders text across many languages — roughly 99% accuracy for English and Latin scripts, and around 95%+ for non-Latin scripts like Chinese, Japanese, Korean, and Arabic.

What is the maximum output resolution?

Choose 1K, 2K, or 4K output (default 1K). Both the text-to-image and image editing endpoints support these resolutions.

What is Thinking mode for image generation?

Thinking mode lets the model reason about composition and layout before generating, improving accuracy for complex multi-element scenes and precise text placement.

How does GPT Image 2 handle text in non-Latin scripts?

It renders CJK characters, Arabic, Cyrillic, and other scripts with near-native accuracy — a significant improvement over prior image generation models.

Can I generate and edit in the same workflow?

Yes — generate from text, then refine with image editing. Both endpoints share the same API shape.

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 2

Endpoints

  • text_to_image
  • edit_image

Category

Provider

Docs