Content Generation

Operations for generating content and managing generation jobs

Generate content using the enhanced wizard workflow

post

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

Authorizations
x-api-keystringRequired

API key for external service authentication.

Body
projectIdstring · uuidRequired

ID of the project to generate content for

Example: 123e4567-e89b-12d3-a456-426614174000
promptstring · min: 10 · max: 10000Required

Main generation prompt describing the content to create

Example: Write a comprehensive research paper on artificial intelligence in healthcare
authorstring · min: 1 · max: 100Required

Author name for the document

Example: Dr. Jane Smith
emailstring · emailRequired

Author email address

Example: [email protected]
outline_textstring · max: 5000Optional

Additional outline instructions or structure guidance

Example: Include introduction, methodology, results, and conclusions
has_technical_diagramsstring · enumOptional

Whether to include technical diagrams in the content

Default: autoPossible values:
has_tableofcontentsstring · enumOptional

Whether to include table of contents

Default: autoPossible values:
use_web_researchstring · enumOptional

Whether to use web research for content enhancement

Default: autoPossible values:
page_lengthstringOptional

Desired document length specification

Example: 15-20 pages
questions_and_answersstringOptional

JSON string of follow-up questions and answers for content refinement

Example: [{"question":"What is the main focus?","answer":"Healthcare applications"}]
urls_for_researchstringOptional

Comma-separated URLs for additional research sources. Note: Project files are automatically included as research sources.

Example: https://example.com/research1,https://example.com/research2
modestring · enumOptional

Generation mode (only 'deepwriter' available for regular users)

Default: deepwriterPossible values:
isDefaultbooleanOptional

Whether to use default system configuration. Note: API key submission is no longer required as of v0.14.2

Default: true
Responses
200

Job created and started successfully

application/json
post
/generateWizardWork
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"
}

Format and enhance prompts

post

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.

Authorizations
x-api-keystringRequired

API key for external service authentication.

Body
promptstringRequired

The user's original prompt to enhance

projectIdstring · uuidOptional

Optional project ID. If provided, includes uploaded project files as research URLs.

page_lengthstringOptional

Desired document length

Default: 0
use_technical_drawingsstring · enumOptional

Whether to include technical diagrams

Default: autoPossible values:
use_web_searchstring · enumOptional

Whether to use web search

Default: autoPossible values:
include_table_of_contentsstring · enumOptional

Whether to include table of contents

Default: autoPossible values:
urls_for_researchone ofOptional

URLs to use for research (string, array, or object)

stringOptional

Comma-separated URLs to use for research

or
string[]Optional

Array of URLs to use for research

or
max_pagesstringOptional

Maximum pages allowed for generation

Default: 0
Responses
200

Prompt formatted successfully

application/json
post
/formatPrompt
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"
  ]
}

Download generated content as PDF

get

Downloads the generated content for a completed job as a PDF file

Authorizations
AuthorizationstringRequired

JWT token for user session authentication.

Path parameters
jobIdstring · uuidRequired

ID of the completed job

Responses
200

PDF file

application/pdf
Responsestring · binary
get
/downloadPdf/{jobId}
GET /api/downloadPdf/{jobId} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary

Preview generated content as PDF

get

Previews the generated content for a completed job as a PDF in the browser

Authorizations
AuthorizationstringRequired

JWT token for user session authentication.

Path parameters
jobIdstring · uuidRequired

ID of the completed job

Responses
200

PDF file for preview

application/pdf
Responsestring · binary
get
/previewPdf/{jobId}
GET /api/previewPdf/{jobId} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary