Download YouTube video
Returns available formats and direct download URL. Responds with 200 if the result is ready immediately, or 202 with a job_id to poll if processing takes longer. Rate limited by daily tool quota.
Authorization
Bearer API key (rlay_live_* or rlay_test_*)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.relayapi.dev/v1/tools/youtube/download" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com" }'{
"platform": "string",
"title": "string",
"duration": 0,
"thumbnail": "string",
"author": "string",
"formats": [
{
"format_id": "string",
"ext": "string",
"resolution": "string",
"filesize": 0,
"url": "string"
}
],
"download_url": "string",
"success": true
}{
"job_id": "string",
"status": "processing",
"poll_url": "string"
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Found something wrong? Help us improve this page.
Download Twitter/X media POST
Returns available formats and direct download URL. Responds with 200 if the result is ready immediately, or 202 with a job_id to poll if processing takes longer. Rate limited by daily tool quota.
Poll for tool job result GET
Check the status of an async tool job (download or transcript). Returns processing, completed with result, or failed with error.