{"openapi":"3.1.0","info":{"title":"Caption402","version":"1.0.0","description":"Captions and translated subtitles (SRT/VTT) for video and audio files, paid per minute via x402 v2 (USDC on Base).","x-guidance":"Call /api/captions with url (a direct media file link) and optional translate=fr-CA,es without payment to get the exact price (402 + PAYMENT-REQUIRED header; the quote is computed from the file's duration), then retry with a signed payment. $0.05/min + $0.02/min per translation, $0.10 minimum, max 30 min. Charged only if captions are delivered. /api/captions/quote is a free price check. YouTube and other platform links are refused.","contact":{"name":"Caption402","url":"https://caption402.com","email":"abuse@caption402.com"}},"servers":[{"url":"https://caption402.com"}],"x-agentcash-guidance":{"llmsTxtUrl":"https://caption402.com/llms.txt"},"paths":{"/api/captions":{"get":{"operationId":"getCaptions","summary":"Captions and translated subtitles for a video or audio file","security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.100","max":"4.500"},"protocols":[{"x402":{}}]},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"example":"https://example.com/video.mp4","description":"Direct link to a video or audio file (mp4, mov, webm, mkv, mp3, m4a, wav, ogg...). Streaming platforms such as YouTube are not supported."},{"name":"translate","in":"query","required":false,"schema":{"type":"string"},"example":"fr-CA","description":"Optional extra subtitle languages, comma-separated (up to 5), e.g. fr-CA,es,pt-BR. +$0.02 per minute each."},{"name":"language","in":"query","required":false,"schema":{"type":"string"},"description":"Optional spoken language (2-letter code). Detected automatically when omitted."},{"name":"vocabulary","in":"query","required":false,"schema":{"type":"string"},"description":"Optional names and terms that appear in the video, to spell them right (max 400 chars)."},{"name":"include_words","in":"query","required":false,"schema":{"type":"integer","enum":[0,1]},"description":"1 = also return word-level timestamps for the spoken language."}],"responses":{"200":{"description":"Captions","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"duration_s":{"type":"number"},"minutes_billed":{"type":"integer"},"language":{"type":"string"},"language_name":{"type":"string"},"cues":{"type":"integer"},"captions":{"type":"object","additionalProperties":{"type":"object","properties":{"language_name":{"type":"string"},"srt":{"type":"string"},"vtt":{"type":"string"},"srt_url":{"type":"string"},"vtt_url":{"type":"string"}}}},"text":{"type":"string"},"files_expire_at":{"type":"string"},"processing_s":{"type":"number"},"price_paid":{"type":"string"}}},"example":{"url":"https://caption402.com/sample.mp3","duration_s":18.2,"minutes_billed":1,"language":"en","language_name":"English","cues":5,"captions":{"en":{"language_name":"English","srt":"1\n00:00:00,400 --> 00:00:02,910\nWelcome to our travel channel.\n\n2\n00:00:03,530 --> 00:00:06,930\nToday we visit Quebec City in winter.\n\n3\n00:00:07,550 --> 00:00:11,410\nThe old town is beautiful under the snow,\n\n4\n00:00:11,530 --> 00:00:14,470\nand the people are very friendly.\n\n5\n00:00:15,090 --> 00:00:20,480\nLet's go see the famous castle\nand taste some maple taffy.\n","vtt":"WEBVTT\nLanguage: en\n\n1\n00:00:00.400 --> 00:00:02.910\nWelcome to our travel channel.\n\n2\n00:00:03.530 --> 00:00:06.930\nToday we visit Quebec City in winter.\n\n3\n00:00:07.550 --> 00:00:11.410\nThe old town is beautiful under the snow,\n\n4\n00:00:11.530 --> 00:00:14.470\nand the people are very friendly.\n\n5\n00:00:15.090 --> 00:00:20.480\nLet's go see the famous castle\nand taste some maple taffy.\n","srt_url":"https://caption402.com/files/sample/en.srt","vtt_url":"https://caption402.com/files/sample/en.vtt"},"fr-CA":{"language_name":"Canadian French","srt":"1\n00:00:00,400 --> 00:00:02,910\nBienvenue sur notre chaîne de voyage.\n\n2\n00:00:03,530 --> 00:00:06,930\nAujourd'hui, on visite Québec en hiver.\n\n3\n00:00:07,550 --> 00:00:11,410\nLe Vieux-Québec est magnifique sous la neige,\n\n4\n00:00:11,530 --> 00:00:14,470\net les gens sont vraiment accueillants.\n\n5\n00:00:15,090 --> 00:00:20,480\nAllons voir le célèbre château\net goûter à la tire d'érable.\n","vtt":"WEBVTT\nLanguage: fr-CA\n\n1\n00:00:00.400 --> 00:00:02.910\nBienvenue sur notre chaîne de voyage.\n\n2\n00:00:03.530 --> 00:00:06.930\nAujourd'hui, on visite Québec en hiver.\n\n3\n00:00:07.550 --> 00:00:11.410\nLe Vieux-Québec est magnifique sous la neige,\n\n4\n00:00:11.530 --> 00:00:14.470\net les gens sont vraiment accueillants.\n\n5\n00:00:15.090 --> 00:00:20.480\nAllons voir le célèbre château\net goûter à la tire d'érable.\n","srt_url":"https://caption402.com/files/sample/fr-CA.srt","vtt_url":"https://caption402.com/files/sample/fr-CA.vtt"}},"text":"Welcome to our travel channel. Today we visit Quebec City in winter. The old town is beautiful under the snow, and the people are very friendly. Let's go see the famous castle and taste some maple taffy.","files_expire_at":"2026-10-28T12:00:00.000Z","processing_s":6.4,"price_paid":"$0.100"}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"},"403":{"description":"Platform link or blocked wallet (not charged)"},"413":{"description":"Longer than 30 minutes (not charged)"},"422":{"description":"Unreadable media or no audio (not charged)"},"429":{"description":"Rate limit (not charged)"},"503":{"description":"Busy, retry later (not charged)"}}},"post":{"operationId":"postCaptions","summary":"Captions and translated subtitles for a video or audio file","security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.100","max":"4.500"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Direct link to a video or audio file (mp4, mov, webm, mkv, mp3, m4a, wav, ogg...). Streaming platforms such as YouTube are not supported."},"translate":{"type":"array","items":{"type":"string"},"description":"Optional extra subtitle languages, comma-separated (up to 5), e.g. fr-CA,es,pt-BR. +$0.02 per minute each."},"language":{"type":"string","description":"Optional spoken language (2-letter code). Detected automatically when omitted."},"vocabulary":{"type":"string","description":"Optional names and terms that appear in the video, to spell them right (max 400 chars)."},"include_words":{"type":"integer","enum":[0,1],"description":"1 = also return word-level timestamps for the spoken language."}}},"example":{"url":"https://example.com/video.mp4","translate":["fr-CA","es"]}}}},"responses":{"200":{"description":"Captions","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"duration_s":{"type":"number"},"minutes_billed":{"type":"integer"},"language":{"type":"string"},"language_name":{"type":"string"},"cues":{"type":"integer"},"captions":{"type":"object","additionalProperties":{"type":"object","properties":{"language_name":{"type":"string"},"srt":{"type":"string"},"vtt":{"type":"string"},"srt_url":{"type":"string"},"vtt_url":{"type":"string"}}}},"text":{"type":"string"},"files_expire_at":{"type":"string"},"processing_s":{"type":"number"},"price_paid":{"type":"string"}}},"example":{"url":"https://caption402.com/sample.mp3","duration_s":18.2,"minutes_billed":1,"language":"en","language_name":"English","cues":5,"captions":{"en":{"language_name":"English","srt":"1\n00:00:00,400 --> 00:00:02,910\nWelcome to our travel channel.\n\n2\n00:00:03,530 --> 00:00:06,930\nToday we visit Quebec City in winter.\n\n3\n00:00:07,550 --> 00:00:11,410\nThe old town is beautiful under the snow,\n\n4\n00:00:11,530 --> 00:00:14,470\nand the people are very friendly.\n\n5\n00:00:15,090 --> 00:00:20,480\nLet's go see the famous castle\nand taste some maple taffy.\n","vtt":"WEBVTT\nLanguage: en\n\n1\n00:00:00.400 --> 00:00:02.910\nWelcome to our travel channel.\n\n2\n00:00:03.530 --> 00:00:06.930\nToday we visit Quebec City in winter.\n\n3\n00:00:07.550 --> 00:00:11.410\nThe old town is beautiful under the snow,\n\n4\n00:00:11.530 --> 00:00:14.470\nand the people are very friendly.\n\n5\n00:00:15.090 --> 00:00:20.480\nLet's go see the famous castle\nand taste some maple taffy.\n","srt_url":"https://caption402.com/files/sample/en.srt","vtt_url":"https://caption402.com/files/sample/en.vtt"},"fr-CA":{"language_name":"Canadian French","srt":"1\n00:00:00,400 --> 00:00:02,910\nBienvenue sur notre chaîne de voyage.\n\n2\n00:00:03,530 --> 00:00:06,930\nAujourd'hui, on visite Québec en hiver.\n\n3\n00:00:07,550 --> 00:00:11,410\nLe Vieux-Québec est magnifique sous la neige,\n\n4\n00:00:11,530 --> 00:00:14,470\net les gens sont vraiment accueillants.\n\n5\n00:00:15,090 --> 00:00:20,480\nAllons voir le célèbre château\net goûter à la tire d'érable.\n","vtt":"WEBVTT\nLanguage: fr-CA\n\n1\n00:00:00.400 --> 00:00:02.910\nBienvenue sur notre chaîne de voyage.\n\n2\n00:00:03.530 --> 00:00:06.930\nAujourd'hui, on visite Québec en hiver.\n\n3\n00:00:07.550 --> 00:00:11.410\nLe Vieux-Québec est magnifique sous la neige,\n\n4\n00:00:11.530 --> 00:00:14.470\net les gens sont vraiment accueillants.\n\n5\n00:00:15.090 --> 00:00:20.480\nAllons voir le célèbre château\net goûter à la tire d'érable.\n","srt_url":"https://caption402.com/files/sample/fr-CA.srt","vtt_url":"https://caption402.com/files/sample/fr-CA.vtt"}},"text":"Welcome to our travel channel. Today we visit Quebec City in winter. The old town is beautiful under the snow, and the people are very friendly. Let's go see the famous castle and taste some maple taffy.","files_expire_at":"2026-10-28T12:00:00.000Z","processing_s":6.4,"price_paid":"$0.100"}}}},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment Required"},"403":{"description":"Platform link or blocked wallet (not charged)"},"413":{"description":"Longer than 30 minutes (not charged)"},"422":{"description":"Unreadable media or no audio (not charged)"},"429":{"description":"Rate limit (not charged)"},"503":{"description":"Busy, retry later (not charged)"}}}},"/api/captions/quote":{"get":{"summary":"Exact price and duration for a media file (free)","security":[],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}},{"name":"translate","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Exact price and duration for a media file","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/sample/captions":{"get":{"summary":"Sample captions result (free)","security":[],"parameters":[],"responses":{"200":{"description":"Sample captions result","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/languages":{"get":{"summary":"Supported languages (free)","security":[],"parameters":[],"responses":{"200":{"description":"Supported languages","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/health":{"get":{"summary":"Service health (free)","security":[],"parameters":[],"responses":{"200":{"description":"Service health","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"summary":"Guide for agents (free)","security":[],"parameters":[],"responses":{"200":{"description":"Guide for agents","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/x402":{"get":{"summary":"x402 discovery document (free)","security":[],"parameters":[],"responses":{"200":{"description":"x402 discovery document","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}