Video Projects

Auto Subtitle Generator

Changed on

Automatically generate subtitles for your video in multiple languages.

post/v1/auto-subtitle-generator

Request

  • Base URL
    https://api.magichour.ai
  • URL
    https://api.magichour.ai/v1/auto-subtitle-generator
  • Auth
    HTTP bearer

Request body

namestring

Give your video a custom name for easy identification.

start_secondsnumber float required

Start time of your clip (seconds). Must be ≥ 0.

end_secondsnumber float required

End time of your clip (seconds). Must be greater than start_seconds.

Example request

{
  "name": "My Auto Subtitle video",
  "end_seconds": 5,
  "assets": {
    "video_file_path": "api-assets/id/1234.mp4"
  },
  "style": {
    "template": "karaoke",
    "custom_config": {
      "font": "Noto Sans",
      "font_size": 24,
      "font_style": "normal",
      "text_color": "#FFFFFF",
      "highlighted_text_color": "#FFD700",
      "stroke_color": "#000000",
      "stroke_width": 1,
      "vertical_position": "bottom",
      "horizontal_position": "center"
    }
  }
}

Response

Success

idstring required

Unique ID of the video. Use it with the Get video Project API to fetch status and downloads.

credits_chargedinteger required

The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.

If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Example response

{
  "id": "cuid-example",
  "credits_charged": 450
}

Changes

    • info

      added the non-success response with the status

    • info

      removed the Not Found enum value from the response property for the response status

    • info

      removed the Unauthorized enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the non-success response with the status