# Vidu

> Generate media with Vidu, check task progress, and monitor available credits.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/vidu

## Actions

### Cancel task

Cancel task in Vidu.

**Inputs**

- Task (`task_id`, text, required): Task.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {}
}
```

### Generate audio

Generate audio in Vidu.

**Inputs**

- Prompt (`prompt`, text, required): Prompt.
- Duration in seconds (`duration`, number): Duration in seconds.
- Seed (`seed`, number): Seed.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Generate image

Generate image in Vidu.

**Inputs**

- Prompt (`prompt`, text, required): Describe the image to create.
- Reference image URLs (`images`, list): Reference image URLs.
- Resolution (`resolution`, text): Resolution. One of: `1080p`, `2K`, `4K`.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio. One of: `16:9`, `9:16`, `1:1`, `3:4`, `4:3`, `21:9`, `2:3`, `3:2`.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Generate video between two frames

Generate video between two frames in Vidu.

**Inputs**

- Model (`model`, text, required): Model. One of: `viduq3-pro`, `viduq3-turbo`.
- Image URLs (`images`, list, required): Add the public image URLs in the order they should appear.
- Prompt (`prompt`, text): Describe the video you want to create.
- Duration in seconds (`duration`, number): Duration in seconds. From 1 to 16.
- Resolution (`resolution`, text): Resolution. One of: `540p`, `720p`, `1080p`.
- Generate audio (`audio`, true/false): Generate audio.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Generate video from an image

Generate video from an image in Vidu.

**Inputs**

- Model (`model`, text, required): Model. One of: `viduq3-pro`, `viduq3-turbo`.
- Image URLs (`images`, list, required): Add the public image URLs in the order they should appear.
- Prompt (`prompt`, text): Describe the video you want to create.
- Duration in seconds (`duration`, number): Duration in seconds. From 1 to 16.
- Resolution (`resolution`, text): Resolution. One of: `540p`, `720p`, `1080p`.
- Generate audio (`audio`, true/false): Generate audio.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Generate video from references

Generate video from references in Vidu.

**Inputs**

- Model (`model`, text, required): Model. One of: `viduq3-pro`, `viduq3-turbo`.
- Image URLs (`images`, list, required): Add the public image URLs in the order they should appear.
- Prompt (`prompt`, text, required): Describe the video you want to create.
- Duration in seconds (`duration`, number): Duration in seconds. From 1 to 16.
- Resolution (`resolution`, text): Resolution. One of: `540p`, `720p`, `1080p`.
- Generate audio (`audio`, true/false): Generate audio.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio. One of: `16:9`, `9:16`, `3:4`, `4:3`, `1:1`.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Generate video from text

Generate video from text in Vidu.

**Inputs**

- Model (`model`, text, required): Model. One of: `viduq3-pro`, `viduq3-turbo`.
- Prompt (`prompt`, text, required): Describe the video you want to create.
- Duration in seconds (`duration`, number): Duration in seconds. From 1 to 16.
- Resolution (`resolution`, text): Resolution. One of: `540p`, `720p`, `1080p`.
- Generate audio (`audio`, true/false): Generate audio.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio. One of: `16:9`, `9:16`, `3:4`, `4:3`, `1:1`.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "credits": 1,
    "model": "example",
    "state": "example",
    "task_id": "example"
  }
}
```

### Get balance

Get balance in Vidu.

**Inputs**: None.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "packages": [],
    "remaining_credits": []
  }
}
```

### Get task

Get task in Vidu.

**Inputs**

- Task (`task_id`, text, required): Task.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "creations": [],
    "credits": 1,
    "id": "example",
    "model": "example",
    "prompt": "example",
    "state": "example"
  }
}
```

### List tasks

List tasks in Vidu.

**Inputs**

- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.
- Task states (`states`, list): Task states. One or more of: `created`, `queueing`, `processing`, `success`, `failed`.
- Page (`page`, number): Page. At least 0.
- Page size (`page_size`, number): Page size. From 1 to 100.
- Page token (`page_token`, text): Page token.

**Outputs**

- `data` (object): The Vidu response.

**Example output**

```json
{
  "data": {
    "next_page_token": "example",
    "tasks": []
  }
}
```
