# PixVerse

> Generate and transform videos and images, browse effects and voices, and retrieve generation results.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/pixverse

## Actions

### Add sound effects

Add sound effects in PixVerse.

**Inputs**

- Source video ID (`source_video_id`, number): Source video ID. At least 1.
- Video media ID (`video_media_id`, number): Video media ID. At least 1.
- Original sound switch (`original_sound_switch`, true/false): Original sound switch. Default: `false`.
- Sound effect content (`sound_effect_content`, text): Sound effect content.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Expand video

Expand video in PixVerse.

**Inputs**

- Source video ID (`source_video_id`, number): Source video ID. At least 1.
- Video media ID (`video_media_id`, number): Video media ID. At least 1.
- Aspect ratio (`aspect_ratio`, text, required): Aspect ratio. One of: `16:9`, `9:16`, `21:9`, `4:3`, `3:4`, `1:1`.
- Quality (`quality`, text, required): Quality. One of: `720p`, `1080p`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": []
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Extend video

Extend video in PixVerse.

**Inputs**

- Source video ID (`source_video_id`, number): Source video ID. At least 1.
- Video media ID (`video_media_id`, number): Video media ID. At least 1.
- Model (`model`, text, required): Model. One of: `v6`.
- Prompt (`prompt`, text, required): Prompt.
- Duration (`duration`, number, required): Duration. From 1 to 15.
- Quality (`quality`, text, required): Quality. One of: `360p`, `540p`, `720p`, `1080p`.
- Seed (`seed`, number): Seed. From 0 to 2147483647.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Generate image from a template

Generate image from a template in PixVerse.

**Inputs**

- Img IDs (`img_ids`, list, required): Img IDs.
- Template (`template_id`, number, required): Template ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "image_id": 1
    }
  }
}
```

### Generate video between two frames

Generate video between two frames in PixVerse.

**Inputs**

- Model (`model`, text, required): Model. One of: `v6`, `c1`, `v5.6`, `v5`.
- Prompt (`prompt`, text, required): Prompt.
- Duration (`duration`, number, required): Duration. From 1 to 15.
- Quality (`quality`, text, required): Quality. One of: `360p`, `540p`, `720p`, `1080p`.
- First frame img (`first_frame_img`, number, required): First frame img. At least 1.
- Last frame img (`last_frame_img`, number, required): Last frame img. At least 1.
- Generate audio switch (`generate_audio_switch`, true/false): Generate audio switch.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Generate video from an image

Generate video from an image in PixVerse.

**Inputs**

- Model (`model`, text, required): Model. One of: `v6`, `c1`, `v5.6`, `v5`.
- Prompt (`prompt`, text, required): Prompt.
- Duration (`duration`, number, required): Duration. From 1 to 15.
- Quality (`quality`, text, required): Quality. One of: `360p`, `540p`, `720p`, `1080p`.
- Img id (`img_id`, number, required): Img id. At least 1.
- Generate audio switch (`generate_audio_switch`, true/false): Generate audio switch.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Generate video from references

Generate video from references in PixVerse.

**Inputs**

- Model (`model`, text, required): Model. One of: `v4.5`, `v5`, `v5.5`, `v5.6`, `v6`, `c1`.
- Prompt (`prompt`, text, required): Prompt.
- Duration (`duration`, number, required): Duration. From 0 to 15.
- Quality (`quality`, text, required): Quality. One of: `360p`, `540p`, `720p`, `1080p`.
- Seed (`seed`, number): Seed. From 0 to 2147483647.
- Aspect ratio (`aspect_ratio`, text, required): Aspect ratio. One of: `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `2:3`, `3:2`, `21:9`, `auto`.
- Image references (`image_references`, list): Image references.
- Video references (`video_references`, list): Video references.
- Reference mode (`reference_mode`, text): Reference mode. One of: `omni`.
- Generate audio switch (`generate_audio_switch`, true/false): Generate audio switch.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Generate video from text

Generate video from text in PixVerse.

**Inputs**

- Model (`model`, text, required): Model. One of: `v6-max`, `c1`, `v6`, `v3.5`, `v4`, `v4.5`, `v5`, `v5-fast`, `v5.5`, `v5.6`.
- Prompt (`prompt`, text, required): Prompt.
- Duration (`duration`, number, required): Duration. From 1 to 15.
- Quality (`quality`, text, required): Quality. One of: `360p`, `540p`, `720p`, `1080p`.
- Seed (`seed`, number): Seed. From 0 to 2147483647.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio. One of: `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `2:3`, `3:2`, `21:9`.
- Generate audio switch (`generate_audio_switch`, true/false): Generate audio switch. Default: `false`.
- Generate multi clip switch (`generate_multi_clip_switch`, true/false): Generate multi clip switch. Default: `false`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Get credit balance

Get credit balance in PixVerse.

**Inputs**: None.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "account_id": 1,
      "credit_monthly": 1,
      "credit_package": 1
    }
  }
}
```

