Call it
curl https://api.peume.com/v1/call/get-a-youtube-video-transcript \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoId": "your videoId",
"format": "json",
"refresh": false,
"accountId": "your accountId"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-a-youtube-video-transcript", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"videoId": "your videoId",
"format": "json",
"refresh": false,
"accountId": "your accountId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-a-youtube-video-transcript",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"videoId": "your videoId",
"format": "json",
"refresh": False,
"accountId": "your accountId"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: get-a-youtube-video-transcript.
Parameters
videoIdRequiredstringThe YouTube video id (the `platformPostId` on a synced external post).
languagestringBCP-47 language tag as YouTube labels the track. `en` also matches an `en-GB` track. Omit to take the best available track.
formatstring`json` returns timed `cues`; `srt` returns the raw SubRip body instead. `text` is present either way.
json · srt
Example: json
refreshbooleanRe-download from YouTube instead of serving the stored copy. Spends 200 quota units.
Example: false
accountIdRequiredstringThe connected YouTube account.
