Submit

GPT-IMAGE-2-AI-IMAGE-EDITOR

AI GPT Image is an online GPT Image 2 AI image generator and editor that helps users create, edit, upscale, and transform images with text prompts and reference photos. It supports text-to-image generation, image-to-image transformation, natural language image editing, AI image upscaling, and AI video creation workflows. Powered by GPT Image 2, AI GPT Image is designed for high-quality visual creation with stronger prompt understanding, improved text rendering, multilingual visual design, realistic lighting, detailed textures, and better style consistency. Users can create realistic portraits, product photos, YouTube thumbnails, social media graphics, posters, UI mockups, infographics, character concepts, cinematic storyboards, and commercial design assets in just a few steps. AI GPT Image is suitable for creators, designers, marketers, e-commerce sellers, bloggers, YouTubers, startup teams, indie hackers, AI creators, and anyone who wants to generate professional images online without complex design software. It is especially useful for social media content, advertising creatives, product marketing, blog covers, visual storytelling, image editing, and AI image-to-video workflows.
Overview

MCP endpoint:

https://aigptimage.com/api/mcp

Local development endpoint:

http://localhost:3000/api/mcp

Transport:

Streamable HTTP / JSON-RPC 2.0

Authentication:

Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx

The MCP endpoint uses the same API key system as the existing public API. Users can create API keys from the website API key settings page. MCP calls reuse the existing public API authentication, rate limits, credit deduction, task creation, and task query logic.

Available Tools

The MCP server exposes 4 tools:

ToolDescription
list_modelsList available image and video generation models
generate_imageCreate an image generation task and return a taskId
generate_videoCreate a video generation task and return a taskId
get_generation_statusQuery task status and result URLs

Image and video generation tasks are asynchronous. After calling generate_image or generate_video, use the returned taskId with get_generation_status to retrieve the result.

Supported Models

The MCP models are the same as the current public API models:

ModelTypeSceneRequired Input
gpt-image-2-text-to-imageimageText to imageprompt
gpt-image-2-image-to-imageimageImage to imageprompt, input_urls or image_urls
seedance-2.0-text-to-videovideoText to videoprompt
seedance-2.0-image-to-videovideoImage to videoprompt, image_urls

For the most accurate online model list and input fields, call list_models first.

MCP Client Configuration

Different MCP clients may use slightly different configuration field names, but the core configuration is the same:

{
  "url": "https://aigptimage.com/api/mcp",
  "headers": {
    "Authorization": "Bearer sk_xxxxxxxxxxxxxxxxxxxx"
  }
}

If your client supports Remote MCP / Streamable HTTP, use the URL and header above directly.

If your client only supports stdio MCP servers, use a remote MCP proxy tool. Example:

npx mcp-remote https://aigptimage.com/api/mcp \
  --header "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx"

Example client configuration:

{
  "mcpServers": {
    "aigptimage": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://aigptimage.com/api/mcp",
        "--header",
        "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx"
      ]
    }
  }
}

If your MCP client does not support custom request headers, it cannot directly use user API key authentication. In that case, connect through a proxy layer that supports headers.

JSON-RPC Examples

1. Initialize

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2025-06-18",
      "capabilities": {},
      "clientInfo": {
        "name": "example-client",
        "version": "1.0.0"
      }
    }
  }'

2. List Tools

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list"
  }'

3. List Models

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "list_models",
      "arguments": {
        "mediaType": "image"
      }
    }
  }'

mediaType is optional:

image
video

If mediaType is omitted, all models are returned.

4. Text to Image

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "X-Request-Id: demo-image-001" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "generate_image",
      "arguments": {
        "model": "gpt-image-2-text-to-image",
        "prompt": "A cinematic product photo of a futuristic camera on a clean studio table",
        "aspect_ratio": "1:1",
        "resolution": "1024x1024",
        "quality": "high",
        "output_format": "png"
      }
    }
  }'

Example response:

{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"taskId\": \"task_xxx\",\n  \"model\": \"gpt-image-2-text-to-image\",\n  \"state\": \"waiting\"\n}"
      }
    ],
    "structuredContent": {
      "taskId": "task_xxx",
      "model": "gpt-image-2-text-to-image",
      "state": "waiting"
    },
    "isError": false
  }
}

5. Image to Image

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
      "name": "generate_image",
      "arguments": {
        "model": "gpt-image-2-image-to-image",
        "prompt": "Turn this image into a polished editorial product shot",
        "input_urls": [
          "https://example.com/input.png"
        ],
        "aspect_ratio": "1:1",
        "quality": "high"
      }
    }
  }'

6. Text to Video

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "X-Request-Id: demo-video-001" \
  -d '{
    "jsonrpc": "2.0",
    "id": 6,
    "method": "tools/call",
    "params": {
      "name": "generate_video",
      "arguments": {
        "model": "seedance-2.0-text-to-video",
        "prompt": "A slow cinematic dolly shot through a neon city street at night",
        "aspect_ratio": "16:9",
        "resolution": "1080p",
        "duration": "5",
        "generate_audio": false
      }
    }
  }'

7. Image to Video

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 7,
    "method": "tools/call",
    "params": {
      "name": "generate_video",
      "arguments": {
        "model": "seedance-2.0-image-to-video",
        "prompt": "Animate the subject with a gentle camera push-in and natural lighting",
        "image_urls": [
          "https://example.com/reference.jpg"
        ],
        "aspect_ratio": "16:9",
        "resolution": "1080p",
        "duration": "5"
      }
    }
  }'

8. Query Task Result

