Generate AI-powered marketing content at scale using our RESTful API.
All API requests require authentication using an API key in the header:
Authorization: Bearer YOUR_API_KEY
https://marketingium.com/api
Create a new marketing campaign with AI-generated images.
{
"name": "Summer Sale 2024",
"product": "Premium athletic shoes with advanced cushioning",
"platforms": ["instagram", "facebook", "twitter"],
"variations": 10,
"style": "Modern & Minimalist"
}
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Required | Campaign name |
product | string | Required | Product description for AI to understand context |
platforms | array | Optional | Target platforms: instagram, facebook, twitter, linkedin, tiktok |
variations | integer | Optional | Number of variations per platform (default: 10) |
style | string | Optional | Visual style for generation |
{
"campaignId": "uuid-here",
"status": "processing",
"estimatedTime": 230,
"message": "Campaign generation started"
}
Get the status of a campaign.
{
"id": "uuid-here",
"name": "Summer Sale 2024",
"status": "completed",
"images": [...],
"stats": {
"requested": 30,
"generated": 28,
"successRate": 0.93
}
}
Generate a consistent AI influencer character.
{
"name": "Alex Digital",
"personality": "Tech-savvy fitness enthusiast",
"style": "Modern athletic wear",
"gender": "neutral",
"age": "25-30"
}
{
"influencerId": "uuid-here",
"name": "Alex Digital",
"status": "generating",
"estimatedCompletion": "2024-01-20T15:30:00Z"
}
Generate multiple images from a list of prompts.
{
"prompts": [
"Minimalist watch on marble background",
"Luxury handbag in studio lighting",
"Athletic shoes with dynamic composition"
],
"variations": 3,
"style": "Product Photography"
}
{
"batchId": "uuid-here",
"totalImages": 9,
"estimatedTime": 20.7,
"costEstimate": 0.18,
"status": "processing"
}
Get real-time platform analytics.
{
"current": {
"activeJobs": 847,
"imagesPerSecond": 42.7,
"gpuUtilization": 0.87,
"queueDepth": 15420
},
"today": {
"totalGenerated": 142847,
"successRate": 0.98,
"totalCost": 2856.94
},
"infrastructure": {
"totalGPUs": 32,
"activeGPUs": 28,
"systemHealth": "optimal"
}
}
Get AI-powered marketing insights using GPT-4.1 nano.
{
"product": "Eco-friendly water bottles",
"target": "Health-conscious millennials",
"goals": "Increase brand awareness and drive sales"
}
{
"analysis": "Detailed marketing analysis...",
"model": "gpt-4.1-nano",
"timestamp": "2024-01-20T15:30:00Z"
}
Rate limits vary by plan:
Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
import requests
api_key = "YOUR_API_KEY"
url = "https://marketingium.com/api/campaign/create"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
data = {
"name": "Summer Campaign",
"product": "Sustainable fashion line",
"variations": 5,
"platforms": ["instagram", "facebook"]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const apiKey = 'YOUR_API_KEY';
fetch('https://marketingium.com/api/campaign/create', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Summer Campaign',
product: 'Sustainable fashion line',
variations: 5,
platforms: ['instagram', 'facebook']
})
})
.then(res => res.json())
.then(data => console.log(data));
Configure webhooks to receive real-time updates when campaigns complete:
POST /webhook/configure
{
"url": "https://your-server.com/webhook",
"events": ["campaign.completed", "batch.finished"]
}
Generate your API key from the dashboard and start creating AI-powered marketing content.
Go to Dashboard →