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.
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
}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.
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
For agent environments that support the skills CLI.
npx skills add ichizi/image2-skillsNon-interactive install
Useful for scripted installs or no-confirm flows.
npx skills add ichizi/image2-skills -yConfigure 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 repositoryOne 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.
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
Get API Key
Create an account and API key.
Choose endpoint
Use the image generation API.
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"]
}'{
"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 & 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
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
}'{
"created": 1715881600,
"task_id": "batch-uuid-example",
"status": "pending",
"data": [
{ "url": null, "status": "pending" }
]
}2. Poll Task Status
curl -X GET https://image2.vip/api/v1/images/tasks/batch-uuid-example \
-H "Authorization: Bearer YOUR_API_KEY"{
"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
}