curl https://aigptimage.com/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 8,
    "method": "tools/call",
    "params": {
      "name": "get_generation_status",
      "arguments": {
        "taskId": "task_xxx"
      }
    }
  }'

Task states:

stateDescription
waitingThe task is queued or generating
successThe task completed successfully; resultJson contains result URLs
failThe task failed; check failCode and failMsg

Successful result example:

{
  "taskId": "task_xxx",
  "model": "gpt-image-2-text-to-image",
  "state": "success",
  "resultJson": "{\"resultUrls\":[\"https://...\"]}",
  "failCode": null,
  "failMsg": null,
  "costTime": 18000,
  "completeTime": 1760000000000,
  "createTime": 1759999982000
}

Argument Formats

generate_image and generate_video support two argument formats.

Pass fields directly:

{
  "model": "gpt-image-2-text-to-image",
  "prompt": "A clean product photo",
  "aspect_ratio": "1:1"
}

Or pass a full input object:

{
  "model": "gpt-image-2-text-to-image",
  "input": {
    "prompt": "A clean product photo",
    "aspect_ratio": "1:1"
  }
}

Both formats are mapped to the existing public API request structure.

Callback URL

When creating a task, you can pass callBackUrl or callbackUrl:

{
  "model": "seedance-2.0-text-to-video",
  "prompt": "A cinematic video",
  "callBackUrl": "https://your-domain.com/webhooks/aigptimage"
}

Callback handling reuses the existing public API task callback logic.

Idempotent Requests

When creating a task, pass an X-Request-Id request header:

X-Request-Id: your-unique-request-id

For the same API key, the same X-Request-Id will reuse an existing task. This prevents duplicate task creation and duplicate credit charges when clients retry requests.

Credits, Rate Limits, and Billing

MCP uses the same rules as the existing public API:

MCP ToolReused Rate Limit Endpoint
generate_imagejobs.createTask
generate_videojobs.createTask
get_generation_statusjobs.recordInfo

Notes:

  • Creating a task checks the user's remaining credits.
  • Creating a task calculates credit cost from the selected model and parameters.
  • Querying a task does not create a new task.
  • API key active task limits still apply.
  • When rate limited, the tool result returns isError: true and includes retryAfter, limit, tier, and windowSeconds.

Error Handling

MCP has two error categories:

  1. JSON-RPC protocol errors, such as unknown methods or invalid request format.
  2. Tool execution errors, such as insufficient credits, invalid parameters, task not found, or rate limits.

Tool execution error example:

{
  "jsonrpc": "2.0",
  "id": 9,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"error\": \"insufficient credits\"\n}"
      }
    ],
    "structuredContent": {
      "error": "insufficient credits"
    },
    "isError": true
  }
}

Common errors:

ErrorCause
authentication failedMissing API key, invalid API key format, or disabled API key
model is not supportedThe model ID is not in the public API allowlist
prompt is requiredMissing prompt
input_urls is requiredImage-to-image request is missing input images
too many active tasksThe API key has reached its active task limit
rate limit exceededThe request rate exceeded the current plan limit
insufficient creditsThe user does not have enough credits
task not foundThe task ID does not exist or does not belong to the current API key

Security Recommendations

  • Do not put API keys in frontend code.
  • For server-side MCP calls, read API keys from environment variables.
  • Create a separate API key for each integration so it can be revoked independently.
  • In production, set your own X-Request-Id to make retries and duplicate task issues easier to debug.
  • Do not pass private user image URLs to untrusted MCP clients.

Local Verification

Start the project:

pnpm dev

Check MCP metadata:

curl http://localhost:3000/api/mcp

Test the tool list with a local API key:

curl http://localhost:3000/api/mcp \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

AI GPT Image is an online AI image generator and editor powered by GPT Image 2. It helps users create high-quality AI images from text prompts, transform existing photos with image-to-image AI, edit visuals using natural language, upscale images, and turn creative ideas into professional visual assets.

Unlike traditional AI image tools, AI GPT Image focuses on practical visual creation workflows. Users can generate realistic portraits, social media graphics, product images, posters, UI mockups, diagrams, storyboards, thumbnails, anime-style artwork, game assets, and commercial design concepts in just a few steps.

GPT Image 2 brings major improvements in image quality, prompt understanding, text rendering, multilingual visual design, realistic lighting, material textures, composition control, and style consistency. This makes AI GPT Image especially useful for creators who need images with readable text, strong visual structure, and production-ready design details.

AI GPT Image is suitable for content creators, marketers, designers, e-commerce sellers, startup teams, indie hackers, AI creators, bloggers, YouTubers, social media managers, and anyone who wants to create professional images without complex design software.

Main features include:

  • Text-to-image generation with GPT Image 2
  • Image-to-image transformation and AI photo editing
  • Natural language image editing
  • AI image upscaling
  • AI video generation workflow
  • Prompt examples and AI image prompt resources
  • Support for portraits, posters, product photos, thumbnails, UI concepts, infographics, storyboards, and commercial visuals
  • Simple online workspace for fast creative production

AI GPT Image is ideal for creating YouTube thumbnails, blog covers, product marketing images, social media posts, ad creatives, brand visuals, character concepts, cinematic storyboards, educational diagrams, and AI-generated design mockups.

Whether you are building content, testing visual ideas, creating marketing assets, or exploring the latest GPT Image 2 model capabilities, AI GPT Image gives you a fast and practical way to generate, edit, and enhance images online.

Server Config

{
  "mcpServers": {
    "aigptimage": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://aigptimage.com/api/mcp",
        "--header",
        "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxx"
      ]
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.