Skip to main content
POST
Generate text using AI

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

Provide either prompt for inline text or prompt_url for a previously uploaded prompt file.

prompt
string
required

Inline prompt text. Use for smaller prompts.

Example:

"Summarize the content of this video"

prompt_url
string

URL to a previously uploaded plain-text prompt file. Use for larger prompts.

Example:

"https://storage.googleapis.com/.../generate_text_prompt_123abc.txt"

video_id
string
Example:

"m-12345"

model_name
string

Hosted tier (mini, basic, pro, ultra) or self-hosted sandbox model name.

Example:

"Qwen/Qwen3.5-27B"

response_type
enum<string>

Desired response type.

Available options:
text,
json
Example:

"text"

sandbox_id
string

Sandbox ID to use when model_name is a self-hosted model.

Example:

"bx-123abc"

max_tokens
integer
Example:

500

temperature
number
Example:

0.7

model_config
object

Additional self-hosted model configuration.

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