🎯 AdForge AI — Ad Creative Generation API
Generate professional ad creatives from product images and text in one API call.
💡 50x cheaper than AdCreative.ai
AdCreative.ai charges $2.50+ per download. AdForge costs $0.050 per ad. Same quality, 50x cheaper. Works with Meta, Google, Flipkart, and Meesho ad formats.
Overview
AdForge AI generates complete ad creatives in one API call. The pipeline:
- AI Background Generation — AI image generation generates a professional backdrop based on your chosen style
- Product Compositing — If you provide a product image, background is removed and product is composited onto the scene
- Text Overlay — Headline, subheadline, CTA button, and brand name are composited with drop shadows
The entire process takes 10-25 seconds. You get a production-ready JPEG.
Quick Start
Generate your first ad creative in 30 seconds:
curl -X POST https://api.pixelapi.dev/v1/image/ad-creative \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "headline=Mega Sale - 70% OFF" \
-F "subheadline=Biggest Festival Sale" \
-F "cta=Shop Now" \
-F "brand=ShopKart" \
-F "ad_format=meta_1080x1080" \
-F "style=festive_indian"
Response:
{
"generation_id": "754af5e8-bb49-48d7-a47e-e80a3c5a75ff",
"status": "queued",
"credits_used": 50.0,
"estimated_seconds": 20
}
Poll for the result:
curl https://api.pixelapi.dev/v1/image/754af5e8-bb49-48d7-a47e-e80a3c5a75ff \
-H "Authorization: Bearer YOUR_API_KEY"
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
headline | ✅ Yes | — | Main headline text (max 100 chars) |
product_image | No | — | Product image file (JPG/PNG/WEBP, max 20MB) |
product_image_url | No | — | URL to product image |
subheadline | No | "" | Secondary text (max 200 chars) |
cta | No | "" | CTA button text (max 50 chars) |
brand | No | "" | Brand name (max 50 chars) |
ad_format | No | meta_1080x1080 | Ad format preset |
style | No | abstract_tech | Background style preset |
layout | No | bottom_text | Text layout preset |
headline_color | No | 255,255,255 | RGB color for headline |
cta_color | No | 255,87,51 | RGB color for CTA button |
badge | No | "" | Badge text (e.g. "70% OFF") |
background_prompt | No | "" | Custom background prompt (overrides style) |
Ad Formats
| Format | Dimensions | Platform |
|---|---|---|
meta_1080x1080 | 1080×1080 | Instagram Feed, Facebook Feed |
meta_1080x1920 | 1080×1920 | Instagram Stories, Facebook Stories |
google_1200x628 | 1200×628 | Google Display Network |
flipkart_1080x1080 | 1080×1080 | Flipkart Ads |
meesho_1080x1080 | 1080×1080 | Meesho Ads |
Background Styles
| Style | Description | Best For |
|---|---|---|
abstract_tech | Futuristic gradient, geometric shapes, blue/purple | SaaS, tech products, apps |
abstract_warm | Warm gradient, orange/gold tones | Lifestyle, fashion, food |
minimal_clean | White/light gray, subtle shadows | Premium products, luxury |
festive_indian | Golden bokeh, red/gold colors | Diwali sales, Indian festivals |
dark_luxury | Deep black with gold accents | High-end brands, exclusivity |
nature_fresh | Green/earth tones, botanical | Organic, eco-friendly products |
gradient_sunset | Pink/orange/purple gradient | Fashion, beauty, lifestyle |
concrete_urban | Modern concrete texture | Streetwear, urban brands |
Text Layouts
| Layout | Description | Best For |
|---|---|---|
bottom_text | Text at bottom with gradient overlay | Square ads, product-focused |
split_right | Text on left panel, image on right | Landscape ads (Google Display) |
story_center | Text centered vertically | Instagram/Facebook Stories |
top_banner | Text at top with banner | Announcements, promotions |
Code Examples
Python
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.pixelapi.dev"
# Generate ad creative
response = requests.post(
f"{BASE_URL}/v1/image/ad-creative",
headers={"Authorization": f"Bearer {API_KEY}"},
data={
"headline": "Summer Sale - 50% Off",
"subheadline": "Limited Time Only",
"cta": "Shop Now",
"brand": "FashionHub",
"ad_format": "meta_1080x1080",
"style": "gradient_sunset",
"layout": "bottom_text",
}
)
job = response.json()
print(f"Job ID: {job['generation_id']}")
# Poll for result
while True:
result = requests.get(
f"{BASE_URL}/v1/image/{job['generation_id']}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if result["status"] == "completed":
print(f"✅ Ad ready: {result['output_url']}")
break
elif result["status"] == "failed":
print(f"❌ Error: {result['error_message']}")
break
time.sleep(2)
Node.js
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.pixelapi.dev';
async function generateAd() {
const form = new FormData();
form.append('headline', 'Premium Headphones');
form.append('subheadline', 'Active Noise Cancellation');
form.append('cta', 'Buy Now - ₹2,999');
form.append('brand', 'SonicPro');
form.append('ad_format', 'meta_1080x1080');
form.append('style', 'abstract_tech');
const res = await fetch(`${BASE_URL}/v1/image/ad-creative`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}` },
body: form
});
const job = await res.json();
console.log('Job ID:', job.generation_id);
// Poll for result
while (true) {
await new Promise(r => setTimeout(r, 2000));
const check = await fetch(
`${BASE_URL}/v1/image/${job.generation_id}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());
if (check.status === 'completed') {
console.log('Ad ready:', check.output_url);
break;
}
if (check.status === 'failed') {
console.error('Failed:', check.error_message);
break;
}
}
}
generateAd();
With Product Image
Upload a product image to generate ads with your actual product composited onto the AI background:
curl -X POST https://api.pixelapi.dev/v1/image/ad-creative \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "product_image=@/path/to/headphones.png" \
-F "headline=Pure Sound. Zero Noise." \
-F "subheadline=Active Noise Cancellation | 40hr Battery" \
-F "cta=Buy Now - ₹2,999" \
-F "brand=SonicPro" \
-F "ad_format=meta_1080x1080" \
-F "style=dark_luxury"
📸 Product Image Tips
For best results, upload product images with clean/white backgrounds. The API automatically removes the background before compositing. PNG with transparency works best.
Pricing
| Platform | Per Ad | 1000 Ads |
|---|---|---|
| AdCreative.ai | $2.50-$3.90 | $2,500-$3,900 |
| Pencil | $0.28-$0.56 | $280-$560 |
| PixelAPI AdForge | $0.050 | $50 |
AdForge costs 50 credits per ad creative. On our Pro plan ($50/mo for 60,000 credits), that's 1,200 ad creatives included.
Tips for Best Results
- Use abstract/geometric styles — They produce the highest quality (9/10) because there's no uncanny valley
- Keep headlines short — 3-5 words for maximum visual impact
- Use contrasting CTA colors — Orange on dark backgrounds, dark on light backgrounds
- Upload clean product images — White/transparent backgrounds composit best
- Use split_right layout for landscape ads — best text readability
- Match style to product — tech products → abstract_tech, fashion → gradient_sunset, food → abstract_warm