🎯 AdForge AI — Ad Creative Generation API

Generate professional ad creatives from product images and text in one API call.

📖 8 min read 🏷️ Ad Creative Generation 💰 50 credits ($0.050)

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

🎯 Try AdForge Free →

Overview

AdForge AI generates complete ad creatives in one API call. The pipeline:

  1. AI Background Generation — AI image generation generates a professional backdrop based on your chosen style
  2. Product Compositing — If you provide a product image, background is removed and product is composited onto the scene
  3. 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

ParameterRequiredDefaultDescription
headline✅ YesMain headline text (max 100 chars)
product_imageNoProduct image file (JPG/PNG/WEBP, max 20MB)
product_image_urlNoURL to product image
subheadlineNo""Secondary text (max 200 chars)
ctaNo""CTA button text (max 50 chars)
brandNo""Brand name (max 50 chars)
ad_formatNometa_1080x1080Ad format preset
styleNoabstract_techBackground style preset
layoutNobottom_textText layout preset
headline_colorNo255,255,255RGB color for headline
cta_colorNo255,87,51RGB color for CTA button
badgeNo""Badge text (e.g. "70% OFF")
background_promptNo""Custom background prompt (overrides style)

Ad Formats

FormatDimensionsPlatform
meta_1080x10801080×1080Instagram Feed, Facebook Feed
meta_1080x19201080×1920Instagram Stories, Facebook Stories
google_1200x6281200×628Google Display Network
flipkart_1080x10801080×1080Flipkart Ads
meesho_1080x10801080×1080Meesho Ads

Background Styles

StyleDescriptionBest For
abstract_techFuturistic gradient, geometric shapes, blue/purpleSaaS, tech products, apps
abstract_warmWarm gradient, orange/gold tonesLifestyle, fashion, food
minimal_cleanWhite/light gray, subtle shadowsPremium products, luxury
festive_indianGolden bokeh, red/gold colorsDiwali sales, Indian festivals
dark_luxuryDeep black with gold accentsHigh-end brands, exclusivity
nature_freshGreen/earth tones, botanicalOrganic, eco-friendly products
gradient_sunsetPink/orange/purple gradientFashion, beauty, lifestyle
concrete_urbanModern concrete textureStreetwear, urban brands

Text Layouts

LayoutDescriptionBest For
bottom_textText at bottom with gradient overlaySquare ads, product-focused
split_rightText on left panel, image on rightLandscape ads (Google Display)
story_centerText centered verticallyInstagram/Facebook Stories
top_bannerText at top with bannerAnnouncements, 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

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

  1. Use abstract/geometric styles — They produce the highest quality (9/10) because there's no uncanny valley
  2. Keep headlines short — 3-5 words for maximum visual impact
  3. Use contrasting CTA colors — Orange on dark backgrounds, dark on light backgrounds
  4. Upload clean product images — White/transparent backgrounds composit best
  5. Use split_right layout for landscape ads — best text readability
  6. Match style to product — tech products → abstract_tech, fashion → gradient_sunset, food → abstract_warm
🎯 Start Generating Ads →