> For the complete documentation index, see [llms.txt](https://kreadoai.gitbook.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kreadoai.gitbook.io/developers/kreadoai-mcp/mcp-types/kreadoai-mcp-and-skills-documentation.md).

# KreadoAI MCP & Skills Documentation

## 1. Quick Start

Welcome to the KreadoAI MCP & Skills Documentation! 🙌

This guide will help you quickly integrate KreadoAI's MCP services and Skills capabilities. It covers authentication, MCP architecture, API tools, usage examples, and best practices for building AI-powered workflows.

Whether you're generating marketing assets, creating digital human videos, or building AI agents, this documentation provides everything you need to get started.

👉 Submit your integration requirements here, and our team will contact you within 24 business hours: <https://tally.so/r/mJOoeK>

#### 1.1 Create an Account

Create a KreadoAI account and upgrade to a Professional Plan.

With KreadoAI's powerful AI capabilities, you can create:

* Digital human videos
* AI-generated marketing assets
* AI voiceovers
* AI image and video content
* Automated content production workflows

#### 1.2 Obtain Your API Key

After logging into your KreadoAI account, navigate to:

**Account Overview → API Settings**

to generate and manage your API credentials.

#### 1.3 Important Notes

* Temporary request failures may occur during service upgrades or maintenance periods. We recommend implementing a retry mechanism.
* Please control request concurrency appropriately. If rate limits are triggered, avoid continuous retries, as this may prolong the cooldown period.

## 2. MCP Endpoint

To access KreadoAI MCP services, all requests must be authenticated using HTTP headers.

#### MCP Configuration Example

```
{
  "mcpServers": {
    "aigc-agent-art": {
      "url": "https://api.kreadoai.com/mcp/agentart/v1/mcp",
      "headers": {
        "apiToken": "api秘钥"
      }
    }
  }
}
```

#### Supported MCP Clients

KreadoAI MCP can be integrated with:

* Cursor
* Claude
* Custom AI Agens
* Any MCP-compatible client

## 3. AI Image Generation

### Use Cases

Generate:

* Advertising creatives
* Marketing posters
* Product images
* Brand visuals
* E-commerce product listings
* Social media assets

Supports:

* Text-to-Image (T2I)
* Image-to-Image (I2I)

Reference images can be provided using:

* Image URL
* Base64-encoded image

Supported models:

* GPT Image
* Gemini
* Doubao Seedream

### MCP Tools

#### 3.1 get\_my\_user\_detail

Retrieves detailed information for the currently authenticated user.

Returns:

* Account information
* Email address
* Phone number
* Membership level
* Remaining K Coins
* Available quotas
* Registration source

Notes:

* Authentication is based on the current session context.
* `userId` cannot be provided manually.
* Accessing other users' information is not supported.

#### 3.2 submit\_ai\_image\_task

Creates an AI image generation task and returns a task ID.

Supported features:

* Text-to-Image generation
* Image-to-Image generation
* URL reference images
* Base64 reference images

#### 3.3 get\_ai\_image\_task\_detail

Retrieves task execution results.

Returns:

| Status | Description |
| ------ | ----------- |
| 1      | Pending     |
| 2      | Processing  |
| 3      | Completed   |
| 4      | Failed      |

Additional fields:

* Generated image URL
* Prompt
* Model provider

#### 3.4 resubmit\_ai\_image\_task

Recreates an image generation task using the original task parameters.

Returns a new task ID.

Only tasks owned by the current user may be regenerated.

## 4. Multi-Size Ad Creative Generation

#### Use Cases

> KreadoAI AI Ad Creative Batch Image Generation allows you to upload product images and specify a list of target sizes to generate multiple ad creatives in a single batch.
>
> It supports common advertising asset sizes for platforms such as Douyin, Kuaishou, Xiaohongshu, Facebook, Google, and TikTok.
>
> Three layout modes are supported:
>
> * **Original Image Layout**
> * **AI Smart Layout**
> * **Custom Layout**
>
> Multiple output sizes can be generated in a single request.

#### Important Notes

> * **Request rate:** Not specified.
> * **Usage limits:** See the tool-specific limitations below.

#### MCP Tools

| **Tool**                                | **Description**                                                          |
| --------------------------------------- | ------------------------------------------------------------------------ |
| `submit_ai_ad_creative_batch_image`     | Submit a batch image generation task with one or more target sizes.      |
| `get_ai_ad_creative_batch_image_detail` | Query the status and generated results of a batch image generation task. |

### `submit_ai_ad_creative_batch_image`

Submits an AI ad creative batch image generation task. Upload product images and specify one or more target sizes to generate multiple ad creative formats.

#### Parameters

| **Parameter**       | **Required** | **Type**                | **Description**                                                                                                                                                         |
| ------------------- | ------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fileUrlList`       | Yes          | `FileUrlReq[]`          | Product images. `fileName` is used as the basis for naming generated output files. Meaningful file names are recommended.                                               |
| `imageSizeList`     | Yes          | `AiBatchImageSizeReq[]` | Target output sizes. Supports **1–9 items**. Each item must exactly match a size combination listed in the size tables below. Custom size combinations are not allowed. |
| `layout`            | No           | int                     | `1` = Original Image Layout / `2` = AI Smart Layout / `3` = Custom Layout                                                                                               |
| `referenceFileList` | No           | `FileUrlReq[]`          | Reference images for the custom layout. Required only when `layout=3`.                                                                                                  |
| `dpi`               | No           | string                  | `1k` / `2k` / `4k`. Pixel dimensions must exactly match the selected resolution tier in the size tables below.                                                          |

#### File Object: `FileUrlReq`

| **Field**          | **Description**                                                    |
| ------------------ | ------------------------------------------------------------------ |
| `fileSource`       | `1` = KreadoAI File Library / `2` = Third-Party URL / `3` = Base64 |
| `fileId`           | Required when `fileSource=1`.                                      |
| `fileUrl`          | Required when `fileSource=2` or `3`.                               |
| `fileName`         | Recommended. Used as the basis for naming generated output files.  |
| `thumbnailFileUrl` | Optional.                                                          |

#### Size Object: `AiBatchImageSizeReq`

All three fields are required for each item. The `width` and `height` values must **exactly match** the size table for the selected `dpi`.

```json
{
  "width": 2432,
  "height": 380,
  "sizeRatio": "32:5"
}
```

#### Example Requests

**Product Image from the File Library**

Generate an ultra-wide landscape image and a wide landscape image at `1k` resolution using the Original Image Layout:

```json
{
  "fileUrlList": [
    {
      "fileSource": 1,
      "fileId": 123456,
      "fileName": "product-main.png"
    }
  ],
  "dpi": "1k",
  "layout": 1,
  "imageSizeList": [
    { "width": 2432, "height": 380, "sizeRatio": "32:5" },
    { "width": 1940, "height": 500, "sizeRatio": "97:25" }
  ]
}
```

**Product Image from a Third-Party URL with a Custom Layout Reference**

```json
{
  "fileUrlList": [
    {
      "fileSource": 2,
      "fileUrl": "https://cdn.example.com/product.jpg",
      "fileName": "product.jpg"
    }
  ],
  "dpi": "1k",
  "layout": 3,
  "referenceFileList": [
    {
      "fileSource": 2,
      "fileUrl": "https://cdn.example.com/layout-ref.jpg",
      "fileName": "layout-ref.jpg"
    }
  ],
  "imageSizeList": [
    { "width": 1200, "height": 1200, "sizeRatio": "1:1" },
    { "width": 1080, "height": 1920, "sizeRatio": "9:16" }
  ]
}
```

#### Important Notes

* **Maximum 9 output sizes per request.** Requests containing more than 9 sizes are rejected by the frontend and server.
* **Do not calculate pixel dimensions by scaling the aspect ratio.** The dimensions for the same `sizeRatio` are not always simple multiples across `1k`, `2k`, and `4k`. For example, `9:16` is `1080 × 1920` at `1k` and `1440 × 2560` at `2k`. Always use the exact dimensions listed in the corresponding size table.
* **`dpi` and `imageSizeList` must use the same resolution tier.** For example, when `dpi` is `2k`, you cannot submit the `1k` dimensions `1200 × 1200`.
* When `layout=3`, `referenceFileList` is required. It is not required for `layout=1` or `layout=2`.
* Do not include `createUserId`, `requestSource`, or `taskId` when submitting a task.

#### Size Tables

**Important:** The `width` and `height` values must be copied exactly from the corresponding resolution table. Do not calculate or modify them manually.

**1K**

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th><th align="right"></th><th align="right"></th></tr></thead><tbody><tr><td><strong>sizeRatio</strong></td><td><strong>Name</strong></td><td align="right"><strong>width</strong></td><td align="right"><strong>height</strong></td></tr><tr><td>1:1</td><td>Square</td><td align="right">1200</td><td align="right">1200</td></tr><tr><td>4:5</td><td>Portrait</td><td align="right">1200</td><td align="right">1500</td></tr><tr><td>5:4</td><td>Landscape</td><td align="right">1500</td><td align="right">1200</td></tr><tr><td>9:16</td><td>Portrait</td><td align="right">1080</td><td align="right">1920</td></tr><tr><td>16:9</td><td>Landscape</td><td align="right">1920</td><td align="right">1080</td></tr><tr><td>1.91:1</td><td>Landscape</td><td align="right">1200</td><td align="right">628</td></tr><tr><td>4:3</td><td>Landscape</td><td align="right">1024</td><td align="right">768</td></tr><tr><td>3:4</td><td>Portrait</td><td align="right">768</td><td align="right">1024</td></tr><tr><td>3:2</td><td>Landscape</td><td align="right">1200</td><td align="right">800</td></tr><tr><td>2:3</td><td>Portrait</td><td align="right">800</td><td align="right">1200</td></tr><tr><td>2:1</td><td>Ultra-wide Landscape</td><td align="right">1200</td><td align="right">600</td></tr><tr><td>1:2</td><td>Portrait</td><td align="right">632</td><td align="right">1264</td></tr><tr><td>6:5</td><td>Near-square</td><td align="right">1200</td><td align="right">1000</td></tr><tr><td>1:8</td><td>Extra-tall Portrait</td><td align="right">352</td><td align="right">2928</td></tr><tr><td>8:1</td><td>Ultra-wide Landscape</td><td align="right">2928</td><td align="right">352</td></tr><tr><td>1:4</td><td>Tall Portrait</td><td align="right">512</td><td align="right">2064</td></tr><tr><td>4:1</td><td>Wide Landscape</td><td align="right">2064</td><td align="right">512</td></tr><tr><td>4:15</td><td>Tall Portrait</td><td align="right">512</td><td align="right">1920</td></tr><tr><td>32:5</td><td>Ultra-wide Landscape</td><td align="right">2432</td><td align="right">380</td></tr><tr><td>97:25</td><td>Wide Landscape</td><td align="right">1940</td><td align="right">500</td></tr><tr><td>21:9</td><td>Ultra-wide Landscape</td><td align="right">1568</td><td align="right">672</td></tr><tr><td>364:45</td><td>Ultra-wide Landscape</td><td align="right">2912</td><td align="right">360</td></tr></tbody></table>

**2K**

<table data-header-hidden data-search="false"><thead><tr><th></th><th align="right"></th><th align="right"></th></tr></thead><tbody><tr><td><strong>sizeRatio</strong></td><td align="right"><strong>width</strong></td><td align="right"><strong>height</strong></td></tr><tr><td>1:1</td><td align="right">2048</td><td align="right">2048</td></tr><tr><td>4:5</td><td align="right">1800</td><td align="right">2250</td></tr><tr><td>5:4</td><td align="right">2250</td><td align="right">1800</td></tr><tr><td>9:16</td><td align="right">1440</td><td align="right">2560</td></tr><tr><td>16:9</td><td align="right">2560</td><td align="right">1440</td></tr><tr><td>1.91:1</td><td align="right">2048</td><td align="right">1072</td></tr><tr><td>4:3</td><td align="right">1920</td><td align="right">1440</td></tr><tr><td>3:4</td><td align="right">1440</td><td align="right">1920</td></tr><tr><td>3:2</td><td align="right">2400</td><td align="right">1600</td></tr><tr><td>2:3</td><td align="right">1600</td><td align="right">2400</td></tr><tr><td>2:1</td><td align="right">2400</td><td align="right">1200</td></tr><tr><td>1:2</td><td align="right">1264</td><td align="right">2528</td></tr><tr><td>6:5</td><td align="right">1800</td><td align="right">1500</td></tr><tr><td>1:8</td><td align="right">704</td><td align="right">5856</td></tr><tr><td>8:1</td><td align="right">5856</td><td align="right">704</td></tr><tr><td>1:4</td><td align="right">1024</td><td align="right">4128</td></tr><tr><td>4:1</td><td align="right">4128</td><td align="right">1024</td></tr><tr><td>4:15</td><td align="right">1024</td><td align="right">3840</td></tr><tr><td>32:5</td><td align="right">4864</td><td align="right">760</td></tr><tr><td>97:25</td><td align="right">3880</td><td align="right">1000</td></tr><tr><td>21:9</td><td align="right">3136</td><td align="right">1344</td></tr><tr><td>364:45</td><td align="right">5824</td><td align="right">720</td></tr></tbody></table>

**4k**

<table data-header-hidden data-search="false"><thead><tr><th></th><th align="right"></th><th align="right"></th></tr></thead><tbody><tr><td><strong>sizeRatio</strong></td><td align="right"><strong>width</strong></td><td align="right"><strong>height</strong></td></tr><tr><td>1:1</td><td align="right">4096</td><td align="right">4096</td></tr><tr><td>4:5</td><td align="right">3600</td><td align="right">4500</td></tr><tr><td>5:4</td><td align="right">4500</td><td align="right">3600</td></tr><tr><td>9:16</td><td align="right">2160</td><td align="right">3840</td></tr><tr><td>16:9</td><td align="right">3840</td><td align="right">2160</td></tr><tr><td>1.91:1</td><td align="right">4096</td><td align="right">2144</td></tr><tr><td>4:3</td><td align="right">3840</td><td align="right">2880</td></tr><tr><td>3:4</td><td align="right">2880</td><td align="right">3840</td></tr><tr><td>3:2</td><td align="right">4000</td><td align="right">2667</td></tr><tr><td>2:3</td><td align="right">2667</td><td align="right">4000</td></tr><tr><td>2:1</td><td align="right">4000</td><td align="right">2000</td></tr><tr><td>1:2</td><td align="right">2528</td><td align="right">5056</td></tr><tr><td>6:5</td><td align="right">3840</td><td align="right">3200</td></tr><tr><td>1:8</td><td align="right">1408</td><td align="right">11712</td></tr><tr><td>8:1</td><td align="right">11712</td><td align="right">1408</td></tr><tr><td>1:4</td><td align="right">2048</td><td align="right">8256</td></tr><tr><td>4:1</td><td align="right">8256</td><td align="right">2048</td></tr><tr><td>4:15</td><td align="right">2048</td><td align="right">7680</td></tr><tr><td>32:5</td><td align="right">9728</td><td align="right">1520</td></tr><tr><td>97:25</td><td align="right">7760</td><td align="right">2000</td></tr><tr><td>21:9</td><td align="right">6272</td><td align="right">2688</td></tr><tr><td>364:45</td><td align="right">11648</td><td align="right">1440</td></tr></tbody></table>

### `get_ai_ad_creative_batch_image_detail`

Retrieves the execution details and generated results of an AI ad creative batch image generation task.

Use the task ID returned by `submit_ai_ad_creative_batch_image` to query the task status and generated assets.

#### Response

The response includes:

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Field / Information</strong></td><td><strong>Description</strong></td></tr><tr><td><code>status</code></td><td>Task status: <code>1</code> = Pending, <code>2</code> = Processing, <code>3</code> = Success, <code>4</code> = Failed.</td></tr><tr><td>Subtask list</td><td>A list of subtasks corresponding to each product image.</td></tr><tr><td>Generated file URL</td><td>URL of each generated image.</td></tr><tr><td>Generated thumbnail URL</td><td>Thumbnail URL for each generated image.</td></tr><tr><td>Dimensions</td><td>Width and height of each generated image.</td></tr><tr><td>Model information</td><td>The model/source used to generate each asset.</td></tr></tbody></table>

When the task succeeds, the response contains the generated image files and their corresponding metadata.

## 5. Website Data Crawling (For AI Ad Generation)

### Use Cases

Crawl and analyze:

* Brand websites
* Landing pages
* E-commerce product pages

AI extracts structured product and brand information for downstream AI content generation.

Processing time:

**Typically 1–5 minutes**

### Important Notes

* Recommended polling interval: 10–15 seconds
* Maximum waiting time: 15 minutes
* Result TTL: 24 hours
* During polling, set:

```
includeContent=false
```

After task completion:

```
includeContent=true
```

Business source:

| Value | Description                  |
| ----- | ---------------------------- |
| 1     | AI Marketing Video (Default) |
| 2     | AI Advertising Image         |

### MCP Tools

#### 5.1 submit\_crawl\_task

Submits a webpage crawling task.

**Parameters**

| Parameter | Required | Description        |
| --------- | -------- | ------------------ |
| query     | Yes      | Target webpage URL |
| source    | No       | Business source    |
| sessionId | No       | Session identifier |

Returns:

```
threadId
```

#### 5.2 get\_crawl\_task\_status

Retrieves task status and crawling results.

**Parameters**

| Parameter      | Required |
| -------------- | -------- |
| threadId       | Yes      |
| includeContent | No       |

**Status**

| Value      | Description         |
| ---------- | ------------------- |
| RUNNING    | Processing          |
| SUCCESS    | Completed           |
| FAILED     | Failed              |
| NOT\_FOUND | Not Found / Expired |

**Response Fields**

* threadId
* sessionId
* status
* currentNode
* crawlId
* url
* source
* errorMsg
* content

**Content Fields**

* title
* productName
* brandName
* price
* currency
* productDescription
* productFeatures
* targetAudience
* useScenario
* imageUrls
* videoUrls
* logoUrl
* language
* location
* productLllmResult
* metaDescription
* content

## 6. AI Advertising Image Generation

### Use Cases

Generate marketing images directly from:

* Product URLs
* Product content

Supported modes:

| Mode             | Description               |
| ---------------- | ------------------------- |
| generationMode=1 | AI Creative Generation    |
| generationMode=2 | Template-Based Generation |

Customizable:

* Prompt
* Aspect ratio
* Resolution
* Logo
* Brand color

### MCP Tools

#### 6.1 submit\_url2image\_task

Creates AI advertising image generation tasks.

Returns:

```
mainTaskId
```

#### 6.2 get\_ai\_ad\_creative\_batch\_image\_detail

Retrieves task execution results and generated image URLs.

## 7. Text-to-Speech (TTS)

### Use Cases

Convert text into MP3 audio for:

* Digital human videos
* Advertising assets
* Marketing campaigns

Recommended workflow:

```
get_voice_language_list→ get_voice_list→ text_to_speech
```

### Important Notes

* Maximum 1 request per second
* Valid apiToken required
* voiceSource is required when voiceClone=0

### MCP Tools

#### 7.1 get\_voice\_language\_list

Returns supported languages.

Response:

```
List<VoiceLanguageResponseV3>
```

#### 7.2 get\_voice\_list

Returns voice models matching specified filters.

Supported providers:

| Value | Provider   |
| ----- | ---------- |
| 1     | Microsoft  |
| 3     | Alibaba    |
| 4     | ByteDance  |
| 5     | MiniMax    |
| 6     | Google     |
| 21    | ElevenLabs |

Response:

```
PageVo<VoiceInfoListResponseV3
```

#### 7.3 text\_to\_speech

Converts text into MP3 audio.

Returns:

* taskId
* audioUrl
* fileId
* duration
* paymentMoney

Response:

```
TextToSpeechResponseV3
```

***

## 8. Digital Human Video

### Use Cases

Generate lip-synced marketing videos using:

* Real-person avatars
* Photo avatars
* Cloned digital humans

Recommended workflow:

```
get_digital_human_avatar_list→ submit_system_lip_task→ get_lip_video_result
```

### MCP Tools

#### 8.1 get\_digital\_human\_avatar\_list

Returns available digital human avatars.

Response:

```
PageVo<DigitalHumanAvatarListResponseV3>
```

#### 8.2 submit\_system\_lip\_task

Creates a lip-sync generation task.

Returns:

```
LipTaskResponseV3
```

Contains:

```
jobId
```

#### 8.3 get\_lip\_video\_result

Retrieves lip-sync generation results.

Status:

| Value | Description |
| ----- | ----------- |
| 1     | Pending     |
| 2     | Processing  |
| 3     | Completed   |
| 4     | Failed      |
| 5     | Timeout     |

Response:

```
LipVideoResultResponseV3
```

## 9. AI Video Generation (Image-to-Video / Text-to-Video)

### Use Cases

Generate marketing videos using:

* Text prompts
* Images
* Multi-image references
* Multimodal references
* Video continuation

Supported model families:

* Doubao Seedance Series&#x20;
* Veo
* Sora
* Vidu
* Kling
* Happy Horse
* Wan
* MiniMax

### Workflow

```
submit_image_to_video_task→ batch_get_image_to_video_detail
```

### MCP Tools

#### 9.1 submit\_image\_to\_video\_task

Creates image-to-video or text-to-video generation tasks.

Returns:

```
VideoGenerationResponseV3
```

Includes:

* taskId
* taskIds

#### Supported Reference Modes

* none
* first-last
* reference
* multimodal-reference
* video-continuation

#### Supported Media Types

* image
* video
* audio

#### 9.2 batch\_get\_image\_to\_video\_detail

Retrieves generation results.

Status:

| Value | Description          |
| ----- | -------------------- |
| 1     | Pending / Processing |
| 2     | Success              |
| 3     | Failed               |
| 4     | Failed               |

Response:

```
List<VideoGenerationListResponseV3>
```

## 10. Subtitle & Watermark Removal

### Use Cases

Remove:

* Video subtitles
* Watermarks

Required inputs:

* Source video URL
* Subtitle coordinates
* Watermark coordinates

### MCP Tools

#### 10.1 submit\_subtitle\_removal\_task

Creates a subtitle or watermark removal task.

Returns:

```
jobId
```

#### 10.2 get\_subtitle\_removal\_result

Retrieves task results.

Status:

| Value | Description |
| ----- | ----------- |
| 1     | Pending     |
| 2     | Processing  |
| 3     | Completed   |
| 4     | Failed      |
| 5     | Timeout     |

Returns:

```
targetVideoUrl
```

## 11. Smart Canvas

This chapter covers the KreadoAI Smart Canvas MCP tools. It starts with the basic tools for managing projects and querying tasks, then introduces task-specific submission tools. **Background removal is the only supported task in this release.**

#### Use Cases

> KreadoAI Smart Canvas allows you to submit image processing tasks to the current user's canvas project and returns a `batchId` and `taskIds`.
>
> Projects can be created or listed using the basic tools. For task submission, `projectId` can also be omitted. In that case, the service automatically creates a project named using the current time in the `yyyyMMdd-HHmmss` format (Asia/Shanghai).
>
> The only supported task in this release is background removal.
>
> Task submission is asynchronous and does not wait for completion. You must call `mcp_query_canvas_task_results` to poll the task status until it reaches a terminal state.

#### Important Notes

> * **Authentication:** Authentication relies on the currently logged-in user. If the user is not logged in, the request is rejected and the canvas service is not called.
> * **Public Tool names:** All four tools use the `mcp_*` naming convention.
> * **Projects:** `mcp_create_canvas_project` and `mcp_list_canvas_projects` are shared across all task types. For background removal, `projectId` can be omitted to automatically create a project. If a non-empty but invalid or unauthorized `projectId` is provided, the request returns an error instead of creating a new project.
> * **Reuse existing projects (recommended):** If a reusable project is available—for example, a `projectId` returned by a previous submission or a project listed by `mcp_list_canvas_projects`—pass that `projectId` directly when submitting a task. Do not call `mcp_create_canvas_project` again, as each call creates a new project.
> * **Polling (required):** After any successful task submission, call `mcp_query_canvas_task_results`. Continue polling when `status` is `0`, `1`, or `2`. When `status` is `3`, read the result URL. When `status` is `4` or `5`, read `errorMsg`. Stop polling once a terminal status is reached.

#### Overview

**Choose the Right Tool**

| **Your goal**                                           | **Tool**                        | **Notes**                                                                                                         |
| ------------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Create a canvas project                                 | `mcp_create_canvas_project`     | Shared across all task types                                                                                      |
| List existing projects and retrieve a valid `projectId` | `mcp_list_canvas_projects`      | Shared across all task types                                                                                      |
| Query task progress and results                         | `mcp_query_canvas_task_results` | Shared across all submitted tasks                                                                                 |
| Batch background removal                                | `mcp_image_remove_bg`           | Available in this release. Poll for results after submission. Results are typically available within 3–5 seconds. |

**Tool Reference (4 Tools)**

| # | **Tool**                        | **Category**             | **Description**                                                        |
| - | ------------------------------- | ------------------------ | ---------------------------------------------------------------------- |
| 1 | `mcp_create_canvas_project`     | Basic                    | Create a canvas project for the current user                           |
| 2 | `mcp_list_canvas_projects`      | Basic                    | List non-deleted canvas projects for the current user, with pagination |
| 3 | `mcp_query_canvas_task_results` | Basic                    | Query task details by `batchId` and/or `taskIds`                       |
| 4 | `mcp_image_remove_bg`           | Task: Background Removal | Remove backgrounds from multiple images                                |

### Basic Tools

#### 1. `mcp_create_canvas_project`

Creates a Smart Canvas project for the current user.

**Parameters**

| **Parameter** | **Required** | **Description**                                                                                                                                                                                                                                                                                      |
| ------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | No           | Project name. After trimming, the name must not exceed 100 characters. If the name exceeds this limit, the server rejects the request without truncating it. If omitted or blank, the service uses the current time in the `yyyyMMdd-HHmmss` format (Asia/Shanghai), for example, `20260909-135152`. |

**Response**

| **Field** | **Description**                                                                                           |
| --------- | --------------------------------------------------------------------------------------------------------- |
| `id`      | ID of the newly created project. Use this value as `projectId` in subsequent task submission calls.       |
| `name`    | The name saved for the project: either the specified name or the automatically generated time-based name. |

**Example Request**

```json
{
  "name": "My Background Removal Project"
}
```

#### 2. `mcp_list_canvas_projects`

Lists all non-deleted Smart Canvas projects belonging to the current user. Use this tool to retrieve a valid `projectId`.

**Parameters**

| **Parameter** | **Required** | **Description**                                                                                                                       |
| ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | No           | Fuzzy filter by project name. If omitted, all projects are listed.                                                                    |
| `current`     | No           | Page number. Defaults to `1`. Values less than `1` are treated as `1`.                                                                |
| `size`        | No           | Number of items per page. Defaults to `50`. Values less than `1` are treated as `50`; values greater than `100` are treated as `100`. |

**Response**

| **Field** | **Description**                    |
| --------- | ---------------------------------- |
| `total`   | Total number of matching projects. |
| `current` | Actual page number returned.       |
| `size`    | Actual page size returned.         |
| `items`   | List of projects.                  |

**`items[]` Fields**

| **Field**    | **Description**                                                           |
| ------------ | ------------------------------------------------------------------------- |
| `id`         | Project ID.                                                               |
| `name`       | Project name.                                                             |
| `createTime` | Creation time, returned when available. Format: `yyyy-MM-dd HH:mm:ss`.    |
| `updateTime` | Last update time, returned when available. Format: `yyyy-MM-dd HH:mm:ss`. |

**Example Request**

```json
{
  "name": "Background Removal",
  "current": 1,
  "size": 50
}
```

#### 3. `mcp_query_canvas_task_results`

Queries task details for the current user by `batchId` and/or `taskIds`.

At least one of `batchId` or `taskIds` must be provided. If both are empty, the canvas service is not called.

**Parameters**

| **Parameter** | **Required** | **Description**                                                                                  |
| ------------- | ------------ | ------------------------------------------------------------------------------------------------ |
| `batchId`     | Conditional  | Batch ID returned by a task submission. At least one of `batchId` or `taskIds` must be provided. |
| `taskIds`     | Conditional  | List of task IDs. At least one of `batchId` or `taskIds` must be provided.                       |

**Response**

Returns an array of task details. Each item contains the following fields:

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><code>taskId</code></td><td>Task ID.</td></tr><tr><td><code>batchId</code></td><td>Batch ID.</td></tr><tr><td><code>layerId</code></td><td>System-generated layer ID. Generally not needed by callers.</td></tr><tr><td><code>parentLayerId</code></td><td>Parent layer ID. Generally not needed by callers.</td></tr><tr><td><code>taskType</code></td><td>Numeric task type. Background removal is <code>5</code>.</td></tr><tr><td><code>taskTypeValue</code></td><td>String task type. Background removal is <code>image_remove_bg</code>.</td></tr><tr><td><code>resultType</code></td><td>Result type: <code>1</code> = image, <code>2</code> = video, <code>3</code> = text. Background removal returns <code>1</code>.</td></tr><tr><td><code>resultTypeValue</code></td><td>Result type as a string. Background removal returns <code>image</code>.</td></tr><tr><td><code>status</code></td><td>Task status: <code>0</code> = Pending submission, <code>1</code> = Submitted, <code>2</code> = Processing, <code>3</code> = Success, <code>4</code> = Failed, <code>5</code> = Timed out. Statuses <code>3</code>, <code>4</code>, and <code>5</code> are terminal states. Stop polling when one of these states is reached.</td></tr><tr><td><code>errorMsg</code></td><td>Error details. Usually empty when the task succeeds.</td></tr><tr><td><code>resultFileId</code></td><td>ID of the successfully generated result file. Can be used as <code>fileId</code> in subsequent submissions together with <code>resultFileUrl</code>.</td></tr><tr><td><code>resultFileUrl</code></td><td>URL of the successfully generated result file.</td></tr><tr><td><code>resultThumbnailFileUrl</code></td><td>URL of the result thumbnail.</td></tr><tr><td><code>innerResultData</code></td><td>Extended result data map. Contents depend on the task type. Callers generally do not need to parse this field.</td></tr></tbody></table>

**Example Request**

```json
{
  "batchId": "batch-1"
}
```

### Background Removal

Removes the background from one or more images.

Supported inputs include a KreadoAI `fileId`, a KreadoAI file URL, an external URL, or image base64 data. If no `fileId` is provided, the image is uploaded to internal storage.

> * `images` must contain at least 1 and at most 50 items. If any input asset fails validation or processing, the entire batch submission is rejected.
> * When `fileId` is provided, the service resolves the file URL from the file library and does not re-upload the file. When only an HTTP(S) URL or base64 data is provided, the service uploads the image to internal storage.
> * A project is created automatically only when `projectId` is omitted or blank.

#### 4. `mcp_image_remove_bg`

Submits a batch background removal task to Smart Canvas. A single image is also submitted as a batch containing one task.

**Parameters**

| **Parameter** | **Required** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `projectId`   | No           | ID of an existing project. **Pass a reusable project ID whenever possible** to avoid creating a new project for every submission. If omitted or blank, the service automatically creates a project using the same naming rules as `mcp_create_canvas_project`, with a default name in the `yyyyMMdd-HHmmss` format. The response returns `projectCreated=true`. If a non-empty but invalid or unauthorized `projectId` is provided, the request returns an error instead of creating a new project. |
| `images`      | Yes          | List of images to process. Must contain at least 1 and at most 50 items. See the table below for the item structure.                                                                                                                                                                                                                                                                                                                                                                                |

**`images[]` Fields**

| **Field**  | **Required** | **Description**                                                                                                                                                                                                               |
| ---------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fileId`   | Conditional  | ID of a file in the KreadoAI file library (`b_file.id`). When provided, the service resolves the URL from the file library and does not re-upload the file.                                                                   |
| `imageUrl` | Conditional  | Image URL (`http`/`https`) or image base64 data. Required when `fileId` is not provided. Each item must contain at least one of `fileId` or `imageUrl`. External URLs and KreadoAI CDN URLs are uploaded to internal storage. |

**Response**

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><code>batchId</code></td><td>Batch ID used to poll task results.</td></tr><tr><td><code>taskIds</code></td><td>List of task IDs in the batch.</td></tr><tr><td><code>projectId</code></td><td>ID of the project used for the submission.</td></tr><tr><td><code>projectCreated</code></td><td>Whether a new project was created for this submission: <code>true</code> or <code>false</code>.</td></tr><tr><td><code>taskTypeValue</code></td><td>Always <code>image_remove_bg</code>.</td></tr><tr><td><code>batchTotal</code></td><td>Number of tasks in the batch.</td></tr><tr><td><code>pollHint</code></td><td>Indicates that <code>mcp_query_canvas_task_results</code> should be called to poll for results. This submission call does not wait for completion.</td></tr></tbody></table>

**Example Request (Mixing `fileId` and URL)**

```json
{
  "projectId": "proj-1",
  "images": [
    {
      "fileId": 15488077
    },
    {
      "imageUrl": "https://example.com/a.png"
    }
  ]
}
```

**Example Request (URL Only)**

```json
{
  "projectId": "proj-1",
  "images": [
    {
      "imageUrl": "https://example.com/a.png"
    }
  ]
}
```

### Common Errors

| **Issue**                                        | **How to Handle It**                                                                                |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| Both `fileId` and `imageUrl` are empty           | Each item in `images` must contain at least one of these fields.                                    |
| File not found or unauthorized `fileId`          | Use a file belonging to the current user, or provide an accessible URL instead.                     |
| `images` is empty or contains more than 50 items | Provide between 1 and 50 images per request.                                                        |
| Invalid `projectId`                              | Use a valid project ID belonging to the current user, or omit it to create a project automatically. |
| `name` exceeds 100 characters                    | Shorten the project name. The server does not truncate it.                                          |
| Both `batchId` and `taskIds` are empty           | Provide at least one of these fields.                                                               |
| Canvas service unavailable                       | Retry later. Do not submit the same task again to avoid duplicate charges.                          |

## 12. Video Quality Enhancement

#### Use Cases

> KreadoAI Video Quality Enhancement improves the clarity and visual quality of input videos and returns a task ID. After successful submission, call `get_video_enhance_detail` to poll for the result.
>
> Input videos can be provided using a system file library `fileId` or a publicly accessible third-party URL. Third-party URLs are first uploaded to internal storage. Base64-encoded videos are not supported.
>
> Enhancement types:
>
> * `enhanceType`: `1` = Standard, `2` = AI Model
> * `resolution`: `720p`, `1080p`, or `2k` (supported by both enhancement types)
> * `fps`: Integer between `15` and `120`, inclusive. Common values include `24`, `30`, `45`, `60`, and `120`.
> * `scene`: Only applicable to the Standard enhancement type. Defaults to `common` if omitted. Ignored for the AI Model enhancement type.
>
> Input videos must be between 3 seconds and 5 minutes long.

#### Important Notes

> * **Request rate limit:** You can submit a maximum of 1 task per second.

#### MCP Tool Reference

### `submit_video_enhance_task` (Submit Task)

Enhances the clarity and visual quality of an input video and returns a task ID. After submission, call `get_video_enhance_detail` to poll for the result.

#### Parameters

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Required</strong></td><td><strong>Description</strong></td></tr><tr><td><code>video</code></td><td>Yes</td><td>Input video object. See the table below for its fields.</td></tr><tr><td><code>enhanceType</code></td><td>Yes</td><td>Enhancement type: <code>1</code> = Standard, <code>2</code> = AI Model.</td></tr><tr><td><code>resolution</code></td><td>Yes</td><td>Target resolution: <code>720p</code>, <code>1080p</code>, or <code>2k</code>. Supported by both enhancement types. <code>4k</code> is rejected.</td></tr><tr><td><code>fps</code></td><td>Yes</td><td>Target frame rate. Must be an integer between <code>15</code> and <code>120</code>, inclusive. Common values include <code>24</code>, <code>30</code>, <code>45</code>, <code>60</code>, and <code>120</code>.</td></tr><tr><td><code>scene</code></td><td>No</td><td>Scene type. Only applicable to the Standard enhancement type. Defaults to <code>common</code> if omitted. Ignored for the AI Model enhancement type.</td></tr><tr><td><code>batchId</code></td><td>No</td><td>Batch UUID. Use the same value when submitting multiple videos in one batch. If omitted, the server generates one.</td></tr></tbody></table>

#### `video` Object Fields

| **Field** | **Required** | **Description**                                                                                                                                                            |
| --------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fileId`  | One of two   | ID of a file in the system file library (`b_file.id`). If both `fileId` and `url` are provided, `fileId` takes precedence.                                                 |
| `url`     | One of two   | Publicly accessible third-party video URL (`http` or `https`). The video is first uploaded to internal storage before submission. Base64-encoded videos are not supported. |

#### Validation Rules

The input video must be between 3 seconds and 5 minutes long. Requests that fall outside this range are rejected immediately and do not incur any charges.

#### Response

Returns:

| **Field** | **Description**      |
| --------- | -------------------- |
| `taskId`  | Task ID as a string. |

### `get_video_enhance_detail` (Query Task Details)

Retrieves the details and processing status of a video quality enhancement task.

#### Parameters

| **Parameter** | **Required** | **Description**                                  |
| ------------- | ------------ | ------------------------------------------------ |
| `taskId`      | Yes          | Task ID returned by `submit_video_enhance_task`. |

#### Response Fields

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><code>id</code> / <code>batchId</code></td><td>Task ID / Batch identifier.</td></tr><tr><td><code>status</code></td><td>Task status: <code>1</code> = Pending, <code>2</code> = Processing, <code>3</code> = Success, <code>4</code> = Failed.</td></tr><tr><td><code>enhanceType</code> / <code>scene</code> / <code>resolution</code> / <code>fps</code></td><td>Echoes the submitted parameters.</td></tr><tr><td><code>sourceFile</code></td><td>Input asset JSON, including <code>fileId</code>, internal URL, and thumbnail.</td></tr><tr><td><code>duration</code></td><td>Input video duration in whole seconds. Used as the billing basis.</td></tr><tr><td><code>deductAmount</code></td><td>Actual amount deducted, in K-Coins.</td></tr><tr><td><code>resultFile</code></td><td>Result asset JSON, including <code>fileId</code>, internal URL, dimensions, duration, and thumbnail. Populated when the task succeeds.</td></tr><tr><td><code>error</code></td><td>Reason for failure.</td></tr><tr><td><code>createTime</code> / <code>updateTime</code></td><td>Creation and last update timestamps.</td></tr></tbody></table>

#### Access Restrictions

You can only query your own tasks. Requests using another user's `taskId` are rejected.

## Contact Us

Need technical support or want to learn more about KreadoAI MCP?

📧 Email: <support@kreadoai.com>

🌐 Website: [www.kreadoai.com](http://www.kreadoai.com)

Our team is always available to assist with your integration and deployment needs.
