// v2.0 — now with video generation

AI-Powered
Image & Video
Generation API

Production-grade API for developers who need full creative control. Simple REST endpoints, blazing fast inference.

$ curl -X POST https://api.fantaseai.com/api/create_video \
-H "API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_image_base64": "...", "preset_name": "default"}'

// capabilities

Built for developers, not tourists

🎬

Image-to-Video

Generate full-motion video from a single image. Multiple motion presets. ~25s generation time. 8 tokens per call.

🖼

Image-to-Image

Transform, restyle, enhance. Multiple modes with fine-grained control. ~5s generation. 1.5 tokens per call.

⚡

Zero Censorship

No content filters. No safety theatre. Your keys, your rules. We don't log prompts or generated outputs.

🔒

Simple Auth

API-KEY header authentication. Get your API key instantly, start generating in under 60 seconds.

📦

Async + Webhooks

Submit tasks and poll for results, or receive webhook callbacks when generation completes. Built for production pipelines.

🌍

Global CDN

Generated assets served from edge. Low-latency delivery worldwide. Direct download URLs, no expiry games.

// endpoints

REST API Reference

base url
https://api.fantaseai.com
endpoints
MethodEndpointDescription
POST/api/create_imageTransform an image using AI. Supports multiple transformation modes.
POST/api/create_videoGenerate a video from a single input image. Multiple motion presets.
GET/api/task/{task_id}Poll task status and retrieve generated output URL.
GET/api/balanceCheck remaining token balance for your API key.

// quickstart

Three lines to your first render

python
import requests, base64

# Encode image to base64
with open("input.jpg", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

# Generate video from image
resp = requests.post(
    "https://api.fantaseai.com/api/create_video",
    headers={"API-KEY": API_KEY}, 
    json={
        "input_image_base64": img_b64,
        "preset_name": "default",
        "quality": "high"
    }
)

task_id = resp.json()["id"]
print(f"Task submitted: {task_id}")

# Poll for result
result = requests.get(
    f"https://api.fantaseai.com/api/task/{task_id}",
    headers={"API-KEY": API_KEY}
).json()

print(result["output_url"]) # direct download link
javascript (node.js)
import { readFileSync } from 'fs';

const imgBase64 = readFileSync('input.jpg').toString('base64');

const { id } = await fetch('https://api.fantaseai.com/api/create_video', {
  method: 'POST',
  headers: {
    'API-KEY': API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    input_image_base64: imgBase64,
    preset_name: 'default',
    quality: 'high'
  })
}).then(r => r.json());

console.log(`Task: ${id}`);
curl
# Submit image-to-image transformation
curl -X POST https://api.fantaseai.com/api/create_image \
  -H "API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '"{'
    \"input_image_base64\": \"$(base64 -i photo.jpg)\",
    \"preset_name\": \"custom\"
  }"'

# Response:
# {"id": "abc-123", "status": "NEW", "preset_name": "custom", ...}

// pricing

Simple per-generation pricing

🖼

Image Generation

$0.0x

per generation

🎬

Video Generation

$0.x

per generation

Volume discounts available. Contact us for a custom quote.

Get a Quote on Telegram

// affiliates

Earn 40% commission on the users you refer

Sign up, pick your referral code, and share your link. Track signups and earnings live on your affiliate dashboard.

Become an Affiliate

// contact

Get your API key in 60 seconds

Sign up to get started instantly, or message us on Telegram for volume discounts and custom integrations.