CapCutAPI
  1. text
CapCutAPI
  • Quick Start!
  • How to get CapCut draft folder?
  • Preview Draft Online
  • Get Your API Key
  • text
    • ArtistEffectText
    • get_text_intro_types
      GET
    • get_text_outro_types
      GET
    • get_text_loop_anim_types
      GET
    • get_font_types
      GET
    • add_text
      POST
    • add_subtitle
      POST
    • search_artist
      POST
  • image
    • get_intro_animation_types
      GET
    • get_outro_animation_types
      GET
    • get_combo_animation_types
      GET
    • add_image
      POST
  • video
    • add_video
      POST
  • transition
    • get_transition_types
      GET
  • audio
    • get_audio_effect_types
      GET
    • add_audio
      POST
  • keyframes
    • add_video_keyframe
      POST
  • effect
    • get_video_scene_effect_types
      GET
    • get_video_character_effect_types
      GET
    • add_effect
      POST
  • create_draft
    POST
  • save_draft
    POST
  • get_duration
    POST
  1. text

add_text

POST
/add_text
add text

Request

Header Params

Body Params application/json

Example
{
    "text": "Hello",  // Text content (required, core display content)
    "start": 0,  // The start time of the text on the timeline (in seconds, required)
    "end": 5,  // The end time of the text on the timeline (in seconds, required)
    "draft_id": "your_draft_id",  // Draft ID (optional, used for associated operation drafts)
    "transform_y": 0,  // Y-axis transformation parameter (optional, default 0)
    "transform_x": 0,  // X-axis transformation parameter (optional, default 0)
    "font": "Poppins_Bold",  // Font (optional, default "System")
    "font_color": "#FF0000",  // Font color (optional, default red #FF0000)
    "font_size": 8.0,  // Font size (optional, default 8.0)
    "track_name": "text_main",  // Track name (optional, default "text_main")
    "vertical": false,  // Whether to display vertically (optional, default false)
    "font_alpha": 1.0,  // Font transparency (optional, default 1.0, range 0.0-1.0)
    "fixed_width": -1,  // Fixed width (optional, default -1, -1 means not fixed)
    "fixed_height": -1,  // Fixed height (optional, default -1, -1 means not fixed)
    // Stroke parameters
    "border_alpha": 1.0,  // Stroke transparency (optional, default 1.0)
    "border_color": "#000000",  // Stroke color (optional, default black #000000)
    "border_width": 0.0,  // Stroke width (optional, default 0.0)
    // Background parameters
    "background_color": "#000000",  // Background color (optional, default black #000000)
    "background_style": 0,  // Background style (optional, default 0, needs to match the style enumeration supported by the business)
    "background_alpha": 0.0,  // Background transparency (optional, default 0.0)
    // Intro animation
    "intro_animation": "Fade_In",  // Intro animation type (optional, e.g., "fly in from above" etc.)
    "intro_duration": 0.5,  // Intro animation duration (in seconds, optional, default 0.5)
    // Outro animation
    "outro_animation": "Dissolve_Up",  // Outro animation type (optional, e.g., "slide down" fade out etc.)
    "outro_duration": 0.5,  // Outro animation duration (in seconds, optional, default 0.5)
    "width": 1080,  // Canvas width (optional, default 1080)
    "height": 1920,  // Canvas height (optional, default 1920)
    "text_styles": [
        {
            "start": 0, // Start character position, inclusive
            "end": 2,  // End character position, exclusive
            "style": {
                "size": 50.0,
                "bold": true,
                "italic": true,
                "underline": true,
                "color": "#00FF00"
            },
            "border": {
                "alpha": 1,
                "color": "#FFFFFF",
                "width": 40
            },
            "font": "Roboto_BlkCn"
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.capcutapi.top/cut_capcut/add_text' \
--header 'Authorization: Bearer your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "Hello",  // Text content (required, core display content)
    "start": 0,  // The start time of the text on the timeline (in seconds, required)
    "end": 5,  // The end time of the text on the timeline (in seconds, required)
    "draft_id": "your_draft_id",  // Draft ID (optional, used for associated operation drafts)
    "transform_y": 0,  // Y-axis transformation parameter (optional, default 0)
    "transform_x": 0,  // X-axis transformation parameter (optional, default 0)
    "font": "Poppins_Bold",  // Font (optional, default "System")
    "font_color": "#FF0000",  // Font color (optional, default red #FF0000)
    "font_size": 8.0,  // Font size (optional, default 8.0)
    "track_name": "text_main",  // Track name (optional, default "text_main")
    "vertical": false,  // Whether to display vertically (optional, default false)
    "font_alpha": 1.0,  // Font transparency (optional, default 1.0, range 0.0-1.0)
    "fixed_width": -1,  // Fixed width (optional, default -1, -1 means not fixed)
    "fixed_height": -1,  // Fixed height (optional, default -1, -1 means not fixed)
    // Stroke parameters
    "border_alpha": 1.0,  // Stroke transparency (optional, default 1.0)
    "border_color": "#000000",  // Stroke color (optional, default black #000000)
    "border_width": 0.0,  // Stroke width (optional, default 0.0)
    // Background parameters
    "background_color": "#000000",  // Background color (optional, default black #000000)
    "background_style": 0,  // Background style (optional, default 0, needs to match the style enumeration supported by the business)
    "background_alpha": 0.0,  // Background transparency (optional, default 0.0)
    // Intro animation
    "intro_animation": "Fade_In",  // Intro animation type (optional, e.g., "fly in from above" etc.)
    "intro_duration": 0.5,  // Intro animation duration (in seconds, optional, default 0.5)
    // Outro animation
    "outro_animation": "Dissolve_Up",  // Outro animation type (optional, e.g., "slide down" fade out etc.)
    "outro_duration": 0.5,  // Outro animation duration (in seconds, optional, default 0.5)
    "width": 1080,  // Canvas width (optional, default 1080)
    "height": 1920,  // Canvas height (optional, default 1920)
    "text_styles": [
        {
            "start": 0, // Start character position, inclusive
            "end": 2,  // End character position, exclusive
            "style": {
                "size": 50.0,
                "bold": true,
                "italic": true,
                "underline": true,
                "color": "#00FF00"
            },
            "border": {
                "alpha": 1,
                "color": "#FFFFFF",
                "width": 40
            },
            "font": "Roboto_BlkCn"
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "error": "",
    "output": {
        "draft_id": "dfd_cat_1753778244_796f6ce1",
        "draft_url": "https://www.install-ai-guider.top/draft/downloader?draft_id=dfd_cat_1753778244_796f6ce1"
    },
    "purchase_link": "https://www.coze.cn/store/project/7498257920212647946?entity_id=1&bid=6g6miqtbk3009",
    "success": true
}
Modified at 2025-09-02 03:01:59
Previous
get_font_types
Next
add_subtitle
Built with