# Krea

> Generate and enhance images and videos, run node apps, and monitor Krea jobs.

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

## Actions

### Cancel job

Cancel a job while Krea still allows it.

**Inputs**

- Job ID (`job_id`, text, required): Enter the ID of a queued or processing job.

**Outputs**

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

**Example output**

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

### Delete asset

Permanently remove an uploaded asset.

**Inputs**

- Asset (`asset_id`, text, required): Choose the asset to delete.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "message": "example",
    "success": true
  }
}
```

### Enhance image with Krea

Upscale or sharpen an image using a public image URL. Returns a job ID for checking the result.

**Inputs**

- Image URL (`image_url`, text, required): Enter a public URL of the image to enhance.
- Image scaling factor (`image_scaling_factor`, number): Set how much larger the image should be.
- Prompt (`prompt`, text): Describe details you want to preserve or enhance.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate image with Flux.1 Dev

Generate an image from a prompt or reference image. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Seed (`seed`, number): Enter a seed to repeat the same random starting point.
- Image URL (`image_url`, text): Public URL of the reference image.
- Width (`width`, number): Set the output width in pixels.
- Height (`height`, number): Set the output height in pixels.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate image with GPT Image 2

Generate or edit images with OpenAI's GPT Image 2 model. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Image URLS (`image_urls`, list): Public URLs of images to use as references.
- Resolution (`resolution`, text): Choose an output resolution. One of: `1K`, `2K`, `4K`.
- Aspect ratio (`aspect_ratio`, text): Choose the shape of the image. One of: `16:9`, `2:1`, `3:2`, `4:3`, `1:1`, `3:4`, `2:3`, `1:2`, `9:16`.
- Quality (`quality`, text): Choose image quality. One of: `low`, `medium`, `high`, `auto`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate image with Krea 3

Generate an image or edit reference images. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Image URLS (`image_urls`, list): Public URLs of images to use as references.
- Seed (`seed`, number): Enter a seed to repeat the same random starting point.
- Aspect ratio (`aspect_ratio`, text): Choose how wide or tall the image should be. One of: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`.
- Thinking mode (`thinking_mode`, text): Choose generation or editing effort. One of: `fast`, `high`.
- Resolution (`resolution`, text): Choose an output resolution. One of: `1K`, `2K`, `4K`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate image with Nano Banana 2

Generate or edit an image with Google's Nano Banana 2 model. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Image URLS (`image_urls`, list): Public URLs of images to use as references.
- Resolution (`resolution`, text): Choose an output resolution. One of: `1K`, `2K`, `4K`.
- Aspect ratio (`aspect_ratio`, text): Choose the shape of the image. One of: `4:1`, `21:9`, `1:1`, `4:3`, `3:2`, `2:3`, `5:4`, `4:5`, `3:4`, `16:9`, and 3 more.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate video with Kling 2.5

Generate a clip from a prompt and optional start and end frames. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Start image (`start_image`, text): Public URL of the first frame.
- End image (`end_image`, text): Public URL of the final frame.
- Aspect ratio (`aspect_ratio`, text): Choose the shape of the video. One of: `16:9`, `9:16`, `1:1`.
- Duration (`duration`, number): Choose a duration in seconds. One of: `5`, `10`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Generate video with Seedance 1.0 Pro Fast

Generate a clip from a prompt or a starting frame. Returns a job ID for checking the result.

**Inputs**

- Prompt (`prompt`, text, required): Describe the result you want.
- Start image (`start_image`, text): Public URL of the first frame.
- Aspect ratio (`aspect_ratio`, text): Choose the shape of the video. One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- Duration (`duration`, number): Choose the number of seconds to generate. One of: `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`.
- Resolution (`resolution`, text): Choose a video resolution. One of: `480p`, `720p`, `1080p`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Get asset

Read one uploaded asset's URL and metadata.

**Inputs**

- Asset (`asset_id`, text, required): Choose an uploaded asset.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "height": 1,
    "id": "example",
    "image_url": "example",
    "mime_type": "example",
    "uploaded_at": "example",
    "width": 1
  }
}
```

### Get job

Read the job status, generated media URLs, or failure details.

**Inputs**

- Job ID (`job_id`, text, required): Enter the job ID from a generation step or List jobs.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "error": {
      "code": "example",
      "message": "example"
    },
    "job_id": "example",
    "result": {
      "urls": [
        "example"
      ]
    },
    "status": "backlogged"
  }
}
```

