Skip to main content
The content generation API is a separate service from the data analysis API. It handles article creation through an asynchronous pipeline.

Tasks

Tasks represent article generation jobs. You create a task with your inputs, and the pipeline runs in the background.

Create task

POST /api/v1/tasks

Start a new article generation task.
Request body:
FieldTypeRequiredDescription
user_promptstringYesArticle topic and instructions (1—1,000 characters)
keywordsarray of stringsNoTarget keywords (max 10)
reference_linksarray of stringsNoReference URLs (max 5)
uploaded_filesarrayNoUploaded file metadata (PDF, DOCX, CSV, XLSX, TXT)
min_wordsintegerNoMinimum word count (100—10,000)
max_wordsintegerNoMaximum word count (100—10,000)
Response: 202 Accepted with task_id and status pending. The generation pipeline runs in the background: web research, reference extraction, file processing, outline, drafting, and SEO optimization.

List tasks

GET /api/v1/tasks

List your generation tasks.
Query parameters:
ParamTypeDescription
statusstringFilter by status: pending, processing, completed, failed, cancelled
limitintegerResults per page (1—100)
offsetintegerPagination offset

Get task

GET /api/v1/tasks/:task_id

Get the status and details of a specific task.

Cancel task

DELETE /api/v1/tasks/:task_id

Cancel a pending or processing task.

Get task articles

GET /api/v1/tasks/:task_id/articles

Get all articles generated by a task.

Articles

Articles are the output of completed generation tasks.

List articles

GET /api/v1/articles

List your generated articles with pagination.
Query parameters:
ParamTypeDescription
publication_statusstringFilter: draft, published, or archived
pageintegerPage number
page_sizeintegerResults per page

Get article

GET /api/v1/articles/:article_id

Get the full article content and metadata.
Response includes: title, content (Markdown), slug, SEO title, SEO description, keywords, featured images, data sources, publication status, and version.

Update article

PATCH /api/v1/articles/:article_id

Update an article’s content or metadata.
Updatable fields: title, content, slug, seo_title, seo_description, keywords, publication_status (draft/published/archived). Setting the status to published records the publication timestamp.

Delete article

DELETE /api/v1/articles/:article_id

Permanently delete an article.

Task statuses

StatusMeaning
pendingTask created, waiting to start
processingPipeline is running
completedArticle generated successfully
failedAn error occurred during generation
cancelledTask was cancelled by the user

Error codes

CodeDescription
VALIDATION_ERRORInvalid input parameters
TASK_NOT_FOUNDTask ID does not exist or you don’t have access
ARTICLE_NOT_FOUNDArticle ID does not exist or you don’t have access
LLM_ERRORAI model error during generation
WORKFLOW_ERRORPipeline step failed
DATABASE_ERRORStorage error
RATE_LIMIT_ERRORToo many concurrent requests