Skip to main content

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.

Using a coding agent? Install the together-video skill to let your agent write correct video generation code automatically. See agent skills for details.

Generate a video

Video generation is asynchronous: you create a job, receive a job ID, and poll for completion.
import time
from together import Together

client = Together()

# Create a video generation job
job = client.videos.create(
    prompt="A serene sunset over the ocean with gentle waves",
    model="minimax/video-01-director",
    width=1366,
    height=768,
)

print(f"Job ID: {job.id}")

# Poll until completion
while True:
    status = client.videos.retrieve(job.id)
    print(f"Status: {status.status}")

    if status.status == "completed":
        print(f"Video URL: {status.outputs.video_url}")
        break
    elif status.status == "failed":
        print("Video generation failed")
        break

    # Wait before checking again
    time.sleep(60)
Example output when the job is complete:
{
  "id": "019a0068-794a-7213-90f6-cc4eb62e3da7",
  "model": "minimax/video-01-director",
  "status": "completed",
  "size": "1366x768",
  "seconds": "6",
  "outputs": {
    "cost": 0.28,
    "video_url": "https://api.together.ai/shrt/DwlaBdSakNRFlBxN"
  },
  "created_at": "2025-10-20T06:57:18.154804Z",
  "completed_at": "2025-10-20T07:00:12.234472Z"
}
When a job fails, the response includes an error object instead of outputs:
{
  "id": "019a0068-794a-7213-90f6-cc4eb62e3da7",
  "model": "minimax/hailuo-02",
  "status": "failed",
  "error": {
    "message": "Unsupported use of 'negativePrompt' parameter. ...",
    "code": "unsupportedParameter"
  },
  "outputs": null
}
Job status reference:
StatusDescription
queuedJob is waiting in queue.
in_progressVideo is being generated.
completedGeneration successful, video available.
failedGeneration failed, check error.message.
cancelledJob was cancelled.

Supported models

For the current list of video models, including duration, resolution, FPS, and keyframe support per model, see the serverless catalog or the dedicated endpoint model catalog.

Troubleshooting

Video doesn’t match prompt well

  • Increase guidance_scale to 8-10.
  • Make prompt more descriptive and specific.
  • Add negative_prompt to exclude unwanted elements.

Video has artifacts

  • Reduce guidance_scale (keep below 12).
  • Increase steps to 30-40.
  • Adjust fps if motion looks unnatural.

Generation is too slow

  • Reduce steps (try 10-20 for testing).
  • Use shorter seconds during development.
  • Lower fps for slower-paced scenes.

URLs expire

  • Download videos immediately after completion.
  • Don’t rely on URLs for long-term storage.

Next steps