Professional API Reference
Gemimg AI - Nano Banana Pro Enterprise-grade Image Creation API Complete Documentation
Overview
Gemimg AI Professional API provides enterprise developers with Nano Banana Pro-powered professional image creation capabilities. Supports text-to-image generation, reference image style transformation, batch processing, and enterprise workflow integration.
Base URL
https://gemimg.art/api/v1Enterprise-grade Authentication
All API requests require Bearer Token authentication using API keys:
Authorization: Bearer YOUR_PROFESSIONAL_API_KEYGenerate API keys from your Professional Console. Enterprise users can apply for dedicated tokens for higher rate limits.
Professional Image Creation Endpoint
Professional text-to-image creation using Nano Banana Pro technology.
Endpoint
POST /api/v1/professional/generateRequest Body (Professional)
{
"prompt": "Modern minimalist villa exterior, Nordic design aesthetic, blue hour, interior warm light contrast, f/11 depth of field, 4K ultra-HD",
"negativePrompt": "blurry, noise, overexposed, distortion",
"mode": "text_to_image",
"resolution": "4K",
"outputFormat": "png",
"aspectRatio": "16:9",
"colorSpace": "Adobe_RGB",
"seed": 12345,
"styleStrength": 0.8,
"priority": "high"
}Professional Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Professional creation prompt (supports photography terminology, max 5000 characters) |
negativePrompt | string | No | Negative prompt to exclude unwanted elements |
mode | string | Yes | text_to_image or image_transformation |
resolution | string | No | 4K, 2K, FHD (default: 4K) |
outputFormat | string | No | png, jpeg, webp (default: png) |
aspectRatio | string | No | 16:9, 4:3, 1:1, 9:16, etc. |
colorSpace | string | No | sRGB or Adobe_RGB (Professional) |
seed | integer | No | Random seed for reproducible results |
styleStrength | float | No | Style intensity 0.1-1.0 (default: 0.7) |
priority | string | No | normal, high, urgent (Professional) |
Response Example
{
"success": true,
"taskId": "prof_task_abc123xyz",
"status": "queued",
"priority": "high",
"estimatedTime": 55,
"creditsUsed": 3,
"webhook": "https://your-domain.com/callback"
}Reference Image Style Transformation
Professional-grade reference image application and style transformation API.
Endpoint
POST /api/v1/professional/transformRequest Body (Reference Image Transformation)
{
"prompt": "Commercial fashion photography lighting, professional retouching, 85mm portrait lens, Rembrandt lighting",
"mode": "image_transformation",
"referenceImages": [
{
"url": "https://storage.your-domain.com/reference/arch_001.raw",
"weight": 0.75,
"format": "RAW"
}
],
"resolution": "4K",
"outputFormat": "png",
"colorGrading": "cinema",
"preserveDetails": true
}Reference Image Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
referenceImages | array | Yes | Reference image array (max 3 images) |
referenceImages[].url | string | Yes | Reference image URL (supports RAW/PSD/TIFF) |
referenceImages[].weight | float | No | Reference weight 0.1-1.0 (default: 0.7) |
preserveDetails | boolean | No | Preserve fine details (default: true) |
colorGrading | string | No | natural, cinema, commercial |
Task Status Query
Query the status of professional creation tasks.
Endpoint
GET /api/v1/tasks/{taskId}Response (Completed)
{
"success": true,
"taskId": "prof_task_abc123xyz",
"status": "completed",
"result": {
"imageUrl": "https://cdn.gemimg.top/professional/4k_abc123.png",
"thumbnailUrl": "https://cdn.gemimg.top/professional/4k_abc123_thumb.jpg",
"resolution": "3840x2160",
"fileSize": "12.4 MB",
"colorSpace": "Adobe_RGB",
"metadata": {
"renderTime": 58,
"creditsUsed": 3,
"seed": 12345
}
}
}Batch Processing (Enterprise Feature)
Enterprise users can batch create up to 50 images.
Endpoint
POST /api/v1/professional/batchRequest Body
{
"tasks": [
{
"prompt": "Architectural visualization A - exterior perspective",
"resolution": "4K",
"priority": "high"
},
{
"prompt": "Architectural visualization B - interior space",
"resolution": "4K",
"priority": "normal"
}
],
"batchOptions": {
"parallel": true,
"maxConcurrent": 5,
"webhook": "https://your-domain.com/batch-callback"
}
}Response
{
"success": true,
"batchId": "batch_xyz789",
"totalTasks": 50,
"status": "processing",
"estimatedCompletion": "2024-01-15T10:30:00Z"
}Enterprise Webhooks
Configure Webhooks to receive task completion notifications.
Webhook Configuration
POST /api/v1/webhooks/register{
"url": "https://your-domain.com/gemimg-webhook",
"events": ["task.completed", "task.failed", "batch.completed"],
"secret": "your_webhook_secret"
}Webhook Payload Example
{
"event": "task.completed",
"timestamp": "2024-01-15T10:25:30Z",
"data": {
"taskId": "prof_task_abc123xyz",
"status": "completed",
"imageUrl": "https://cdn.gemimg.top/professional/4k_abc123.png",
"creditsUsed": 3
},
"signature": "sha256=abc123..."
}Error Handling
Error Response Structure
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits in professional account",
"details": {
"required": 3,
"available": 1
}
}
}Professional Error Codes
| Code | HTTP Status | Description | Solution |
|---|---|---|---|
INVALID_API_KEY | 401 | API key invalid or expired | Regenerate API key from console |
INSUFFICIENT_CREDITS | 402 | Insufficient credits | Purchase Professional Plan |
INVALID_PROMPT | 400 | Prompt empty or exceeds 5000 characters | Optimize prompt content |
INVALID_REFERENCE_IMAGE | 400 | Reference image format not supported | Use RAW/PSD/TIFF/PNG/JPEG |
RATE_LIMIT_EXCEEDED | 429 | Rate limit exceeded | Upgrade to Enterprise or implement retry |
RESOLUTION_NOT_SUPPORTED | 400 | Resolution not supported | Use 4K/2K/FHD |
BATCH_SIZE_EXCEEDED | 400 | Batch size exceeds limit | Split into smaller batches |
Rate Limits
| Plan | Requests/Minute | Concurrent Tasks | Batch Size | SLA |
|---|---|---|---|---|
| Free Trial | 10 | 2 | Not supported | Best effort |
| Professional | 100 | 10 | 10 images | 99.5% |
| Enterprise | Custom | Custom | 50 images | 99.9% |
SDK & Code Examples
Node.js SDK
const GemimgPro = require('@gemimg/professional-sdk');
const client = new GemimgPro({
apiKey: 'YOUR_PROFESSIONAL_API_KEY',
baseURL: 'https://gemimg.art/api/v1'
});
async function generateProfessionalImage() {
try {
const task = await client.textToImage.create({
prompt: 'Commercial product photography, studio lighting, 85mm lens, f/2.8, 4K',
resolution: '4K',
outputFormat: 'png',
colorSpace: 'Adobe_RGB',
priority: 'high'
});
console.log('Task created:', task.taskId);
// Poll for completion
const result = await client.tasks.waitForCompletion(task.taskId);
console.log('Image URL:', result.imageUrl);
} catch (error) {
console.error('Error:', error.message);
}
}
generateProfessionalImage();Python SDK
from gemimg_pro import GemimgProfessional
client = GemimgProfessional(
api_key='YOUR_PROFESSIONAL_API_KEY',
base_url='https://gemimg.art/api/v1'
)
def generate_professional_image():
try:
# Create task
task = client.text_to_image.create(
prompt='Architectural visualization, photorealistic rendering, blue hour, 4K',
resolution='4K',
output_format='png',
color_space='Adobe_RGB',
priority='high'
)
print(f'Task created: {task.task_id}')
# Wait for completion
result = client.tasks.wait_for_completion(task.task_id, timeout=120)
print(f'Image URL: {result.image_url}')
except GemimgProError as e:
print(f'Error: {e.message}')
generate_professional_image()cURL Example
# Create professional text-to-image task
curl -X POST https://gemimg.art/api/v1/professional/generate \
-H "Authorization: Bearer YOUR_PROFESSIONAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Fashion photography, studio lighting, professional retouching, 4K",
"resolution": "4K",
"outputFormat": "png",
"priority": "high"
}'
# Query task status
curl -X GET https://gemimg.art/api/v1/tasks/prof_task_abc123xyz \
-H "Authorization: Bearer YOUR_PROFESSIONAL_API_KEY"Best Practices for Professional Integration
1. Prompt Engineering
Use professional photography terminology for optimal results:
// ✅ Good - Professional terminology
const prompt = "Commercial product photography, studio lighting setup, 85mm f/1.8 lens, shallow depth of field, professional color grading, 4K resolution";
// ❌ Avoid - Generic descriptions
const prompt = "nice product photo";2. Credit Management
Monitor credits before batch operations:
# Check available credits
credits = client.account.get_credits()
required = len(batch_tasks) * 3 # 3 credits per 4K image
if credits.available < required:
print(f"Insufficient credits: {credits.available}/{required}")
# Purchase more or adjust batch size3. Webhook Implementation
Implement webhooks for asynchronous processing:
app.post('/gemimg-webhook', (req, res) => {
const signature = req.headers['x-gemimg-signature'];
// Verify webhook signature
if (!verifySignature(req.body, signature, webhookSecret)) {
return res.status(401).send('Invalid signature');
}
const { event, data } = req.body;
if (event === 'task.completed') {
// Download and process completed image
downloadImage(data.imageUrl);
}
res.status(200).send('OK');
});4. Error Retry Strategy
Implement exponential backoff for rate limiting:
import time
def generate_with_retry(prompt, max_retries=3):
for attempt in range(max_retries):
try:
return client.text_to_image.create(prompt=prompt)
except RateLimitError:
if attempt < max_retries - 1:
wait_time = 2 ** attempt # 1s, 2s, 4s
time.sleep(wait_time)
else:
raiseProfessional Support
Enterprise Support Channels
- Email: enterprise@gemimg.top
- Priority Support: Submit Ticket
- SLA Support: 24/7 for Enterprise plans
- Technical Documentation: Complete API Docs
Service Level Agreement (SLA)
| Plan | Uptime | Response Time | Dedicated Support |
|---|---|---|---|
| Professional | 99.5% | < 24 hours | |
| Enterprise | 99.9% | < 4 hours | Phone + Email + Slack |
Migration from Free to Professional
Upgrading from the free API to Professional is seamless:
// Only need to update the API key and base URL
const client = new GemimgPro({
apiKey: 'YOUR_PROFESSIONAL_API_KEY', // New key
baseURL: 'https://gemimg.art/api/v1' // Professional endpoint
});
// All existing code remains compatible
// + Access to 4K, batch processing, webhooksPricing & Credits
- Text-to-Image (4K): 3 credits per image
- Text-to-Image (2K): 2 credits per image
- Reference Image Transformation: 4 credits per image
- Batch Processing: Standard rates apply
Start building professional-grade image creation workflows with Gemimg AI - Nano Banana Pro API today!