Batch Endpoint (Coming Soon)
Generate multiple templates in a single request with shared topic and tone.
Coming soon — This endpoint is planned but not yet available. The documentation below is a preview of the intended API. For now, make separate requests to
/v1/generatefor each template.
Endpoint
POST /v1/generate/batchGenerate multiple templates in a single request. All templates share the same topic and tone, ensuring consistent content across sections.
Request Body
{
"topic": "fintech startup for millennials",
"tone": "corporate_buzzword",
"requests": [
{ "template": "navbar" },
{ "template": "hero_section" },
{ "template": "features_grid", "count": 4 },
{ "template": "testimonials", "count": 3 },
{ "template": "pricing_table", "tiers": 3 },
{ "template": "footer" }
]
}| Field | Type | Required | Description |
|---|---|---|---|
topic | string | No | Shared topic for all templates |
tone | string | No | Shared tone preset for all templates |
requests | array | Yes | Array of template requests |
requests[].template | string | Yes | Template ID |
requests[].count | integer | No | Item count (for templates that support it) |
requests[].tiers | integer | No | Tier count (for pricing_table) |
Billing
Each item in the requests array counts as one generation against your quota. A batch of 6 templates uses 6 generations.
Internally, batch requests are combined into fewer AI calls for cost efficiency — but billing is per template.
Authentication
- Without API key: All templates return Yadda Ipsum (static content)
- With API key + topic/tone: All templates return AI-generated content
Example
curl -X POST "https://api.yaddayadda.io/v1/generate/batch" \
-H "Authorization: Bearer yda_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"topic": "pet adoption platform",
"tone": "enthusiastic_intern",
"requests": [
{ "template": "hero_section" },
{ "template": "features_grid", "count": 3 },
{ "template": "testimonials", "count": 3 }
]
}'