Chuyển đến nội dung chính
POST
/
presets
Create a preset
curl --request POST \
  --url https://api.youka.io/api/v1/presets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "preset": {
    "aspectRatio": "16:9",
    "layout": {
      "type": "karaoke",
      "linesPerScreen": 2,
      "alignment": "bottom",
      "paddingHorizontal": 0,
      "paddingVertical": 5,
      "languageSpacing": 5,
      "containerHeight": 100,
      "lineTransition": "fade",
      "anticipationBuffer": 3
    },
    "background": {
      "type": "auto"
    },
    "singerTextStyles": {},
    "overlays": {
      "branding": {
        "logo": {
          "enabled": false,
          "position": "bottom-right",
          "paddingX": 20,
          "paddingY": 20,
          "scale": 0.1,
          "opacity": 1
        },
        "intro": {
          "enabled": false,
          "durationSeconds": 0,
          "effect": "fade",
          "effectDuration": 0.5
        },
        "outro": {
          "enabled": false,
          "durationSeconds": 0,
          "effect": "fade",
          "effectDuration": 0.5
        }
      },
      "titleCard": {
        "enabled": true,
        "duration": 5,
        "titleStyle": {
          "fontFamily": "Arimo",
          "fontSize": 200,
          "fontWeight": 700,
          "textColor": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 30
        },
        "artistStyle": {
          "fontFamily": "Arimo",
          "fontSize": 150,
          "fontWeight": 700,
          "textColor": "#FFFFFF",
          "outlineColor": "#000000",
          "outlineWidth": 30
        }
      },
      "leadIn": {
        "enabled": true,
        "beats": 4,
        "minGap": 3,
        "useNextSingerStyle": true,
        "style": {
          "color": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 3
        },
        "width": 0.2,
        "height": 1,
        "offsetX": -2,
        "offsetY": 0
      },
      "instrumentalBreak": {
        "hideLyrics": true,
        "minGap": 5,
        "displayDuration": 3
      },
      "breakCountdown": {
        "enabled": true,
        "maxDuration": 3,
        "animation": "fade",
        "useNextSingerStyle": false,
        "style": {
          "color": "#FFFFFF",
          "outlineColor": "#000000",
          "outlineWidth": 14.5
        },
        "textSize": 80,
        "hideBeforeEnd": 0
      },
      "breakProgressBar": {
        "enabled": true,
        "maxDuration": 10,
        "useNextSingerStyle": false,
        "style": {
          "color": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 5,
          "backgroundColor": "#FFFFFF",
          "fillColor": "#2185D0"
        },
        "width": 47,
        "height": 7.5,
        "position": "center",
        "hideBeforeEnd": 0
      }
    },
    "trim": {
      "startSeconds": 0,
      "endSeconds": 0
    },
    "languageTextStyles": {}
  },
  "isDefault": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "isDefault": true,
  "preset": {
    "aspectRatio": "16:9",
    "layout": {
      "type": "karaoke",
      "linesPerScreen": 2,
      "alignment": "bottom",
      "paddingHorizontal": 0,
      "paddingVertical": 5,
      "languageSpacing": 5,
      "containerHeight": 100,
      "lineTransition": "fade",
      "anticipationBuffer": 3
    },
    "background": {
      "type": "auto"
    },
    "singerTextStyles": {},
    "overlays": {
      "branding": {
        "logo": {
          "enabled": false,
          "position": "bottom-right",
          "paddingX": 20,
          "paddingY": 20,
          "scale": 0.1,
          "opacity": 1
        },
        "intro": {
          "enabled": false,
          "durationSeconds": 0,
          "effect": "fade",
          "effectDuration": 0.5
        },
        "outro": {
          "enabled": false,
          "durationSeconds": 0,
          "effect": "fade",
          "effectDuration": 0.5
        }
      },
      "titleCard": {
        "enabled": true,
        "duration": 5,
        "titleStyle": {
          "fontFamily": "Arimo",
          "fontSize": 200,
          "fontWeight": 700,
          "textColor": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 30
        },
        "artistStyle": {
          "fontFamily": "Arimo",
          "fontSize": 150,
          "fontWeight": 700,
          "textColor": "#FFFFFF",
          "outlineColor": "#000000",
          "outlineWidth": 30
        }
      },
      "leadIn": {
        "enabled": true,
        "beats": 4,
        "minGap": 3,
        "useNextSingerStyle": true,
        "style": {
          "color": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 3
        },
        "width": 0.2,
        "height": 1,
        "offsetX": -2,
        "offsetY": 0
      },
      "instrumentalBreak": {
        "hideLyrics": true,
        "minGap": 5,
        "displayDuration": 3
      },
      "breakCountdown": {
        "enabled": true,
        "maxDuration": 3,
        "animation": "fade",
        "useNextSingerStyle": false,
        "style": {
          "color": "#FFFFFF",
          "outlineColor": "#000000",
          "outlineWidth": 14.5
        },
        "textSize": 80,
        "hideBeforeEnd": 0
      },
      "breakProgressBar": {
        "enabled": true,
        "maxDuration": 10,
        "useNextSingerStyle": false,
        "style": {
          "color": "#2185D0",
          "outlineColor": "#000000",
          "outlineWidth": 5,
          "backgroundColor": "#FFFFFF",
          "fillColor": "#2185D0"
        },
        "width": 47,
        "height": 7.5,
        "position": "center",
        "hideBeforeEnd": 0
      }
    },
    "trim": {
      "startSeconds": 0,
      "endSeconds": 0
    },
    "languageTextStyles": {},
    "chordTextStyle": {
      "fontFamily": "Arimo",
      "fontSize": 96,
      "fontWeight": 700,
      "textColor": "#FFFFFF",
      "outlineColor": "#000000",
      "outlineWidth": 20,
      "textEffect": "karaoke",
      "activeLineColor": "#fff09a",
      "effectColor": "#2185D0",
      "backgroundColor": "transparent",
      "letterSpacing": 0,
      "lineSpacing": 1.2,
      "textCase": "none",
      "textDirection": "auto",
      "shadowColor": "rgba(0,0,0,0.5)",
      "shadowBlur": 4,
      "shadowOffsetX": 0,
      "shadowOffsetY": 0,
      "duetPosition": "center",
      "shadowOpacity": 123
    }
  },
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Tiêu đề

Idempotency-Key
string

Nội dung

application/json
name
string
bắt buộc
Required string length: 1 - 100
preset
object
bắt buộc
isDefault
boolean

Phản hồi

200 - application/json

Preset created

id
string
bắt buộc
name
string
bắt buộc
isDefault
boolean
bắt buộc
preset
object
bắt buộc
createdAt
string
bắt buộc
updatedAt
string
bắt buộc