http://localhost:8000/api/v1
Currently, the API does not require authentication. For production deployments, add authentication middleware as needed.
GET /api/v1/healthResponse:
{
"status": "healthy",
"version": "2.0.0",
"environment": "development",
"features": {
"pipeline": true,
"multi_language": true,
"platform_adaptation": true,
"narrative_transform": true
}
}POST /api/v1/analyze
Content-Type: application/json
{
"content": "Your raw content here..."
}Response:
{
"status": "success",
"data": {
"key_points": ["Point 1", "Point 2"],
"themes": ["technology", "development"],
"sentiment": "positive",
"technical_terms": ["Kubernetes", "Docker"],
"complexity_level": "advanced"
},
"timing": {"total_ms": 150}
}POST /api/v1/topics
Content-Type: application/json
{
"content": "Your raw content here..."
}POST /api/v1/write/cn
Content-Type: application/json
{
"content": "Your raw content here..."
}Response:
{
"status": "success",
"data": {
"title": "Chinese Blog Title",
"content": "# Title\\n\\nContent...",
"word_count": 1200,
"reading_time": 5,
"seo_title": "SEO Optimized Title",
"seo_description": "Meta description"
}
}POST /api/v1/write/en
Content-Type: application/json
{
"content": "Your raw content here..."
}POST /api/v1/transform
Content-Type: application/json
{
"content": "Your raw content here..."
}POST /api/v1/adapt
Content-Type: application/json
{
"content": "Your raw content here...",
"platform": "medium"
}Supported platforms: medium, wechat, x, xiaohongshu, linkedin, devto, jianshu
POST /api/v1/full
Content-Type: application/json
{
"content": "Your raw content here...",
"language": "auto",
"platforms": ["medium", "wechat"],
"enable_narrative": false,
"include_full_content": false
}Parameters:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| content | string | Yes | - | Raw input content |
| language | string | No | auto | cn, en, or auto |
| platforms | array | No | ["medium", "wechat"] | Target platforms |
| enable_narrative | boolean | No | false | Enable storytelling |
| include_full_content | boolean | No | false | Include full output |
Response:
{
"status": "success",
"pipeline_version": "2.0.0",
"execution_time_ms": 1250,
"stages": {
"preprocessed": { "word_count": 500, "language": "en" },
"analysis": { "key_points_count": 5, "themes": [...], "sentiment": "positive" },
"topics": { "primary": "microservices", "titles": { "cn": "...", "en": "..." } },
"blog_cn": { "title": "...", "word_count": 1200, "reading_time": 5 },
"blog_en": { "title": "...", "word_count": 800, "reading_time": 4 }
},
"platforms": {
"medium": { "title": "...", "hashtags": [...] },
"wechat": { "title": "...", "hashtags": [...] }
}
}GET /api/v1/docsReturns API metadata and available endpoints.
When running in development mode, interactive docs are available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Default: 60 requests per minute per IP address.
Headers:
X-RateLimit-Limit: Maximum requests allowedX-RateLimit-Remaining: Remaining requestsX-RateLimit-Window: Window size in seconds
All errors follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
},
"status": "error"
}Common status codes:
400- Bad Request (invalid input)429- Rate Limit Exceeded500- Internal Server Error503- Service Unavailable