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 video from slides

      开发环境
      开发环境
      POST
      /api/public/render
      Parameters:
      slides: the only required parameter. An array of slides of this format:
      {
          "text": {
              "color": {
                  "animated": true,
                  "angle": 0,
                  "from": "#fff",
                  "to": "#fff"
              },
              "size": "small",
              "value": "been",
          },
          // optional, change bg color
          "background": {
              "animated": true,
              "angle": 135,
              "from": "#FF6900",
              "to": "#E879F9",
              "type": "linear"
          },
          // optional, an image/video for this frame
          "image": {
              "url": "https://media.com",
          },
          // optional, frame transition
          // values in: none, slide-left, grow, fade-in, shrink, slide, zoom
          // values in: none, slide-left, slide-right, fade-out
          "transitions": {
              "in": {"name": "slide"},
              "out": {"name": "fade-out"}
          },
          // opt, will make the frame appear longer
          "isImportant": true,
      },
      
      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 video from text Copy
      application/json
      Body

      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST '/api/public/render' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "slides": [{"text":{"size":"large","value":"Boring user","font":"Inter"}},{"text":{"size":"medium","value":"journeys?","font":"Inter"}},{"text":{"size":"small","color":"#758696","value":"Nudge transforms","font":"Inter"},"transitions":{"in":{"name":"zoom"},"out":{"name":"fade-out"}}},{"text":{"size":"small","color":"#dddddd","align":"right","value":"into captivating","font":"Inter"},"transitions":{"in":{"name":"slide"},"out":{"name":"fade-out"}}},{"duration":0.5,"text":{"size":"medium","color":"#333333","align":"center","value":"experiences.","font":"Inter"}},{"background":{"animated":true,"angle":135,"from":"#FF6900","to":"#E879F9","type":"linear"},"text":{"color":{"animated":true,"angle":0,"from":"#fff","to":"#fff"},"size":"large","value":"Gamify,","font":"Inter"}},{"text":{"size":"medium","align":"left","value":"engage,","font":"Inter"}},{"text":{"size":"small","value":"and collect","font":"Inter"}},{"text":{"size":"medium","color":"#c8c8c8","value":"feedback effortlessly.","font":"Inter"},"transitions":{"in":{"name":"grow"},"out":{"name":"shrink"}}},{"duration":1.2,"image":{"size":"cover","url":"https://assets-global.website-files.com/64392fc35d736d7f205f3f62/6505bac745fb7fdc0a1ff58e_lightbox%20thumbnail.png","fullScreen":true},"text":{"value":"Boost adoption,","font":"Inter"}},{"duration":1.2,"image":{"size":"cover","url":"https://assets-global.website-files.com/64392fc35d736d7f205f3f62/6448f8889e63b82afe89fa68_Analytics.png","fullScreen":true},"text":{"value":"retention, and revenue.","font":"Inter"}},{"text":{"size":"large","color":"#ffff00","value":"Craft compelling","font":"Inter"},"transitions":{"in":{"name":"fade-in"},"out":{"name":"fade-out"}}},{"text":{"size":"medium","color":"#333333","value":"customer experiences","font":"Inter"},"transitions":{"in":{"name":"zoom"},"out":{"name":"fade-out"}}},{"text":{"size":"large","color":"#758696","value":"with Nudge.","font":"Inter"},"transitions":{"in":{"name":"slide"},"out":{"name":"fade-out"}}},{"text":{"size":"large","color":"#dddddd","value":"Get started","font":"Inter"},"transitions":{"in":{"name":"grow"},"out":{"name":"shrink"}}},{"duration":0.5,"text":{"size":"large","color":"#c8c8c8","value":"now!","font":"Inter"}}],
          "audio": "https://www.typeframes.com/audio/dont-blink.mp3", // optional
          "compression": "medium", // optional
          "frameDurationMultiplier": 1, // optional
          "resolution": "720p", // optional
          "frameRate": 60, //optional
          "width": 1280, //optional
          "height": 720, //optional
          "createProject": true, //optional
          "name": "Created from API" //optional
      }'
      响应示例响应示例
      {
          "success": 1,
          "videoUrl": "https://content.typeframes.com/renders/W0y1Vh9urBKvUs92KxaH/typeframes-W0y1Vh9urBKvUs92KxaH-1699365089666.mp4",
          "videoUrlNotice": "This link will expire in 7 days.",
          "slides": [
              {
                  "text": {
                      "size": "large",
                      "value": "Introducing"
                  }
              },
              {
                  "text": {
                      "color": {
                          "animated": true,
                          "angle": 0,
                          "from": "#fff",
                          "to": "#fff"
                      },
                      "size": "medium",
                      "value": "Awesome Product",
                      "font": "Inter"
                  }
              },
              {
                  "text": {
                      "value": ""
                  },
                  "image": {
                      "url": "https://typeframes.com/images/logo-full.png"
                  },
                  "transitions": {
                      "in": {
                          "name": "zoom"
                      },
                      "out": {
                          "name": "fade-out"
                      }
                  }
              },
              {
                  "text": {
                      "value": "an"
                  },
                  "transitions": {
                      "in": {
                          "name": "slide"
                      },
                      "out": {
                          "name": "fade-out"
                      }
                  }
              },
              {
                  "text": {
                      "value": "incredible text I've"
                  }
              },
              {
                  "background": {
                      "animated": true,
                      "angle": 135,
                      "from": "#FF6900",
                      "to": "#E879F9",
                      "type": "linear"
                  },
                  "text": {
                      "color": {
                          "animated": true,
                          "angle": 0,
                          "from": "#fff",
                          "to": "#fff"
                      },
                      "size": "small",
                      "value": "been"
                  }
              },
              {
                  "text": {
                      "size": "large",
                      "align": "left",
                      "value": "writing"
                  }
              }
          ],
          "audio": "https://typeframes.s3.amazonaws.com/audio/dont-blink.mp3",
          "colors": [
              "#469EF8"
          ],
          "frameDurationMultiplier": 1,
          "frameRate": 60,
          "resolution": "720p",
          "fileName": "typeframes-W0y1Vh9urBKvUs92KxaH-1696431172275.mp4"
      }
      修改于 2024-03-27 06:28:10
      上一页
      Create video from text
      下一页
      Create video from url
      Built with