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.

HTTP Header
Authorization: Bearer sk_live_your_api_key_here

Code Examples

Python

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

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
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

OperationPay Per CallAPI SubscriptionEnterprise
Image (stylized, 1024px)$0.02$0.015Custom
Image (photorealistic, 1024px)$0.05$0.035Custom
Image (photorealistic, 2048px)$0.10$0.07Custom
Video (5s, 1080p + audio)$0.15$0.10Custom
Video (10s, 1080p + audio)$0.30$0.20Custom
Image Editing (inpaint/style)$0.04$0.03Custom
Upscale (2x)$0.03$0.02Custom
Background Removal$0.02$0.015Custom
Batch (up to 50)Per-item pricing10% batch discountCustom
Rate Limit60 req/min120-600 req/minCustom
Free Tier100 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

How do I authenticate with the ZSky AI API?
Authenticate using an API key passed in the Authorization header as a Bearer token. Generate your API key from your ZSky AI dashboard under Settings > API Keys. Each key can be scoped to specific endpoints and rate limits.
What are the API rate limits?
Rate limits depend on your plan. Pay-per-call users get 60 requests per minute. Subscription API plans get 120-600 requests per minute depending on tier. Enterprise plans have custom rate limits. All responses include X-RateLimit headers so you can track your usage in real time.
How much does the API cost per call?
Image generation starts at $0.02 per image for standard resolution stylized and $0.05 per image for photorealistic. Video generation starts at $0.15 per clip. High-resolution and custom model generations cost more. Subscription plans offer significant discounts for predictable usage volumes.
Can I use the API for white-label applications?
Yes. The API is designed for white-label integration. Generated content includes no ZSky AI branding or watermarks. You can build your own UI on top of our generation infrastructure and serve it to your own customers under your brand.
What image formats does the API return?
The API returns images in PNG format by default. You can request JPEG or WebP output by setting the output_format parameter. Videos are returned as MP4 files. All responses include a direct download URL that remains valid for 24 hours.
Are there SDKs available for the ZSky AI API?
Official Python and JavaScript SDKs are coming soon. In the meantime, the REST API works with any HTTP client in any language. We provide code examples in Python (requests), JavaScript (fetch), and cURL to get you started quickly.
Can I batch process multiple images in a single API call?
Yes. The batch endpoint accepts up to 50 generation requests in a single call. Each request in the batch can have different prompts, models, and settings. Batch processing is ideal for catalog generation, A/B testing variations, and scheduled content production.
What happens if API generation fails?
Failed generations are not charged. The API returns detailed error codes and messages so you can handle failures programmatically. Common errors include content policy violations, invalid parameters, and rate limit exceeded. We recommend implementing exponential backoff for rate limit errors.

Ready to Integrate AI Generation?

Get your API key, explore the endpoints, and ship AI-powered features to your users.

Get API Access →