MayaAds
Explore our API documentation and examples to integrate MayaAds into your application or workflow. Easy to integrate — our API is a simple HTTP interface with various options. Generate winning Meta ads for any website with a single API call.
Authentication
All requests need an API key, issued by our team. Send it as a Bearer token:
Authorization: Bearer YOUR_API_KEYPOST
/api/public/v1/ads1. Create an ad campaign
- url (required): the e-commerce or brand website to analyze.
- Returns ready-to-use ad copy for every ad in about 20–40 seconds.
- Each call counts as one campaign against your monthly limit.
Request body
{
"url": "https://yourstore.com"
}Response
{
"ok": true,
"campaignId": "b3f1c2...",
"brand": { "name": "Your Store", "colors": ["#F34F08", "#141414"] },
"ads": [
{
"index": 0,
"headline": "On-image headline",
"primary_texts": ["...", "..."],
"headlines": ["...", "..."],
"cta": "Shop Now",
"image_endpoint": "https://getmayaads.com/api/public/v1/ads/b3f1c2.../images"
}
],
"usage": { "used": 12, "limit": 100 }
}POST
/api/public/v1/ads/{campaignId}/images2. Generate an ad image
- index (required): which ad from step 1 to render.
- format: 9:16 (Stories & Reels, default) or 1:1 (square feed).
- Call once per ad. Repeat calls return the same image; the link is valid for 6 hours.
Request body
{
"index": 0,
"format": "9:16"
}Response
{
"ok": true,
"index": 0,
"format": "9:16",
"url": "https://...signed-image-url...",
"expires_in": 21600
}Example: cURL
curl -X POST https://getmayaads.com/api/public/v1/ads \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://yourstore.com"}'
# then, for each ad index returned:
curl -X POST https://getmayaads.com/api/public/v1/ads/CAMPAIGN_ID/images \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"index": 0, "format": "9:16"}'Need an API key or higher volume?
Tell us about your use case — our team will reach out within the same business day.
