ViNano AI API
Powerful AI image generation REST API, integrate into your app with just a few lines of code
API Usage Requirements
- Requires subscription to Advanced Plan
- Yearly plan users: 200 requests/minute rate limit
- Monthly plan users: 20 requests/minute rate limit
Need More Advanced API Features?
If you need higher rate limits, enterprise support or custom features, please email:
[email protected]Skills & Integration Guides
Explore API integration guides, code examples, and best practices for building with ViNano AI API
View on GitHubWhat to Expect
Built for developers who need powerful image processing at scale
Lightning Fast
Process images in milliseconds with our optimized API infrastructure
Simple Integration
RESTful API with comprehensive documentation and SDKs in multiple languages
Flexible Pricing
Pay only for what you use with transparent, developer-friendly pricing
API Call Instructions
Learn how to use ViNano AI API for image generation
Quick Start
Integrate AI image generation in just a few lines of code
POST https://vinano.ai/api/v2/images/generatecurl -X POST https://vinano.ai/api/v2/images/generate \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "prompt=a beautiful sunset over the ocean" \
-F "model=gemini-2.5-flash-image-preview" \
-F "aspectRatio=16:9" \
-F "googleSearch=false" \
-F "mode=txt2img"Request Parameters
| Parameter | Type | Required | Powerful image editing API for developers. Transform images with natural language in milliseconds. |
|---|---|---|---|
| prompt | string | No* | Image generation prompt (max 2000 characters) |
| image | File / File[] | No* | Uploaded image file(s) (multiple supported) |
| imageUrl | string / string[] | No* | Existing image URL(s) (supports multiple URLs) |
| model | string | No | AI model, supports gemini-2.5-flash-image-preview, sora_image |
| aspectRatio | string | No | Aspect ratio. All models: auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3. Nano Banana 2 (gemini-3.1-pro-image-preview) additionally supports: 4:1, 1:4, 8:1, 1:8 |
| mode | string | No | Optional generation mode, e.g. photo_restoration (old photo restore), figure, meme, etc. View all modes |
| hdPro | boolean | No | Whether to use HD mode (consumes 30 credits, normal mode 10 credits) |
| img_size | string | No | Image size: 1k, 2k, 4k. Only applies to Nano Banana 2 / Pro. Credits — Nano Banana 2 (gemini-3.1-pro-image-preview): 1k=25, 2k=35, 4k=60. Nano Banana Pro (gemini-3-pro-image-preview): 1k=30, 2k=50, 4k=80 |
| googleSearch | boolean | No | Enable Google Search enhancement (only supported by gemini-3.1-pro-image-preview / Nano Banana 2, default false) |
* Either prompt or image must be provided
Supported Models
- gemini-2.5-flash-image-preview- Nano Banana (default)
- gemini-3.1-pro-image-preview- Nano Banana 2 (supports extended aspect ratios: 4:1, 1:4, 8:1, 1:8)
- gemini-3-pro-image-preview- Nano Banana Pro
- sora_image- GPT-Image 2
- Seedance-5.0- Seedance 5.0 (2K/3K only, text-to-image / image-to-image with web search)
- Z-Image- ViNano Basic (Z-Image, text-to-image only)
Response Format
Success Response (200)
{
"status": 200,
"images": ["https://example.com/generated-image.jpg"],
"imageDetails": [{
"width": 1024,
"height": 1024,
"filesize": 524288
}],
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"prompt": "a beautiful sunset",
"model": "gemini-2.5-flash-image-preview",
"credits": {
"cost": 10
}
}⚡ Async Image Generation API
POST https://vinano.ai/api/v1/images/asyncGET https://vinano.ai/api/v1/images/task-status?task_id={task_id}# Step 1: Submit async task (same parameters as sync API)
curl -X POST "https://vinano.ai/api/v1/images/async" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "prompt=a beautiful sunset" \
-F "model=gemini-2.5-flash-image-preview"
# Response (202):
# {
# "status": 202,
# "task_id": "550e8400-e29b-41d4-a716-446655440000",
# "message": "Task submitted. Use GET /api/v1/images/task-status?task_id={task_id} to poll for results.",
# "model": "gemini-2.5-flash-image-preview",
# "credits": { "cost": 10 }
# }
# Step 2: Poll task status (repeat every 3-5s until status=200)
curl -X GET "https://vinano.ai/api/v1/images/task-status?task_id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"
# Response when completed:
# {
# "status": 200,
# "images": ["https://example.com/generated-image.jpg"],
# "imageDetails": [{
# "width": 1024,
# "height": 1024,
# "filesize": 524288
# }],
# "uuid": "550e8400-e29b-41d4-a716-446655440000",
# "prompt": "a beautiful sunset",
# "model": "gemini-2.5-flash-image-preview",
# "credits": {
# "cost": 10
# }
# }Error Code Explanation
| Status Code | Powerful image editing API for developers. Transform images with natural language in milliseconds. |
|---|---|
| 400 | Missing required parameters or parameter validation failed |
| 401 | API Token invalid, missing or malformed |
| 403 | Account disabled, not subscribed to Advanced plan or no API permission |
| 413 | File size exceeds limit (100MB) |
| 429 | Rate limit exceeded (exceeded per minute limit) |
| 495 | Insufficient credits |
| 500 | Server internal error or image generation failed |
Best Practices
Keep API Token Safe
Do not share your API Token with others or expose it in code repositories
Implement Error Handling
Handle all possible error codes, especially 429 (rate limit) and 495 (insufficient credits)
Monitor Rate Limit Headers
Check X-RateLimit-Remaining in response headers to understand remaining quota
Implement Retry Mechanism
For 429 errors, implement exponential backoff retry based on Retry-After header
Optimize Prompts
Clear, specific prompts yield better generation results
Compress Images
Compressing images before upload improves transfer speed and saves bandwidth
API Rate Limit
API calls are protected by rate limiting, limits vary by subscription plan:
💡Response headers will include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset information
