> ## Documentation Index
> Fetch the complete documentation index at: https://docs.together.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Video generation parameters

> Reference for video generation parameters, including guidance scale and quality control.

A high-level overview of video generation parameters and when to use them. For parameters tied to reference images, keyframes, audio input, or video editing, see [Capability-specific parameters](#capability-specific-parameters) at the bottom.

For the complete schema, including every supported field along with its types and ranges, see the [video generation API reference](https://docs.together.ai/reference/create-videos.md).

> [!NOTE]
>
> **Available parameters vary by model:** Wan 2.7 models use `resolution` and `ratio` instead of `width` and `height`. Kling requires keyframe images via `media.frame_images` instead of a `prompt`. See the [supported models table](https://docs.together.ai/docs/inference/videos/overview.md#supported-models) for per-model coverage.

## Quick reference

Match the problem you're solving to the parameter most likely to help.

* **Video doesn't match the prompt:** Make the prompt more specific, add a `negative_prompt` for what to exclude, or raise `guidance_scale` toward `9`-`10`.
* **Output looks oversaturated or has weird motion:** Lower `guidance_scale` to `6`-`7`. Avoid values above `12`.
* **Poor visual quality:** Raise `steps` to `30`-`40` for production runs. Diminishing returns past `50`.
* **Generation is too slow or expensive while iterating:** Lower `steps` to `10` for quick previews, and shorten `seconds`.
* **Need the same video every run (evals, regression tests):** Set `seed` to a fixed integer.
* **Wrong dimensions or aspect ratio:** Set `width` and `height` explicitly. On Wan 2.7, set `resolution` and `ratio` instead.
* **Output file is too large:** Raise `output_quality` (higher number means more compression). Lower it for higher fidelity.
* **Need consistent characters or style across the video:** Pass [`media.reference_images`](https://docs.together.ai/docs/inference/videos/reference-and-keyframes).
* **Need to pin starting or ending frames:** Pass [`media.frame_images`](https://docs.together.ai/docs/inference/videos/reference-and-keyframes).
* **Need lip sync or beat-matched motion:** Pass [`media.audio_inputs`](https://docs.together.ai/docs/inference/videos/audio-input).

## Prompting

### `prompt`

A description of the video to generate. Required for every model except Kling. Maximum length is 32,000 characters.

Be specific about subject, action, setting, camera movement, and pacing. Vague prompts produce generic motion. Include verbs and temporal cues ("slowly pans", "the camera tracks left") since video models are sensitive to motion language.

Typical default: required.

### `negative_prompt`

A description of what to avoid in the generated video. Useful for excluding common artifacts.

Set it when the model produces unwanted elements (extra limbs, flickering, watermarks). A reasonable starting point: `"blurry, low quality, distorted, flickering"`.

Typical default: unset.

## Output dimensions

### `width` and `height`

The size of the generated video in pixels. Available combinations differ by model.

Typical default: `1366` x `768`.

### `resolution`

A resolution tier used by Wan 2.7 models in place of `width` and `height`. Accepts `"720P"` or `"1080P"`.

Typical default: `"1080P"`.

### `ratio`

The aspect ratio used by Wan 2.7 models. Accepts `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, or `"3:4"`.

Typical default: `"16:9"`.

## Length and frame rate

### `seconds`

Clip duration in seconds. Accepted range is `"1"` through `"10"`. Passed as a string.

Longer clips cost more and take longer to generate. Use shorter clips while iterating on prompts and parameters.

Typical default: `"6"`.

### `fps`

Frames per second. Higher values produce smoother motion at the cost of generation time and file size.

Typical default: `24` (some models accept up to `60`).

## Quality and speed

### `steps`

The number of denoising steps. More steps generally improve visual quality and temporal consistency at a near-linear cost in latency. Past a model-specific point, additional steps stop helping.

Lower it (`10`) for quick previews. Use `20` for a balanced default. Raise it (`30`-`40`) for production runs. Avoid values above `50`. Range: `10`-`50`.

Typical default: model-specific.

```python Python theme={null}
# Quick preview
job_quick = client.videos.create(
    prompt="A person walking through a forest",
    model="minimax/hailuo-02",
    steps=10,
)

# Production quality
job_production = client.videos.create(
    prompt="A person walking through a forest",
    model="minimax/hailuo-02",
    steps=40,
)
```

```typescript TypeScript theme={null}
import Together from "together-ai";

const together = new Together();

// Quick preview
const jobQuick = await together.videos.create({
  prompt: "A person walking through a forest",
  model: "minimax/hailuo-02",
  steps: 10
});

// Production quality
const jobProduction = await together.videos.create({
  prompt: "A person walking through a forest",
  model: "minimax/hailuo-02",
  steps: 40
});
```

### `guidance_scale`

Controls how closely the video follows the prompt. Higher values make the model adhere more strictly to the text description. Lower values give the model more creative freedom. Affects both visual content and temporal consistency.

Recommended range is `6.0`-`10.0`. Values above `12` may cause over-guidance artifacts or unnatural motion.

* `6.0`-`7.0`: More creative, less literal.
* `7.0`-`9.0`: Sweet spot for most use cases.
* `9.0`-`10.0`: Strict adherence to the prompt.

Typical default: model-specific.

```python Python theme={null}
from together import Together

client = Together()

# Low guidance: more creative interpretation
job_creative = client.videos.create(
    prompt="an astronaut riding a horse on the moon",
    model="minimax/hailuo-02",
    guidance_scale=6.0,
    seed=100,
)

# High guidance: closer to literal prompt
job_literal = client.videos.create(
    prompt="an astronaut riding a horse on the moon",
    model="minimax/hailuo-02",
    guidance_scale=10.0,
    seed=100,
)
```

```typescript TypeScript theme={null}
import Together from "together-ai";

const together = new Together();

// Low guidance: more creative interpretation
const jobCreative = await together.videos.create({
  prompt: "an astronaut riding a horse on the moon",
  model: "minimax/hailuo-02",
  guidance_scale: 6.0,
  seed: 100
});

// High guidance: closer to literal prompt
const jobLiteral = await together.videos.create({
  prompt: "an astronaut riding a horse on the moon",
  model: "minimax/hailuo-02",
  guidance_scale: 10.0,
  seed: 100
});
```

## Reproducibility

### `seed`

An integer that fixes the random initialization. With the same `seed`, prompt, model, and parameters, the model returns the same video. Useful for reproducibility and for fair comparisons when tuning other parameters.

Typical default: unset (each call returns a new video).

## Output format

### `output_format`

The encoded video format. Accepts `"MP4"` or `"WEBM"`. MP4 is the broadest-compatible default. WEBM produces smaller files but isn't supported by every player.

Typical default: `"MP4"`.

### `output_quality`

Compression quality. Lower values produce higher fidelity and larger files. Higher values produce smaller files with more compression artifacts.

Typical default: `20`.

## Audio

### `generate_audio`

Whether the model should generate audio for the video. Only applies to models that support audio generation.

Typical default: `false`.

## Capability-specific parameters

| Parameter | Type | Description | Default |
| - | - | - | - |
| `prompt` | string | Text description of the video to generate. | **Required** |
| `model` | string | Model identifier. | **Required** |
| `width` | integer | Video width in pixels. | 1366 |
| `height` | integer | Video height in pixels. | 768 |
| `seconds` | string | Length of video (1-10). | `"6"` |
| `fps` | integer | Frames per second. | 15-60 |
| `steps` | integer | Diffusion steps (higher = better quality, slower). | 10-50 |
| `guidance_scale` | float | How closely to follow prompt. | 6.0-10.0 |
| `seed` | integer | Random seed for reproducibility. | any |
| `output_format` | string | Video format (MP4, WEBM). | MP4 |
| `output_quality` | integer | Bitrate/quality (lower = higher quality). | 20 |
| `negative_prompt` | string | What to avoid in generation. | - |
| `resolution` | string | Video resolution tier (`720P`, `1080P`). Used by Wan 2.7 models instead of `width`/`height`. | `"1080P"` |
| `ratio` | string | Aspect ratio (`16:9`, `9:16`, `1:1`, `4:3`, `3:4`). Used by Wan 2.7 models. | `"16:9"` |
| `media` | object | Media inputs for the request (see schema and compatibility below). | - |

These parameters belong to features with their own dedicated pages. Each link below covers supported models and end-to-end examples. The [`media` object schema](#media-object-schema) lists every field.

* **`media.frame_images`:** Pin specific frames to known images ([keyframes](https://docs.together.ai/docs/inference/videos/reference-and-keyframes.md)).
* **`media.reference_images` and `media.reference_videos`:** [Keep a character, object, or visual style consistent](https://docs.together.ai/docs/inference/videos/reference-and-keyframes.md) across the video.
* **`media.audio_inputs`:** [Drive generation with an audio file](https://docs.together.ai/docs/inference/videos/audio-input.md) for lip sync, beat-matched motion, or narration.
* **`media.source_video` and `media.frame_videos`:** Edit or extend an existing clip. Only [Wan 2.7 models](https://docs.together.ai/docs/wan2.7-quickstart.md) support these fields.

> [!NOTE]
>
> Pass `frame_images` and `reference_images` inside the `media` object. The SDKs don't accept them as top-level parameters.

### `media` object schema

The `media` object holds every image, video, and audio input for a video generation request. Not every model supports every field. For field compatibility across Wan 2.7 models, see the [Wan 2.7 quickstart](https://docs.together.ai/docs/wan2.7-quickstart.md).

```json theme={null}
{
  "prompt": "...",
  "model": "...",
  "media": {
    "frame_images": [],
    "frame_videos": [],
    "reference_images": [],
    "reference_videos": [],
    "source_video": "",
    "audio_inputs": []
  }
}
```

| Field | Type | Description |
| - | - | - |
| `frame_images` | array | Keyframe images for image-to-video models. Each item has the form `{input_image, frame}`, where `frame` is `"first"`, `"last"`, or a frame number. Without `frame`, one image becomes the first frame, two become the first and last frames, and three or more are spaced evenly from first to last. |
| `frame_videos` | array | Clips for video continuation on image-to-video models. Each item has the form `{video: "url"}`. |
| `reference_images` | array | Images for character or object consistency on reference-to-video models, or for visual guidance on video editing models. |
| `reference_videos` | array | Videos for character or object consistency on reference-to-video models. Each item has the form `{video: "url"}`. |
| `source_video` | string | URL of the video to edit, for video editing models. |
| `audio_inputs` | array | Audio file URLs that drive generation, such as lip sync or beat-matched motion, on text-to-video and image-to-video models. Each item is a URL string. Files must be WAV or MP3, 3 to 30 seconds long, and up to 15 MB. |

## See also

* [Video generation overview](https://docs.together.ai/docs/inference/videos/overview.md): generate a video and poll for completion.
* [Reference images and keyframes](https://docs.together.ai/docs/inference/videos/reference-and-keyframes.md): guide visual style and pin specific frames.
* [Video audio input](https://docs.together.ai/docs/inference/videos/audio-input.md): drive generation with an audio file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.