Text

Generate text

Generate text from a prompt using a general-purpose language model. Choose a quality tier with quality (LOW, STANDARD, HIGH, or MAX). Synchronous: the response includes the generated text. Useful for drafting scripts, titles, descriptions, and other short copy before generating a video.

post/v1/text/generate

Request body

promptstring required

The instruction or content to generate text from.

systemstring nullable

Optional system instructions that steer the model's role, tone, and constraints.

quality'LOW' | 'STANDARD' | 'HIGH' | 'MAX'

AI generation quality tier, shared across every generative feature (image, video, text, and so on). LOW is fastest and cheapest, STANDARD balances quality and cost, HIGH is higher quality, and MAX is the highest quality.

When a request omits the quality field, VideoGen falls back to your account's Default AI quality for that feature, which you can change at Account settings. Not every feature supports every tier; unsupported tiers are rejected with an error (see each field's description).

temperaturenumber

Sampling temperature. Higher values produce more varied output. Defaults to the model's default.

maxOutputTokensinteger

Maximum number of tokens to generate. Defaults to 512.

Example request

{
  "prompt": "Write a 30-second upbeat video script about why the sky is blue."
}

Response

Generated text.

textstring required

The generated text.

Changes

No recorded changes to this endpoint across all 1 revision of this API.