Official Guarantee | Direct connection to official models with stable generation, no throttling, and no degraded quality! Pro plans are on sale.Upgrade Now
image2 API

Powerful AI Image Generation API

Bring image2 AI image generation into your product and turn ideas into production-ready visuals with a simple, reliable API.

Fast integration
Reliable service
Transparent pricing
Data security
Complete docs
A cat sitting by a sunny window

POST /v1/images/generations

{
  "model": "gpt-image-2",
  "prompt": "A cute cat sitting by the window, warm sunlight on its fur",
  "size": "1024x1024",
  "n": 1
}
Generated

Fast integration

Simple API design that can be integrated in minutes.

Reliable service

99.9% availability with accelerated delivery.

Transparent pricing

Credit-based usage with clear, predictable costs.

Data security

HTTPS transport and privacy-minded processing.

Complete docs

Detailed API docs and practical code examples.

Recommended: install the Skill

Install the image2 Skill so agents can generate images directly

Use this for repeat image2 API workflows. After installation, your agent can call the bundled Skill script instead of rewriting temporary API requests.

Install the image2 Skill in your agent environment.
Set IMAGE2_API_KEY so the Skill can read your API key safely.
Then ask your agent to generate images with image2.

Install

For agent environments that support the skills CLI.

npx skills add ichizi/image2-skills

Non-interactive install

Useful for scripted installs or no-confirm flows.

npx skills add ichizi/image2-skills -y

Configure API Key

The Skill reads the environment variable and does not store your key.

export IMAGE2_API_KEY="your_image2_api_key"

Send this to your agent (OpenClaw, WorkBuddy, etc.)

If you use OpenClaw, WorkBuddy, or another agent, copy this message to it and let it install and enable the Skill.

Please install and enable the image2 image generation Skill:

https://github.com/ichizi/image2-skills

This is an Agent Skill with SKILL.md at the repository root. After installing it, confirm that it can read IMAGE2_API_KEY, and when I say "generate an image with image2", use this Skill instead of hand-writing a temporary API request.

Security tip: review the GitHub source before installing. The image2 Skill contains no private server code and does not store API keys.

View GitHub repository
For AI Agents

One prompt teaches AI to call the image2 API

Copy this prompt into Codex, Claude, Cursor, or any AI Agent. It will read llms.txt first, then write working API integration code from the real interface.

image2 - llms.txt prompt
Please read the image2 API AI documentation index first:

https://image2.vip/llms.txt

Then answer my question based on the documentation. Focus on:
1. How to get and use an API Key
2. How to call POST /api/v1/images/generations
3. Request parameters and response format
4. Common error handling
5. How to write runnable examples in cURL / Python / JavaScript

My question is: How do I call the image2 API to generate an image?

Access in 3 steps

1

Get API Key

Create an account and API key.

2

Choose endpoint

Use the image generation API.

3

Call API

Send a request and receive results.

Quick Start

curl -X POST https://image2.vip/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cute cat sitting by the window, warm sunlight on its fur",
    "size": "1024x1024",
    "n": 1,
    "image": ["https://example.com/reference-image.jpg"]
  }'
Response
{
  "created": 1715881600,
  "data": [
    {
      "url": "https://image2.vip/generations/img_abc123.png",
      "revised_prompt": "A cute cat sitting by the window, warm sunlight on its fur"
    }
  ]
}
Async Mode

Async Mode & Task Polling

For bulk generation or to avoid request timeout, we recommend using Async Mode. Pass "async": true in your generation request, and the API will return a task_id immediately. You can then poll the task endpoint to check the progress and retrieve the final URLs.

1. Submit Async Task

POST /api/v1/images/generations
curl -X POST https://image2.vip/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cute cat sitting by the window, warm sunlight on its fur",
    "async": true
  }'
Response
{
  "created": 1715881600,
  "task_id": "batch-uuid-example",
  "status": "pending",
  "data": [
    { "url": null, "status": "pending" }
  ]
}

2. Poll Task Status

GET /api/v1/images/tasks/batch-uuid-example
curl -X GET https://image2.vip/api/v1/images/tasks/batch-uuid-example \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "created": 1715881600,
  "task_id": "batch-uuid-example",
  "status": "completed",
  "progress": 100,
  "data": [
    {
      "url": "https://image2.vip/generations/img_abc123.png",
      "revised_prompt": "A cute cat sitting by the window, warm sunlight on its fur",
      "status": "completed"
    }
  ],
  "error": null
}