Skip to main content
POST
Generate text using AI
Generate text content using AI language models. Use the basic default, a mini, pro, or ultra built-in, or a self-hosted model name, and get results as plain text or JSON.
  • Model options: basic (default), mini, pro, and ultra built-ins, or a self-hosted model name
  • Response types: text for plain text or json for JSON-formatted output
  • generate_text() returns a string or object; some responses wrap the generated value in output. Parse JSON text when structured data is needed
  • Text generation supports wait and callback options
  • Useful for generating captions, scripts, summaries, and extracted data

Generative Media Guide

Learn about all AI generation capabilities

Text Prompts Tutorial

Master text prompting strategies for generation

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

collection_id
string
required
Example:

"default"

Body

application/json
prompt
string
required
Example:

"Summarize the content of this video"

video_id
string
Example:

"m-12345"

model_name
string
Example:

"gpt-4"

max_tokens
integer
Example:

500

temperature
number
Example:

0.7

callback_url
string
Example:

"https://webhook.example.com/callback"

Response

200 - application/json

Text generation started or completed

success
boolean
Example:

true

status
enum<string>
Available options:
processing,
done,
failed
Example:

"processing"

data
object