### Get image result

Get image result in PixVerse.

**Inputs**

- Image ID (`image_id`, text, required): Image ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "create_time": "example",
      "credits": 1,
      "customer_paths": {},
      "image_id": 1,
      "modify_time": "example",
      "outputHeight": 1,
      "outputWidth": 1,
      "path": "example",
      "prompt": "example",
      "prompt_translate": "example",
      "seed": 1,
      "status": 1,
      "template_id": 1,
      "url": "example"
    }
  }
}
```

### Get video result

Get video result in PixVerse.

**Inputs**

- Video ID (`video_id`, number, required): Video ID. At least 1.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "aspect_ratio": "example",
      "create_time": "example",
      "credits": 1,
      "customer_paths": {},
      "duration": 1,
      "has_audio": false,
      "id": 1,
      "modify_time": "example",
      "negative_prompt": "example",
      "outputHeight": 1,
      "outputWidth": 1,
      "path": "example",
      "prompt": "example",
      "quality": "example",
      "resolution_ratio": 1,
      "seed": 1,
      "size": 1,
      "status": 1,
      "style": "example",
      "url": "example"
    }
  }
}
```

### List credit usage

List credit usage in PixVerse.

**Inputs**

- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- Creation type (`creation_type`, list): Creation type.
- Credits status (`credits_status`, text): Credits status. One of: `consume`, `refund`.
- Limit (`limit`, number): Limit. From 1 to 100.
- Cursor (`cursor`, text): Cursor.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "has_more": false,
      "items": [],
      "next_cursor": "example"
    }
  }
}
```

### List effect templates

List effect templates in PixVerse.

**Inputs**

- Type (`type`, text): Type. One of: `1`, `2`.
- Template IDs (`template_ids`, text): Template IDs.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. One of: `10`, `20`, `50`, `100`.
- Template mode (`template_mode`, text): Template mode.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "effect_items": []
    }
  }
}
```

### List text-to-speech speakers

List text-to-speech speakers in PixVerse.

**Inputs**

- Page num (`page_num`, number): Page num. At least 0. Default: `1`.
- Page size (`page_size`, number): Page size. One of: `0`, `10`, `20`, `50`, `100`. Default: `20`.
- Speaker type (`speaker_type`, text): Speaker type. One of: `system`, `custom`, `all`. Default: `all`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "data": [],
      "total": 1
    }
  }
}
```

### List video styles

List video styles in PixVerse.

**Inputs**

- Page num (`page_num`, number): Page num. At least 1. Default: `1`.
- Page size (`page_size`, number): Page size. At least 1. Default: `500`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "data": [],
      "total": 1
    }
  }
}
```

### Restyle video

Restyle video in PixVerse.

**Inputs**

- Source video id (`source_video_id`, number): Source video id. At least 1.
- Video media id (`video_media_id`, number): Video media id. At least 1.
- Restyle (`restyle_id`, number): Restyle id. At least 1.
- Restyle prompt (`restyle_prompt`, text): Restyle prompt.
- Seed (`seed`, number): Seed. From 0 to 2147483647.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Upload image

Upload image in PixVerse.

**Inputs**

- File (`file`, text): Choose a workflow file or enter its public link.
- Image URL (`image_url`, text): Image URL.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "img_id": 1,
      "img_url": "example"
    }
  }
}
```

### Upload video or audio

Upload video or audio in PixVerse.

**Inputs**

- File (`file`, text): Choose a workflow file or enter its public link.
- File URL (`file_url`, text): File URL.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "height": 1,
      "media_id": 1,
      "media_type": "example",
      "url": "example",
      "width": 1
    }
  }
}
```

### Upscale video

Upscale video in PixVerse.

**Inputs**

- Source video ID (`source_video_id`, number): Source video ID. At least 1.
- Video media ID (`video_media_id`, number): Video media ID. At least 1.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {
      "credits": 1,
      "video_id": 1
    }
  }
}
```

### Verify uploaded audio

Verify uploaded audio in PixVerse.

**Inputs**

- Audio media ID (`audio_media_id`, number, required): Audio media ID. At least 1.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "ErrCode": 1,
    "ErrMsg": "example",
    "Error": {
      "Message": "example",
      "Param": {
        "AllowedValues": [],
        "Fields": [],
        "Moderation": {
          "LabelName": "example"
        },
        "RequiredCount": 1,
        "RequiredField": "example"
      },
      "Type": "example"
    },
    "Resp": {}
  }
}
```
