Output Formats
Four output formats — JSON, HTML, Markdown, and plain text.
Every template supports four output formats. The underlying data is identical — the format controls how it's wrapped.
Choosing a Format
Pass the format parameter:
# JSON (default)
curl "https://api.yaddayadda.io/v1/generate?template=hero_section&format=json"
# HTML
curl "https://api.yaddayadda.io/v1/generate?template=hero_section&format=html"
# Markdown
curl "https://api.yaddayadda.io/v1/generate?template=hero_section&format=md"
# Plain text
curl "https://api.yaddayadda.io/v1/generate?template=hero_section&format=text"json (default)
Structured data in the standard response envelope. Best for Figma plugins, mobile apps, CMS integrations, and custom rendering.
Content-Type: application/json
{
"template": "hero_section",
"format": "json",
"source": "yadda_ipsum",
"data": {
"headline": "Yadda yadda ipsum dolor bla amet",
"subheadline": "...",
"body": "...",
"cta_primary": "Yaddayadda me",
"cta_secondary": "Bla bla bla"
},
"meta": { ... }
}html
Semantic HTML fragment with proper tags and class names. No CSS included — bring your own styles.
Content-Type: text/html
<section class="hero-section">
<h1>Yadda yadda ipsum dolor bla amet</h1>
<p class="subheadline">...</p>
<p>...</p>
<a class="cta-primary" href="#">Yaddayadda me</a>
<a class="cta-secondary" href="#">Bla bla bla</a>
</section>md
Markdown with appropriate heading levels. For docs sites, static generators, and READMEs.
Content-Type: text/markdown
# Yadda yadda ipsum dolor bla amet
*...*
...
[Yaddayadda me](#) | [Bla bla bla](#)text
Plain concatenated text with line breaks. For paste workflows and legacy tools.
Content-Type: text/plain
Yadda yadda ipsum dolor bla amet
...
Yaddayadda me
Bla bla blaParagraphs Format Behavior
When using the paragraphs template (default), formats behave slightly differently:
| Format | Output |
|---|---|
json | Full response envelope with data.paragraphs array |
html | Paragraphs wrapped in <p> tags |
md | Paragraphs separated by blank lines |
text | Paragraphs separated by blank lines |