### Get runnable app version

Read the inputs and outputs of one node app version.

**Inputs**

- Version ID (`version_id`, text, required): Enter the node app version ID from List runnable apps.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": "example",
    "input_openapi_schema": {},
    "name": "example",
    "node_app_version_id": "example"
  }
}
```

### Get style

Read a style's settings and preview URLs.

**Inputs**

- Style (`style_id`, text, required): Choose a style.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": "example",
    "public": true,
    "title": "example",
    "urls": [
      "example"
    ]
  }
}
```

### Get workspace usage

Read completed API jobs and costs over a UTC date range.

**Inputs**

- Start date (`start_date`, date): Choose the first day of the range.
- End date (`end_date`, date): Choose the last day of the range.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "end_date": "example",
    "jobs": [
      {}
    ],
    "start_date": "example"
  }
}
```

### List assets

List uploaded assets and their image URLs.

**Inputs**

- Limit (`limit`, number): Maximum number of records to return. From 1 to 1000.
- Cursor (`cursor`, date and time): Use the cursor returned by the previous page.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "height": 1,
        "id": "example",
        "image_url": "example",
        "mime_type": "example",
        "uploaded_at": "example",
        "width": 1
      }
    ],
    "next_cursor": "example"
  }
}
```

### List jobs

List recent Krea API jobs, optionally filtered by status.

**Inputs**

- Status (`status`, text): Filter by the current job status. One of: `backlogged`, `queued`, `scheduled`, `processing`, `sampling`, `intermediate-complete`, `completed`, `failed`, `cancelled`.
- Limit (`limit`, number): Maximum number of records to return. From 1 to 1000.
- Cursor (`cursor`, date and time): Use the cursor returned by the previous page.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "completed_at": "example",
        "created_at": "example",
        "error": {
          "code": "example",
          "message": "example"
        },
        "job_id": "example",
        "result": {
          "urls": [
            "example"
          ]
        },
        "status": "backlogged"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List runnable apps

List the node apps that this connection can run.

**Inputs**

- Limit (`limit`, number): Maximum number of records to return. From 1 to 1000.
- Cursor (`cursor`, text): Use the cursor returned by the previous page.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "id": "example",
        "input_openapi_schema": {},
        "name": "example",
        "node_app_version_id": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List styles

Find styles available to the connected workspace or in the public library.

**Inputs**

- Limit (`limit`, number): Maximum number of records to return. From 1 to 1000.
- Cursor (`cursor`, text): Use the cursor returned by the previous page.
- Filter (`filter`, text): Choose which group of styles to search. One of: `all`, `user`, `community`, `krea`, `shared`, `unapproved`, `editor`, `gallery`, `public`.
- Liked (`liked`, true/false): Show only liked styles.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "id": "example",
        "public": true,
        "title": "example",
        "urls": [
          "example"
        ]
      }
    ],
    "next_cursor": "example"
  }
}
```

### Run node app

Start a node app with inputs from its version's schema.

**Inputs**

- Version ID (`version_id`, text, required): Enter the version ID from List runnable apps.
- Inputs (`inputs`, object, required): Supply the fields required by this node app version.

**Outputs**

- `data` (list): The response from Krea.

**Example output**

```json
{
  "data": [
    {
      "completed_at": "example",
      "created_at": "example",
      "error": {
        "code": "example",
        "message": "example"
      },
      "job_id": "example",
      "result": {
        "urls": [
          "example"
        ]
      },
      "status": "backlogged"
    }
  ]
}
```

### Upload asset

Upload a file to Krea and get a URL for generation or enhancement.

**Inputs**

- File (`file`, text, required): Upload a file, choose a file from an earlier step, or enter a public file URL.
- Description (`description`, text): Give the asset a description.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "height": 1,
    "id": "example",
    "image_url": "example",
    "mime_type": "example",
    "uploaded_at": "example",
    "width": 1
  }
}
```
