Content API
Generate articles asynchronously. Submit a topic, get a job ID, poll or receive via webhook.
Async Flow
Article generation takes ~45 seconds and goes through these pipeline steps:
- Scan — Analyze topic and keywords
- Research — Web search with Google Search grounding, gather citations
- Writing — Generate EEAT-compliant article
- Audit — Score for E-E-A-T compliance (0-50)
- Formatting — HTML with Schema JSON-LD, FAQ, AI summary box
- Image — Generate featured image via Imagen 3
- Social — Create LinkedIn and X posts
You can either poll the status endpoint or configure a webhook for delivery.
POST /v1/content/articles
Submit a topic for generation. Returns immediately with a job ID.
Credits: 1 per article
Request
json
{
"brand_id": "brd_xyz",
"product_id": "prod_abc",
"persona_id": "per_def",
"topic": "How AI reduces ER wait times in 2026",
"keywords": ["ER wait times", "AI hospital"],
"word_count": 1500,
"outputs": ["html", "markdown", "social", "featured_image"],
"publish_to": "target_id",
"webhook_url": "https://mybot.com/webhook"
}
| Field | Type | Required | Description |
|---|---|---|---|
brand_id |
string | No | Brand ID (uses default if not set) |
product_id |
string | No | Product to promote (auto-detected if empty) |
persona_id |
string | No | Target persona |
topic |
string | Yes | Article topic |
keywords |
string[] | No | Target keywords (AI suggests if empty) |
word_count |
integer | No | Target word count (default: 1500) |
outputs |
string[] | No | What to generate: html, markdown, social, featured_image |
publish_to |
string | No | Target ID for auto-publish |
webhook_url |
string | No | Override default webhook URL |
Response 202 Accepted
json
{
"job_id": "job_abc123",
"status": "queued",
"estimated_seconds": 45,
"credits_charged": 1,
"poll_url": "/v1/content/articles/job_abc123",
"message": "Article generation started. Poll for status or wait for webhook."
}
GET /v1/content/articles/{job_id}
Poll for article status and result.
Response — Processing
json
{
"job_id": "job_abc123",
"status": "processing",
"step": "writing",
"progress": 60,
"estimated_seconds_remaining": 18
}
| Step | Description |
|---|---|
scan |
Analyzing topic and keywords |
research |
Searching web for sources |
writing |
Generating article content |
audit |
EEAT compliance scoring |
formatting |
HTML + Schema JSON-LD |
image |
Featured image generation |
social |
Social media posts |
Response — Complete
json
{
"job_id": "job_abc123",
"status": "complete",
"article": {
"title": "How AI Reduces ER Wait Times in 2026",
"html": "<article>...</article>",
"markdown": "# How AI Reduces...",
"meta_title": "AI ER Wait Times — Hospital Guide 2026",
"meta_description": "Discover how AI-powered...",
"focus_keyword": "AI ER wait times",
"word_count": 1523,
"eeat_score": 44,
"research_sources": [
{ "title": "...", "url": "...", "used_for": "..." }
],
"internal_link_suggestions": [
{ "anchor_text": "...", "target_url": "...", "relevance": 0.87 }
]
},
"featured_image": {
"url": "https://storage.googleapis.com/...",
"alt_text": "AI-powered hospital bed management dashboard",
"title": "AI Hospital Bed Management",
"width": 1792,
"height": 1024
},
"social_posts": {
"linkedin": [
{ "variant": "storytelling", "text": "...", "first_comment": "..." },
{ "variant": "insight", "text": "...", "first_comment": "..." }
],
"x": [
{ "variant": "provocative", "text": "..." },
{ "variant": "data", "text": "..." }
]
},
"published_to": {
"target": "Main Blog",
"url": "https://acmehealthcare.com/blog/ai-er-wait-times",
"post_id": 1234
},
"credits_used": 1
}
