API Documentation
Enterprise-grade AI content generation powered by multi-agent LangGraph workflows. Production-ready REST API with 13+ templates and 60+ style profiles.
https://writerzroom-backend-api-732324345493.us-central1.run.appAuthentication
WriterzRoom uses Google OAuth 2.0 for authentication. All API endpoints require a valid session token obtained through the web interface at https://writerzroom.com.
Sign in with Google OAuth
Navigate to https://writerzroom.com and authenticate using Google OAuth 2.0
Obtain Session Cookie
After authentication, your session cookie is automatically set by NextAuth
Cookie: next-auth.session-token=<your-session-token>
Make Authenticated Requests
Include your session cookie in all API requests to the backend
curl -X POST "https://writerzroom-backend-api-732324345493.us-central1.run.app/api/v1/generation/generate" \
-H "Content-Type: application/json" \
-H "Cookie: next-auth.session-token=<your-session-token>" \
-d '{
"template_id": "blog_post",
"style_profile_id": "technical_dive",
"parameters": {
"topic": "LangGraph Multi-Agent Systems",
"target_length": "2000",
"target_audience": "AI/ML Engineers"
}
}'Security Note
Session tokens are HTTP-only cookies managed by NextAuth. Never expose your session token in client-side code. All requests must originate from authenticated sessions through the WriterzRoom platform.
API Endpoints
/api/v1/generation/generateGenerate content using templates and style profiles with multi-agent orchestration
/api/v1/generation/status/{request_id}Poll generation status for long-running content creation tasks
/api/v1/templatesList all available content templates (13+ types)
/api/v1/stylesList all style profiles (60+ voices and tones)
/api/v1/dashboard/statsRetrieve user analytics and usage statistics
/api/v1/analytics/performancePerformance metrics for content generation pipeline
/api/v1/analytics/templatesTemplate usage statistics and performance data
/healthSystem health check endpoint
Content Generation
Generate Content
Initiate content generation by specifying a template, style profile, and dynamic parameters. The multi-agent system orchestrates planning, research, writing, editing, SEO optimization, and formatting.
Request
{
"template_id": "blog_post",
"style_profile_id": "technical_dive",
"parameters": {
"topic": "Enterprise AI Content Generation",
"target_length": "2500",
"target_audience": "CTOs and Technical Leaders",
"seo_keywords": ["AI content", "enterprise automation", "LangGraph"]
}
}Response
{
"request_id": "gen_abc123xyz",
"status": "processing",
"message": "Generation started. Use request_id to poll status.",
"estimated_time_seconds": 45
}Poll Generation Status
Content generation is asynchronous. Use the request_id to poll for completion status and retrieve generated content.
Polling Request
curl -X GET "https://writerzroom-backend-api-732324345493.us-central1.run.app/api/v1/generation/status/gen_abc123xyz" \ -H "Cookie: next-auth.session-token=<your-session-token>"
Success Response
{
"request_id": "gen_abc123xyz",
"status": "completed",
"content": {
"title": "Enterprise AI Content Generation: A Technical Deep Dive",
"body": "...",
"metadata": {
"word_count": 2547,
"seo_score": 87,
"readability": "college"
}
},
"agents_used": ["planner", "researcher", "writer", "editor", "seo", "formatter"],
"total_tokens": 15420,
"generation_time_seconds": 42
}Error Response
{
"request_id": "gen_abc123xyz",
"status": "failed",
"error": {
"code": "TEMPLATE_NOT_FOUND",
"message": "Template 'invalid_template' does not exist",
"details": "Available templates: blog_post, social_media_campaign, ..."
}
}Multi-Agent Architecture
Each generation request flows through specialized agents: Planner (content strategy),Researcher (real-time data via Tavily API), Writer (content creation),Editor (quality refinement), SEO Agent (optimization), and Formatter (final output). State managed via LangGraph for reliable orchestration.
Content Templates
Templates define the structure, format, and behavior of generated content. Each template is YAML-driven with dynamic parameter extraction and multi-agent orchestration rules.
Marketing
- Social Media Campaign
- Email Marketing
- Ad Copy
- Product Description
Content
- Blog Post
- Article
- Press Release
- Case Study
Technical
- Technical Documentation
- API Reference
- Tutorial
- Whitepaper
Creative
- Story
- Script
- Poem
- Song Lyrics
Retrieve Available Templates
curl -X GET "https://writerzroom-backend-api-732324345493.us-central1.run.app/api/v1/templates" \ -H "Cookie: next-auth.session-token=<your-session-token>"
Style Profiles
Style profiles define voice, tone, complexity, and formatting preferences. Apply consistent branding and communication styles across all generated content.
Professional
Enterprise and professional communication styles
Marketing
Marketing and promotional content voices
Creative
Engaging and audience-focused styles
Specialized
Purpose-built for specific use cases
Retrieve Available Style Profiles
curl -X GET "https://writerzroom-backend-api-732324345493.us-central1.run.app/api/v1/styles" \ -H "Cookie: next-auth.session-token=<your-session-token>"
Rate Limits & Subscription Tiers
Demo
$9.99
7 days
5 total
generations
Starter
$39/mo
Monthly
500/month
generations
Professional
$79/mo
Monthly
1000/month
generations
Enterprise
$149/mo
Monthly
2000/month
generations
Rate Limit Enforcement
Exceeding your tier's monthly limit returns HTTP 429 (Too Many Requests). Monitor usage via the/api/v1/dashboard/stats endpoint. Admin users bypass limits.
Support & Resources
Enterprise Integration Support
Need custom integrations, dedicated support, or white-label solutions? Enterprise customers receive priority API access, dedicated account management, and custom SLA agreements.
View Enterprise Plans