Integrate AI Generation Into Your Apps
A REST API for generating 1080p videos with audio, photorealistic images up to 2048px, background removal, and AI upscaling. Authenticate with an API key, send a prompt, get a result. Build AI-powered creative features into any application -- 100 free calls per day.
Get API Access
Generate your API key and start making requests in minutes. Free tier includes 100 API calls per day.
Get API Access →API Endpoints
POST /v1/generate/image
Generate images from text prompts at up to 2048px resolution. Supports photorealistic, stylized, anime, and illustration styles with configurable aspect ratio, guidance scale, seed, and output format (PNG, JPEG, WebP).
POST /v1/generate/video
Generate 1080p videos with synchronized audio from text prompts or input images. Configurable duration (up to 10s), frame rate, and resolution. Includes text-to-video and image-to-video modes.
POST /v1/upscale
Upscale images to 2x or 4x resolution using AI super-resolution. Accepts image URL or base64 input. Returns high-resolution output.
POST /v1/remove-background
Remove backgrounds from images with pixel-perfect accuracy. Returns transparent PNG. Ideal for product photos and compositing workflows.
POST /v1/batch
Submit up to 50 generation requests in a single call. Each request can use different prompts, models, and settings. Async processing with webhook callbacks.
GET /v1/status/{job_id}
Check the status of an async generation job. Returns progress percentage, estimated completion time, and the result URL when finished.
POST /v1/edit/image
Edit existing images with AI: inpainting, outpainting, style transfer, and prompt-guided modifications. Upload an image and describe the changes you want.
POST /v1/generate/video-audio
Generate 1080p video with synchronized audio from text prompts. AI creates both visuals and matching soundtrack in a single call. Up to 10 seconds, MP4 output.
Authentication
All API requests require a Bearer token in the Authorization header. Generate your API key from the ZSky AI dashboard under Settings > API Keys. You can create multiple keys with different scopes and rate limits for different applications.
Authorization: Bearer sk_live_your_api_key_here
Code Examples
Python
import requests
response = requests.post(
"https://api.zsky.ai/v1/generate/image",
headers={"Authorization": "Bearer sk_live_your_key"},
json={
"prompt": "A futuristic city skyline at sunset, photorealistic",
"model": "photorealistic",
"width": 1024,
"height": 1024,
"guidance_scale": 7.5
}
)
result = response.json()
print(result["image_url"]) # Direct download URL (valid 24h)
JavaScript
const response = await fetch("https://api.zsky.ai/v1/generate/image", {
method: "POST",
headers: {
"Authorization": "Bearer sk_live_your_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "A futuristic city skyline at sunset, photorealistic",
model: "photorealistic",
width: 1024,
height: 1024,
guidance_scale: 7.5
})
});
const data = await response.json();
console.log(data.image_url); // Direct download URL (valid 24h)
cURL
curl -X POST https://api.zsky.ai/v1/generate/image \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic city skyline at sunset, photorealistic",
"model": "photorealistic",
"width": 1024,
"height": 1024,
"guidance_scale": 7.5
}'
API Pricing
| Operation | Pay Per Call | API Subscription | Enterprise |
|---|---|---|---|
| Image (stylized, 1024px) | $0.02 | $0.015 | Custom |
| Image (photorealistic, 1024px) | $0.05 | $0.035 | Custom |
| Image (photorealistic, 2048px) | $0.10 | $0.07 | Custom |
| Video (5s, 1080p + audio) | $0.15 | $0.10 | Custom |
| Video (10s, 1080p + audio) | $0.30 | $0.20 | Custom |
| Image Editing (inpaint/style) | $0.04 | $0.03 | Custom |
| Upscale (2x) | $0.03 | $0.02 | Custom |
| Background Removal | $0.02 | $0.015 | Custom |
| Batch (up to 50) | Per-item pricing | 10% batch discount | Custom |
| Rate Limit | 60 req/min | 120-600 req/min | Custom |
| Free Tier | 100 API calls/day, no credit card required | ||
Use Cases
SaaS Integration
Add AI image generation to your SaaS product. Let your users create visuals without leaving your platform. Social media tools, design apps, and content management systems.
Batch Processing
Generate hundreds of product images, social posts, or ad variations programmatically. Schedule overnight batch jobs to have fresh content ready every morning.
White-Label Solutions
Build your own AI image generator powered by ZSky AI infrastructure. No branding, no video watermarks. Serve your customers under your own brand and pricing.
Workflow Automation
Connect ZSky AI to Zapier, Make, or n8n. Automatically generate images when new products are added, blog posts are published, or social campaigns launch.
Developer Guides
Get started quickly with our language-specific tutorials. Each guide covers authentication, generation, error handling, batch processing, and production best practices.
Python Tutorial
Generate images with requests, async with aiohttp, Flask wrapper, and batch processing. Read the guide.
JavaScript Guide
Fetch API, Node.js, Next.js API routes, React components, Express middleware, and TypeScript types. Read the guide.
Batch Generation
Generate up to 50 images in a single call. Product catalogs, social calendars, A/B testing. Read the guide.
Official Python and JavaScript/TypeScript SDKs are in development. The REST API works with any HTTP client in any programming language in the meantime.
Start Building with the ZSky AI API
100 free API calls per day. No credit card required. Generate your API key and start integrating in minutes.
Get API Access →Frequently Asked Questions
Ready to Integrate AI Generation?
Get your API key, explore the endpoints, and ship AI-powered features to your users.
Get API Access →