Add Captions To Video

This Endpoint adds customizable captions to videos, supporting multiple formats and styles for enhanced viewer engagement and accessibility on desktop or mobile platforms.

GIFGIF
GEThttps://api.spikes.studio/add-captions

Required Parameters

  • Name
    video_url
    Type
    string
    Description
    The URL of the video for which captions are to be generated.

Optional Parameters

  • Name
    video_ratio
    Type
    string
    Description
    The format of the video, specifying either Desktop (16:9) or Mobile (9:16).
    • Default: "Mobile" (9:16)
    • Options: Desktop (16:9), Mobile (9:16)
  • Name
    font
    Type
    string
    Description
    Specifies the style of font for the captions.
    • Default: "Arial"
    • Options: "Arial", "Times New Roman", "Helvetica", "Verdana", "Georgia", "Courier New", "Roboto", "Calibri", "Garamond", "Futura"
  • Name
    font_size
    Type
    string
    Description
    The font size of the text overlay.
    • Default: "M" (Medium)
    • Options: "S" (Small), "M" (Medium), "L" (Large)
  • Name
    font_color
    Type
    string
    Description
    The color of the text overlay.
    • Default: "White"
    • Options: Any valid color value (e.g., "Red", "#FF0000", "RGB(255, 0, 0)")
  • Name
    stroke_size
    Type
    string
    Description
    The size of the stroke around the text.
    • Default: "M" (Medium)
    • Options: "S" (Small), "M" (Medium), "L" (Large)
  • Name
    stroke_color
    Type
    string
    Description
    The color of the stroke around the text.
    • Default: "Black"
    • Options: Any valid color value (e.g., "Blue", "#0000FF", "RGB(0, 0, 255)")
  • Name
    animation
    Type
    string
    Description
    Determines if the captions should appear with an animation.
    • Default: "Emerald"
    • Options: “Emerald”, ”Sunshine”, ”Karaoke”.
  • Name
    caption_position
    Type
    string
    Description
    Determines the location of the captions on the screen.
    • Default: "B" (Bottom)
    • Options: "T" (Top), "M" (Middle), "B" (Bottom)

Response

  • Name
    video_url
    Type
    string
    Description

    A URL of the video with captions.

  • Name
    video_information
    Type
    array
    Description

    An array of video information:

  • Name
    id
    Type
    string
    Description

    The unique identifier of the video.

  • Name
    video_length
    Type
    number
    Description

    The length of the video.

  • Name
    date
    Type
    timestamp
    Description

    The date the video was created.

Request

GET
https://api.spikes.studio/add-captions
https://api.spikes.studio/add-captions?video_url=https://example.com/video.mp4&video_ratio=Mobile&font=Arial&animation=Emerald&location=Bottom

Response

  {
    "video_url": "https://example.com/video-with-captions.mp4",
    "video_information": [
      {
        "id": "video123",
        "video_length": "2 minutes",
        "date": "2024-04-15"
      },
      {
        "id": "video456",
        "video_length": "5 minutes",
        "date": "2024-04-14"
      }
    ]
  }

Errors

  • Name
    400 Bad Request
    Description

    The request was malformed or missing required parameters.

  • Name
    401 Unauthorized
    Description

    The API key provided was invalid or missing.

  • Name
    404 Not Found
    Description

    The requested resource was not found.

  • Name
    500 Internal Server Error
    Description

    500 Internal Server Error

Was this page helpful?