Ship AI image & video generation inside your product
One OpenAI-compatible API gives your app access to 10+ image and video models. No infra to build, no subscriptions to manage, no vendor lock-in.
Automatic failover keeps your feature online. Pay only for what your users generate.
Building AI generation into your app is harder than it should be
Most teams cobble together multiple vendor APIs, each with its own SDK, billing, and failure modes. Here is what a typical integration stack looks like:
One API β everything your app needs
OpenAI SDK Compatible
Same /v1/images/generations endpoint, same request/response shape. Change base_url and ship β works with OpenAI Python, Node.js, and Vercel AI SDK.
One Key, 10+ Models
GPT Image 1, Seedance 1.5, Kling v3, Kling O3, Veo 3.1 β image and video models from a single API key. Switch models with one parameter.
Automatic Failover
If the primary model fails or returns a false-positive content rejection, CreativeAI retries on a backup model automatically. Billed at the lower rate.
Pay-Per-Use Economics
No subscriptions, no per-seat fees, no minimum commitment. Pay only for generations your users trigger. $0 when idle, scales linearly.
Webhooks with HMAC
Async video jobs POST results to your endpoint when done β HMAC-SHA256 signed, 3 retries with exponential backoff. No polling infra to build.
Per-Key Spend Controls
Set monthly spend caps, alert thresholds, and custom rate limits per API key. Isolate environments, customer tiers, or features.
What teams are building with the API
Design tools & editors
Let users generate images and videos directly inside your design platform, Canva-style editor, or creative suite.
POST /v1/images/generations with user prompt β render in canvasThumbnail & social image tools
Generate YouTube thumbnails, social media graphics, and multi-platform image variants on demand. Title-safe composition prompting reserves space for text overlays. Batch multiple sizes per request β 1:1, 9:16, 16:9 β from a single prompt.
1 topic β 4 title-safe thumbnail variants at ~$0.21/each, ~3-8s parallelSee thumbnail backend workflow βSocial content scheduling platforms
Power the visual layer behind social scheduling and auto-posting tools. Generate feed images, story graphics, and short promo clips per scheduled post β one API key covers image + video. Multi-format output (1:1, 9:16, 16:9) from a single prompt.
20 posts/day Γ mixed formats + I2V clips = ~$4.76/day per customerSee social scheduling backend workflow βAd creative & content platforms
Generate bulk ad-creative variations from product images β different styles, aspect ratios, and copy overlays in one batch. Power daily auto-posting, multilingual variants, and A/B creative testing at scale.
Product image + 10 style prompts β 10 ad variants via concurrent requestsSee agency workflow proof βProduct video & catalog apps
Convert product images into short videos (I2V), generate lifestyle shots, and batch-process entire catalogs. Webhook delivery per SKU β no polling infra needed.
Product image_url β POST /v1/video/generations β webhook callbackSee catalog workflow proof βFood & menu photo tools
Generate menu photos, food styling shots, and seasonal social content for restaurants and local businesses. Recurring weekly/monthly visual refresh workflows fit the pay-per-use model perfectly.
Menu item prompt β styled food photo β schedule to social channelsSee restaurant tool backend workflow βAI agents & chatbots
Give your AI assistant the ability to generate images and videos in-conversation. Works with LangChain, custom agents, or any orchestration layer.
Agent tool call β generate image β return URL in chatNewsletter & email visual tools
Generate header images, inline graphics, and visual content for newsletter platforms and email marketing tools. Lightweight per-image pricing beats fixed subscriptions for tools with variable send volume.
Newsletter topic β header image + 3 section graphics in one batchSee newsletter workflow proof βPrint & merch platforms
Let customers create custom designs for print-on-demand products β t-shirts, posters, phone cases β powered by AI generation.
User prompt β generate design β preview on product mockupSee POD workflow proof βThumbnail tool backend: variants at $0.21 each
If your product generates YouTube thumbnails, blog headers, or newsletter visuals, here is what batch variant generation looks like with CreativeAI as your image backend.
A/B thumbnail variants for one user request
Your user enters a video title. Your backend generates 4-6 thumbnail options with title-safe composition β negative space reserved for text overlay β so your front-end can composite headlines without clipping the subject.
import asyncio, aiohttp
API = "https://api.creativeai.run/v1/images/generations"
KEY = "YOUR_CREATIVEAI_KEY"
# Title-safe prompt suffix β ensures negative space for text overlay
TITLE_SAFE = (
"Leave the top-third of the frame as clean negative space "
"suitable for bold headline text overlay. No important subject "
"detail in the top 30% of the image."
)
STYLES = [
"Vibrant pop-art style, saturated colors, dramatic lighting",
"Clean minimalist, soft gradient background, studio lighting",
"Cinematic film grain, moody tones, shallow depth of field",
"Bold graphic illustration, flat colors, strong silhouette",
]
async def generate_thumbnail_variants(session, topic: str, count: int = 4):
"""Generate multiple title-safe thumbnail options from one topic."""
tasks = []
for i, style in enumerate(STYLES[:count]):
tasks.append(session.post(API, headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
}, json={
"model": "gpt-image-1",
"prompt": f"{topic}. {style}. {TITLE_SAFE}",
"size": "1280x720",
}))
responses = await asyncio.gather(*tasks)
results = []
for i, resp in enumerate(responses):
data = await resp.json()
results.append({
"variant": i + 1,
"style": STYLES[i],
"url": data["data"][0]["url"],
})
return results # 4 variants, ~$0.84 total, ~3-8s parallel
# Example: user enters "I Tested Every AI Code Editor"
# β 4 title-safe thumbnail options ready for text compositingTitle-safe composition
Prompt engineering reserves negative space for headline overlays. Your front-end composites text without clipping the subject.
Parallel variant generation
Fire 4-6 concurrent requests β all return in 3-8 seconds. Your user picks their favorite, not your algorithm.
Predictable per-image economics
~$0.21/thumbnail at volume rates. No tiered pricing surprises, no monthly minimums, no overage penalties.
Restaurant marketing tool: food photos at $0.21 each
If your product generates menu photos, daily specials, or social content for restaurants and local food businesses, here is what the backend looks like with CreativeAI.
Multi-location daily content pipeline
Your platform manages 30 restaurant locations. Each location needs fresh food photos for delivery apps, social media, and seasonal menu updates β generated automatically.
import asyncio, aiohttp
API = "https://api.creativeai.run/v1/images/generations"
KEY = "YOUR_CREATIVEAI_KEY"
async def generate_menu_photos(session, location: dict):
"""Generate a day's food photos for one restaurant location."""
results = []
for item in location["menu_items"]:
resp = await session.post(API, headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
}, json={
"model": "gpt-image-1",
"prompt": f"Appetizing {item['name']}: {item['description']}, "
f"professional food photography, white plate, "
f"restaurant table, warm lighting, top-down angle",
"size": "1024x1024",
})
data = await resp.json()
results.append({
"location_id": location["id"],
"item": item["name"],
"url": data["data"][0]["url"],
})
return results
async def daily_content_run(locations: list):
"""Batch food photos across all locations β ~$0.21/photo."""
async with aiohttp.ClientSession() as session:
tasks = [generate_menu_photos(session, loc) for loc in locations]
return await asyncio.gather(*tasks)
# 30 locations Γ 5 daily specials = 150 photos β ~$31.50/day
# Each location gets fresh social-ready food contentPer-location economics
~$37/location/month for daily food content. Charge $99β199/location and keep 60β80% margin. No volume tiers or overage penalties.
Multi-platform output
Generate once, distribute to delivery apps, Google Business, Instagram, and print menus. Size variants from the same prompt.
Recurring revenue fit
Restaurants need fresh photos weekly β daily specials, seasonal menus, promo graphics. Pay-per-image aligns your COGS to their usage.
Listing-photo β video: async at $0.36/clip
If your product turns property photos into walkthrough videos, virtual tours, or listing-ad clips for real-estate agents, here is what the I2V backend looks like with CreativeAI.
Weekly listing-video pipeline for a property platform
Your platform serves 20 agents. Each agent lists ~5 new properties per week, and each listing needs 3 room clips delivered via webhook to their CRM or MLS feed.
import asyncio, aiohttp
API_IMG = "https://api.creativeai.run/v1/images/generations"
API_VID = "https://api.creativeai.run/v1/video/generations"
KEY = "YOUR_CREATIVEAI_KEY"
WEBHOOK = "https://your-app.com/api/webhooks/listing-video-ready"
async def listing_photo_to_video(session, listing: dict):
"""Turn listing photos into short property walkthrough clips."""
jobs = []
for photo in listing["photos"]:
resp = await session.post(API_VID, headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
}, json={
"model": "kling-v3",
"prompt": f"Smooth cinematic pan across {photo['room_type']}, "
f"natural lighting, real estate showcase",
"image_url": photo["url"],
"duration": "5s",
"webhook_url": f"{WEBHOOK}?listing_id={listing['id']}"
f"&photo_id={photo['id']}",
})
data = await resp.json()
jobs.append({
"listing_id": listing["id"],
"photo_id": photo["id"],
"job_id": data["id"],
})
return jobs
async def batch_listing_videos(listings: list):
"""Submit I2V jobs for all listings β results arrive via webhook."""
async with aiohttp.ClientSession() as session:
tasks = [listing_photo_to_video(session, l) for l in listings]
return await asyncio.gather(*tasks)
# 20 agents Γ 5 listings Γ 3 rooms = 300 videos/batch
# ~$0.36/clip β $108/batch, results via signed webhookAsync + webhook delivery
Submit I2V jobs in bulk, results arrive via HMAC-signed webhook. No polling queues to build β your app just handles the callback.
Per-asset economics
~$0.36/video clip, ~$0.21/image. Charge per listing or per agent seat and maintain healthy margins. Zero monthly minimums.
White-label ready
Per-client API keys with spend controls. No CreativeAI branding. Your agents see your product, not ours.
Ad creative platform: bulk variations at $0.21 each
If your product generates ad creatives, A/B variations, or multi-platform ad assets for advertisers, here is what the backend looks like with CreativeAI.
Multi-platform ad variation pipeline
Your platform serves 100 advertisers. Each advertiser needs 5β10 creative variations per campaign across Instagram, Facebook, Google Display, TikTok, and email β generated on demand.
import asyncio, aiohttp, json
API = "https://api.creativeai.run/v1/images/generations"
KEY = "YOUR_CREATIVEAI_KEY"
# One product image β multiple ad-creative variations
PRODUCT = "https://cdn.example.com/products/sneaker-hero.png"
VARIATIONS = [
{"style": "Instagram Story", "size": "1080x1920", "prompt": "Premium sneaker on gradient background, bold sale text overlay, vertical story format"},
{"style": "Facebook Feed", "size": "1200x628", "prompt": "Lifestyle shot of sneaker on urban street, warm tones, horizontal ad banner"},
{"style": "Google Display", "size": "300x250", "prompt": "Clean product shot of sneaker, white background, compact square layout"},
{"style": "TikTok Cover", "size": "1080x1920", "prompt": "Dynamic sneaker with motion blur, neon accents, vertical video thumbnail"},
{"style": "Email Hero", "size": "600x400", "prompt": "Sneaker with seasonal props, soft lighting, email-friendly warm palette"},
]
async def generate_variation(session, variation):
resp = await session.post(API, headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
}, json={
"model": "gpt-image-1",
"prompt": variation["prompt"],
"size": variation["size"],
})
result = await resp.json()
return {"style": variation["style"], "url": result["data"][0]["url"]}
async def bulk_ad_variations():
async with aiohttp.ClientSession() as session:
tasks = [generate_variation(session, v) for v in VARIATIONS]
results = await asyncio.gather(*tasks)
# 5 platform-targeted creatives from one product, ~10s total
for r in results:
print(f'{r["style"]}: {r["url"]}')
return results
asyncio.run(bulk_ad_variations())Per-creative economics
~$0.21/image, ~$0.36/video clip. Charge advertisers per campaign or per variation and maintain healthy margins. No volume tiers or monthly minimums.
Parallel generation
Generate all platform variants in parallel β 5 ad sizes from one product image in ~3-8 seconds. Async video variations arrive via webhook.
White-label + per-client keys
Issue separate API keys per advertiser account. Track spend, set caps, revoke access independently. Zero CreativeAI branding on outputs.
Integrate in minutes, not weeks
If your app already uses the OpenAI SDK, change two lines. If not, it is a standard REST API.
from openai import OpenAI
# Drop-in replacement β same SDK, different base_url
client = OpenAI(
api_key="YOUR_CREATIVEAI_KEY",
base_url="https://api.creativeai.run/v1"
)
# Generate an image for your user
result = client.images.generate(
model="gpt-image-1",
prompt=user_prompt,
size="1024x1024"
)
image_url = result.data[0].url
# β Serve to your user, store in your DB, etc.DIY multi-vendor stack vs. CreativeAI
Pay for generations, not seats or tiers
No subscriptions. Buy credits, use them when your users need them. Credits never expire.
Volume Discounts
What your product actually costs to run
Real volume scenarios for SaaS products that embed AI generation. These assume the $100+ tier (40% bonus = 1,400 credits/$100, effective ~$0.21/image, ~$0.36/video).
Scale up or down without renegotiating contracts.
From zero to production in four steps
Get your API key
Sign up free, grab an API key from the dashboard. 50 credits included β no credit card.
Integrate in your app
Use the OpenAI SDK or any HTTP client. Change base_url to api.creativeai.run/v1.
Set spend controls
Configure per-key monthly caps and rate limits. Separate keys for dev, staging, and prod.
Ship to your users
Your users generate images and videos through your product. You pay per generation.
Common questions from product teams
Your usersβ generation backend is at risk
Two major provider shutdowns are happening now. If your product depends on a single generation API, your feature breaks when that provider shuts down. Multi-model routing means your users never notice.
- Sora 1 API has been shut down
- Sora 2 requires $200/mo ChatGPT Pro β no standalone API
- CreativeAI: 5+ video models (Kling v3, Seedance 1.5, Veo 3.1) on one key
Use code SORASWITCH for 50 free video credits.
- DALL-E 2 already deprecated β DALL-E 3 API shuts down May 12
- Products using dall-e-3 model will stop generating entirely
- CreativeAI: dall-e-3 alias auto-routes to GPT Image 1 β zero-change migration
Use code DALLE1000 for 3,000 free image credits.
Why multi-model routing protects your product
If a provider shuts down or returns errors, requests route to a backup model transparently. Your users see results, not error pages.
Your integration uses one endpoint. Model changes happen behind the API β no client-side code changes when providers come and go.
When better models launch, they appear as new model parameters on the same endpoint. Upgrade quality without re-integrating.
Deep dives for specific workflows
Building a thumbnail tool, social-content platform, restaurant marketing app, catalog tool, or creative-variation SaaS? These pages cover the exact API flows, reliability guarantees, and pricing proof your team needs.
Reference Fidelity API
Preserve logos, product details, and brand elements across generated images. White-label API proof included.
Product Video + Webhook Playbook
Bounded async batches, signed webhook delivery, SKU-level manifests for Shopify and catalog workflows.
Catalog-Scale Batch Workflows
Batch product-image generation, async video delivery, and white-label pricing for e-commerce platforms.
Thumbnail & Creator Tool Backend
Title-safe composition, A/B variant generation, and per-thumbnail economics for tools like ThumbAI or Pikzels.
Social Content Platform Backend
One-key image + video generation for Predis, Postally, Buffer-style scheduling tools. Webhook delivery, per-post economics.
Restaurant & Local Marketing Backend
Food photo generation, daily specials workflows, and per-location economics for multi-restaurant platforms.
Real Estate Listing Video Backend
Listing-photo to video workflows, async webhook delivery, and per-asset economics for property platforms.
Automation & Scheduling Backend
n8n, Make, and Zapier integration patterns, per-workflow economics, and social content scheduling proof.
API Documentation
Full endpoint reference, authentication, error codes, and examples.
Webhooks & Async Reliability
HMAC-signed callbacks, retry guarantees, failover behavior, and render-status visibility.
Transparent Pricing
Per-model costs, volume discounts, and credit calculator.
Partner & Reseller Program
Resell AI generation under your brand. Per-client API keys, volume pricing, zero attribution, and partner rewards.
Social content platform: one API behind the scenes
If your product schedules, auto-posts, or manages social content for users, here is what the image + video backend looks like with CreativeAI.
Daily content pipeline for a social scheduling SaaS
Your users schedule 20 posts per day across Instagram, TikTok, LinkedIn, and X. Your backend generates the visuals on-demand before each post goes live.
Images: synchronous
Feed and story images return in 3-10s. Generate just before the scheduled post time β no pre-rendering queue needed.
Videos: async + webhook
Submit I2V jobs 5-10 minutes before post time. Result arrives via HMAC-signed webhook. No polling infra to build.
Multi-platform sizes
One prompt β concurrent requests for 1:1, 9:16, 16:9 variants. Same API, same key, same billing.