---
title: "Generate text"
method: POST
path: "/v1/text/generate"
tags: ["Text"]
---

# Generate text

`POST /v1/text/generate`

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.

## Request body

- GenerateTextRequest
  - `prompt` string, required — The instruction or content to generate text from.
  - `system` string, 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](https://app.videogen.io/settings/account). Not every feature supports every tier; unsupported tiers are rejected with an error (see each field's description).
  - `temperature` number — Sampling temperature. Higher values produce more varied output. Defaults to the model's default.
  - `maxOutputTokens` integer — Maximum number of tokens to generate. Defaults to 512.

## Response `200`

Generated text.

- GenerateTextResponse
  - `text` string, required — The generated text.

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/videogen/apis/videogen-api.md) · [All operations](https://skmtc.dev/videogen/apis/videogen-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/videogen/videogen-api/revisions/33dda0455d67/schema)
