Skip to main content
POST
Generate Content

Endpoint

Description

Manually triggers the full content generation pipeline, including strategy development, script writing, thumbnail design, SEO optimization, and production processing. The generated content is saved to the database and scheduled for publishing.

Request Body

string
The topic for the video content. If not provided, the Content Strategy Agent will automatically select a trending topic based on analytics and research.
string
The style or format for the video. Options depend on your channel configuration.Examples: "tutorial", "vlog", "review", "educational"
string
default:"medium"
Target length for the video content.Common values:
  • "short" - Short-form content (< 60 seconds)
  • "medium" - Standard content (5-15 minutes)
  • "long" - Long-form content (15+ minutes)

Response

boolean
required
Indicates whether content generation succeeded.
object
Contains the generated content details.
string
required
Unique identifier for the generated content. Use this ID with the /publish/:contentId endpoint.
string
required
The generated video title.
string
required
ISO 8601 timestamp when the content is scheduled for automatic publishing.
string
Error message if success is false.

Example Requests

Example Response

Success

Error

Response Codes

Generation Pipeline

The /generate endpoint executes the following steps:
  1. Content Strategy - Analyzes trends and generates content strategy
  2. Script Writing - Creates the video script based on the strategy
  3. Thumbnail Design - Generates an eye-catching thumbnail
  4. SEO Optimization - Optimizes title, description, tags, and metadata
  5. Production Processing - Processes all content for publishing
  6. Database Save - Stores the content and schedules automatic publishing
Content generation can take 30-90 seconds depending on the complexity and AI model response times. Consider implementing a timeout of at least 120 seconds for this endpoint.

Use Cases

Manual Content Creation

Generate content on-demand outside the automated schedule:

Batch Content Generation

Generate multiple pieces of content programmatically:

Error Handling

Common errors and their causes: