Skip to main content
POST
YouTube Video Caption
Product: Visual Intelligence — Social Media Scraping Use case: Fetch video metadata, transcripts, captions, and comments from YouTube, Instagram, TikTok, and Twitter/X Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
This endpoint allows you to generate visual captions for a YouTube video.
Channel routing guide: see Social Media Scraping Overview. Endpoints with a channel request field let you choose apify, rapid, or memories.ai; endpoints without this field use managed routing.
Pricing: Total cost = Base fee + Input tokens fee + Output tokens fee + Duration fee
  • Base fee: Charged at actual cost (variable, depends on video processing requirements)
  • Input tokens: $0.45/1M tokens
  • Output tokens: $3.75/1M tokens
  • Video duration: $0.0001 per second
Example calculation: For a 2-second video with 42,951 input tokens and 4,134 output tokens:
  • Base: Variable (actual cost)
  • Input: 42,951 × $0.45/1M = $0.01933
  • Output: 4,134 × $3.75/1M = $0.01550
  • Duration: 2 × $0.0001 = $0.0002
  • Total (excluding base): $0.03503 + base fee
This is an asynchronous endpoint. It returns a task_id immediately. You must configure a Webhook to receive the processing results.If no webhook is configured on the account, the call is rejected at submit time with HTTP 400 and:
(No success / failed flags on this error path.)

Code Example

Response

Returns the caption task information.

Response Parameters

Callback Response Parameters

When the YouTube video caption generation is complete, a callback will be sent to your configured webhook URL.

Authorizations

Authorization
string
header
required

Body

application/json
video_url
string
required

The YouTube video URL

Example:

"https://www.youtube.com/shorts/m8sOA8MxmQE"

Response

200 - application/json

Transcription task information

code
string

Response code indicating the result status

Example:

200

msg
string

Response message describing the operation result

Example:

"success"

data
object

Response data object containing task information

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false