---
title: "Generate a video"
description: "Create a video in the browser or submit and poll a video API task in Apifox."
lastUpdated: 2026-10-22
---

For browser use, sign in and open [AI Creation](https://infistar.ai/create). Select a video model, describe the scene and check the displayed specifications and price before submitting.

## Use the API with Apifox

Create a key in Token Management and follow [Apifox setup](/en/client-integrations/apifox). Generation consumes account credit. Check [current models and prices](https://infistar.ai/pricing); do not repeatedly submit the same generation request.

Create a POST request to `https://infistar.ai/v1/videos`. Set `Authorization: Bearer YOUR_API_KEY` and `Content-Type: application/json`.

```json
{
  "model": "VIDEO_MODEL_ID",
  "prompt": "A wooden boat crosses a misty lake in the morning, cinematic framing.",
  "seconds": "5",
  "size": "1280x720"
}
```

Replace the model ID and choose duration and size supported by that model. Save the returned `id`.

## Poll and download

Create a GET request to `https://infistar.ai/v1/videos/TASK_ID` using the same authorization header. For `queued` or `in_progress`, wait around ten seconds before checking again. For `failed`, inspect `error`. Poll with GET; another POST creates another task and may incur another charge.

When `status` is `completed`, open `metadata.url` if provided. Otherwise request `GET /v1/videos/TASK_ID/content` with the same key and save the response using Apifox's download control.

For 401, check the key and the space after Bearer. For insufficient balance, check Wallet. For 404, check the full address and saved task ID. Keep the task ID when asking [support](/en/contact-feedback/contact-feedback) about a long-running task.
