Content Generation
Operations for generating content and managing generation jobs
Creates and processes a content generation job using the enhanced wizard workflow. This endpoint is the primary content generation endpoint with comprehensive parameter support, advanced validation, and integrated file processing.
Authentication Methods Supported:
Session-based authentication (primary)
API Key authentication via x-api-key header
Key Features:
Automatic file processing from uploaded project files
Advanced subscription and usage limit validation
Comprehensive error handling and status tracking
Support for multiple content generation modes
Integration with enhanced research capabilities
Workflow Integration:
Processes uploaded project files automatically
Generates signed URLs for research integration
Handles questions/answers from project database
Supports both free trial and subscription users
API key for external service authentication.
ID of the project to generate content for
123e4567-e89b-12d3-a456-426614174000Main generation prompt describing the content to create
Write a comprehensive research paper on artificial intelligence in healthcareAuthor name for the document
Dr. Jane SmithAdditional outline instructions or structure guidance
Include introduction, methodology, results, and conclusionsWhether to include technical diagrams in the content
autoPossible values: Whether to include table of contents
autoPossible values: Whether to use web research for content enhancement
autoPossible values: Desired document length specification
15-20 pagesJSON string of follow-up questions and answers for content refinement
[{"question":"What is the main focus?","answer":"Healthcare applications"}]Comma-separated URLs for additional research sources. Note: Project files are automatically included as research sources.
https://example.com/research1,https://example.com/research2Generation mode (only 'deepwriter' available for regular users)
deepwriterPossible values: Whether to use default system configuration. Note: API key submission is no longer required as of v0.14.2
trueJob created and started successfully
Bad Request - Missing required fields or invalid parameters
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient subscription limits or no active subscription
Not Found - Project not found or no active subscription
Conflict - Another job is already in progress for this project
Internal Server Error
POST /api/generateWizardWork HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 189
{
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"prompt": "Write a comprehensive guide about artificial intelligence",
"author": "John Doe",
"email": "[email protected]",
"isDefault": true
}{
"message": "Job started successfully",
"jobId": "987fcdeb-51a2-43d7-8f9e-123456789abc"
}Processes and formats user prompts using AI to improve clarity and effectiveness.
If a projectId is provided, any files uploaded to that project will be included as signed URLs in the research URLs passed to the AI. The endpoint also increments the user's prompt generation usage if they have an active subscription.
API key for external service authentication.
The user's original prompt to enhance
Optional project ID. If provided, includes uploaded project files as research URLs.
Desired document length
0Whether to include technical diagrams
autoPossible values: Whether to use web search
autoPossible values: Whether to include table of contents
autoPossible values: URLs to use for research (string, array, or object)
Comma-separated URLs to use for research
Array of URLs to use for research
Maximum pages allowed for generation
0Prompt formatted successfully
Bad Request
Unauthorized
Internal Server Error
POST /api/formatPrompt HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 220
{
"prompt": "text",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"page_length": "0",
"use_technical_drawings": "auto",
"use_web_search": "auto",
"include_table_of_contents": "auto",
"urls_for_research": "text",
"max_pages": "0"
}{
"enhanced_prompt": "text",
"questions": [
"text"
]
}Downloads the generated content for a completed job as a PDF file
JWT token for user session authentication.
ID of the completed job
PDF file
Unauthorized
Job not found or not completed
Internal Server Error
GET /api/downloadPdf/{jobId} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binaryPreviews the generated content for a completed job as a PDF in the browser
JWT token for user session authentication.
ID of the completed job
PDF file for preview
Unauthorized
Job not found or not completed
Internal Server Error
GET /api/previewPdf/{jobId} HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary