# Pixelcut

> Edit images and videos and check your API credit balance.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/pixelcut

## Actions

### Cancel a looping video job

Cancel a looping video job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to cancel

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Cancel a video background removal job

Cancel a video background removal job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to cancel

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Cancel a virtual try-on job

Cancel a virtual try-on job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to cancel

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Create a looping video

Create a looping video.

**Inputs**

- Image URL (`image_url`, text): URL of the image to be processed.
- Image (`image`, text): Base64 encoded representation of the image to be processed.
- Prompt (`prompt`, text): Optional creative direction for the motion (e.g. what should move subtly). Directions requesting camera movement, cuts, new objects, or scene changes are ignored.
- Duration (`duration`, number): Length of the looping video in whole seconds (5-15). From 5 to 15.
- Resolution (`resolution`, text): Output resolution of the looping video. 480p costs 8 credits per second; 768p costs 16 credits per second; 1080p costs 32 credits per second. One of: `480p`, `768p`, `1080p`.
- Include audio (`include_audio`, true/false): Whether the generated MP4 keeps its audio track. When false, the audio track is stripped and the result is guaranteed to contain no audio stream. Audio does not change the price.
- Motion (`motion`, text): Motion style. One of: `subtle`, `spin`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "job_id": "example",
    "status": "pending"
  }
}
```

### Extend an image

Extend an image.

**Inputs**

- Image URL (`image_url`, text, required): URL of the image to be processed.
- Left (`left`, number): Number of pixels to extend the image in this direction (0-2000). From 0 to 2000.
- Top (`top`, number): Number of pixels to extend the image in this direction (0-2000). From 0 to 2000.
- Right (`right`, number): Number of pixels to extend the image in this direction (0-2000). From 0 to 2000.
- Bottom (`bottom`, number): Number of pixels to extend the image in this direction (0-2000). From 0 to 2000.
- Creativity (`creativity`, number): Controls the creativity of the generated content. Higher values produce more creative but potentially less coherent results. 0 means maximum coherence, 1 means maximum creativity. From 0 to 1.
- Output format (`output_format`, text): The format of the output image. Default is jpeg. One of: `jpeg`, `png`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "result_url": "example"
  }
}
```

### Fill a masked area of an image

Fill a masked area of an image.

**Inputs**

- Image URL (`image_url`, text, required): URL of the image to be processed.
- Mask URL (`mask_url`, text, required): URL of the mask. It must have the same dimensions as the input image. White pixels mark the area to process; black pixels are kept.
- Mode (`mode`, text): `fast` (5 credits): quickest results at the lowest cost. `generative` (10 credits): higher-quality fill with more realistic detail. One of: `generative`, `fast`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "result_url": "example"
  }
}
```

### Generate a virtual try-on

Generate a virtual try-on.

**Inputs**

- Person image URL (`person_image_url`, text, required): URL of the person's image.
- Garment image URL (`garment_image_url`, text, required): URL of the garment image.
- Garment mode (`garment_mode`, text): > **â ï¸ DEPRECATED**: This parameter is deprecated and will be removed in a future version. One of: `auto`, `full`, `upper`, `lower`.
- Preprocess garment (`preprocess_garment`, text): When true, the garment will be preprocessed to remove background. Defaults to true. In some cases results of model will be improved by skipping pre-processing. One of: `true`, `false`.
- Remove background (`remove_background`, text): When true, the background will be removed from the final result. Defaults to false. One of: `true`, `false`.
- Wait for result (`wait_for_result`, text): When true, the API will wait for processing to complete and return the result directly. When false, it returns a job ID for polling. One of: `true`, `false`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "job_id": "example",
    "result_url": "example"
  }
}
```

### Generate an image background

Generate an image background.

**Inputs**

- Image URL (`image_url`, text): URL of the image. If the image is RGB the background will automatically be removed, if the image is RGBA the background will not be removed and the alpha channel will be respected.
- Image transform (`image_transform`, object): Image transform.
- Scene (`scene`, text): Select a preset scene type. If provided prompt and negative_prompt will be ignored. One of: `marble`, `wood`, `industrial`, `linen`, `brick`, `counter`.
- Prompt (`prompt`, text): A description of the desired scene used to guide the image generation process.
- Negative prompt (`negative_prompt`, text): A comma seperated list of attributes which should be discouraged in the image generation.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "result_url": "example"
  }
}
```

### Get a looping video job

Get a looping video job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to check

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result_url": "example",
    "status": "pending"
  }
}
```

### Get a video background removal job

Get a video background removal job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to check

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result_url": "example",
    "status": "pending"
  }
}
```

### Get a virtual try-on job

Get a virtual try-on job.

**Inputs**

- Job ID (`job_id`, text, required): The ID of the job to check

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "error": {
      "error_code": "invalid_parameter",
      "message": "example"
    },
    "job_id": "example",
    "result_url": "example",
    "status": "pending"
  }
}
```

### Get remaining credits

Get remaining credits.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "credits_remaining": "example"
  }
}
```

### Remove a video background

Remove a video background.

**Inputs**

- Video URL (`video_url`, text, required): URL of the video to be processed. Must be a publicly accessible URL.
- Background color (`background_color`, text): The background color to use after removal. - Use "transparent" for transparent background (requires webm_vp9, mov_h265, mov_proresks, or gif output format) - Use hex code (e.g., "#000000", "#FF5733") for solid color
- Output format (`output_format`, text): Output video format with codec specification. One of: `mp4_h264` (Mp4 h264), `mp4_h265` (Mp4 h265), `webm_vp9` (Webm vp9), `mov_h265` (Mov h265), `mov_proresks` (Mov proresks), `mkv_h264` (Mkv h264), `mkv_h265` (Mkv h265), `mkv_vp9` (Mkv vp9), `gif`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "job_id": "example"
  }
}
```

### Remove an image background

Remove an image background.

**Inputs**

- Image URL (`image_url`, text, required): URL of the image to be processed.
- Format (`format`, text): The format of the resultant image. Currently, only png is supported. One of: `png`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "result_url": "example"
  }
}
```

### Upscale an image

Upscale an image.

**Inputs**

- Image URL (`image_url`, text, required): URL of the image to be processed.
- Scale (`scale`, number, required): The scale factor. One of: `2`, `4`.

**Outputs**

- `data` (object): The response from Pixelcut.

**Example output**

```json
{
  "data": {
    "result_url": "example"
  }
}
```
