---
url: /docs/create_draft.md
description: Create a Jianying draft and return the draft_url required by later write APIs.
---

# CREATE\_DRAFT API Documentation

## 🌐 Language Switch

[中文版](/docs/create_draft.zh) | [English](/docs/create_draft)

## Interface Information

```
POST /openapi/capcut-mate/v1/create_draft
```

## Function Description

Create a Jianying draft. This interface is used to create a new Jianying draft project, allowing customization of video width and height. After successful creation, it returns the draft URL and help document URL, providing the foundation for subsequent video editing operations.

Time unit is microseconds (1s=1000000). Pass the returned draft\_url unchanged to every later write call. Do not invent a draft\_id.

## Request Parameters

```json
{
  "width": 1920,
  "height": 1080
}
```

### Parameter Description

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| width | integer | ❌ | 1920 | Video width (pixels), must be greater than or equal to 1 |
| height | integer | ❌ | 1080 | Video height (pixels), must be greater than or equal to 1 |

### Parameter Details

#### Size Parameters

* **width**: Width of the draft video
  * Minimum: 1 pixel
  * Recommended common values: 1920, 1280, 720
  * Supports custom sizes

* **height**: Height of the draft video
  * Minimum: 1 pixel
  * Recommended common values: 1080, 720, 480
  * Supports custom sizes

#### Common Resolutions

| Resolution Name | Width | Height | Application Scenario |
|-----------------|-------|--------|---------------------|
| 1080P | 1920 | 1080 | HD video production |
| 720P | 1280 | 720 | SD video production |
| 4K | 3840 | 2160 | Ultra HD video production |
| Vertical Short Video | 1080 | 1920 | Mobile short videos |
| Square | 1080 | 1080 | Social media content |

## Response Format

### Success Response (200)

```json
{
  "code": 0,
  "message": "success",
  "draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258",
  "tip_url": "https://docs.jcaigc.cn/"
}
```

### Response Field Description

| Field | Type | Description |
|-------|------|-------------|
| draft\_url | string | Newly created draft URL, used for subsequent editing operations |
| tip\_url | string | Draft usage help documentation URL |

### Error Response

```json
{
  "code": 2002,
  "message": "Draft creation failed"
}
```

## 💻 Usage Examples

### cURL Examples

#### 1. Create Draft with Default Resolution

```bash
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 2. Create Draft with Custom Resolution

```bash
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
  -H "Content-Type: application/json" \
  -d '{
    "width": 1280,
    "height": 720
  }'
```

#### 3. Create Vertical Short Video Draft

```bash
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
  -H "Content-Type: application/json" \
  -d '{
    "width": 1080,
    "height": 1920
  }'
```

## Error Code Description

| Error Code | Error Message | Description | Solution |
|------------|---------------|-------------|----------|
| 1001 | Parameter validation failed | `width`/`height` is not an integer or is less than 1 | Provide integer values greater than or equal to 1 |
| 2002 | Draft creation failed | Failed to create the draft from the template | Retry later or contact technical support |

## Notes

1. **Parameter Validation**: width and height must be positive integers
2. **Resolution Recommendation**: Suggest using common video resolutions to ensure compatibility
3. **Performance Consideration**: Ultra-high resolution may affect subsequent processing performance
4. **Storage Usage**: High-resolution drafts will occupy more storage space
5. **URL Validity**: The returned draft\_url has a certain validity period

## Workflow

1. Receive and validate request parameters
2. Create draft basic structure
3. Set canvas size
4. Generate draft URL
5. Return draft information and help document link

## Related Interfaces

* [Add Videos](/docs/add_videos)
* [Add Audios](/docs/add_audios)
* [Add Images](/docs/add_images)
* [Save Draft](/docs/save_draft)
* [Generate Video](/docs/gen_video)

***

📚 **Project Resources**\
**GitHub**: <https://github.com/Hommy-master/capcut-mate>\
**Gitee**: <https://gitee.com/taohongmin-gitee/capcut-mate>

***
