Typeframes
    Typeframes
    • KEY
    • Create video from text
      POST
    • Create video from slides
      POST
    • Create video from url
      POST
    • Get slides
      POST
    • Create TikTok video from text
      POST

      Create TikTok video from text

      开发环境
      开发环境
      POST
      /api/public/render
      Parameters:
      text: the only required parameter. The exact text that will be broken down into slides for the video.
      speed: fast, medium or slow. Default is fast.
      audio: url of an audio file. Should be mp3. Default is "dont-blink".
      compression: low, medium or high. Default is medium.
      frameDurationMultiplier: increase this parameter to increase all the frame durations.
      resolution: default is "720p"
      width: defult is "1280". Change this to change the aspect ratio.
      height: defult is "720". Change this to change the aspect ratio.
      frameRate: default is 60.

      请求参数

      Body 参数application/json

      示例

      返回响应

      🟢200Create TikTok video from text
      application/json
      Body

      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST '/api/public/render' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "text": "this is a super cool video, introducing typeframes",
          "hasToGenerateVoice": true,
          "hasToSearchMedia": true,
          "audio": "Bladerunner 2049",
          "compression": "medium", 
          "frameDurationMultiplier": 1, 
          "resolution": "720p", 
          "width": 720, 
          "height": 1280, 
          "frameRate": 60
      }'
      响应示例响应示例
      {
          "success": 1,
          "videoUrl": "https://content.typeframes.com/renders/W0y1Vh9urBKvUs92KxaH/typeframes-W0y1Vh9urBKvUs92KxaH-1701782479647.mp4",
          "slides": [
              {
                  "text": {
                      "value": "this",
                      "size": "large",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.16,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  },
                  "video": {
                      "url": "https://typeframes.s3.amazonaws.com/uploads/7986664.mp4",
                      "fullScreen": true,
                      "left": 0,
                      "top": 0,
                      "size": "cover"
                  }
              },
              {
                  "text": {
                      "value": "is",
                      "size": "medium",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.31999999999999995,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  }
              },
              {
                  "text": {
                      "value": "a",
                      "size": "medium",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.16000000000000003,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  }
              },
              {
                  "text": {
                      "value": "super",
                      "size": "large",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.24,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  }
              },
              {
                  "text": {
                      "value": "cool",
                      "size": "large",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.3199998999999999,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  }
              },
              {
                  "text": {
                      "value": "video",
                      "size": "large",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.2400000000000002,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  }
              },
              {
                  "text": {
                      "value": "introducing",
                      "size": "medium",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  },
                  "duration": 0.5600000999999999
              },
              {
                  "text": {
                      "value": "typeframes",
                      "size": "medium",
                      "effect": {
                          "color": "#ffffff",
                          "name": "outline"
                      },
                      "font": "Open Sans"
                  },
                  "duration": 0.9399999000000001,
                  "transitions": {
                      "in": {
                          "name": "auto"
                      }
                  },
                  "video": {
                      "url": "https://typeframes.s3.amazonaws.com/uploads/4990242.mp4",
                      "fullScreen": true,
                      "left": 0,
                      "top": 0,
                      "size": "cover"
                  }
              }
          ],
          "audio": "https://content.typeframes.com/audio/bladerunner-2049.mp3",
          "colors": [
              "#469EF8"
          ],
          "compression": 18,
          "frameDurationMultiplier": 1,
          "frameRate": 60,
          "resolution": "720p",
          "fileName": "typeframes-W0y1Vh9urBKvUs92KxaH-1701782479647.mp4",
          "name": "Untitled",
          "width": 720,
          "height": 1280,
          "voiceoverAudio": "https://content.typeframes.com/uploads/362a59f2-259c-4788-a8c4-b36547b3649e.mp3",
          "backgroundMedia": [
              {
                  "url": "https://typeframes.s3.amazonaws.com/uploads/4990242.mp4",
                  "size": "cover",
                  "left": 0,
                  "top": 0,
                  "fullScreen": true,
                  "end": 0,
                  "type": "video"
              },
              {
                  "url": "https://typeframes.s3.amazonaws.com/uploads/7986664.mp4",
                  "size": "cover",
                  "left": 0,
                  "top": 0,
                  "fullScreen": true,
                  "end": 6,
                  "type": "video"
              }
          ],
          "offset": 0
      }
      修改于 2024-03-27 06:28:10
      上一页
      Get slides
      Built with