curl --request POST \
--url https://api.aisa.one/v1/tasks/social.download_media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"platform": "x",
"url": "https://x.com/NASA/status/2125691860706333095"
}
}
'{
"meta": {
"approximate_fields": [
"<string>"
],
"delivered": true,
"missing_fields": {}
},
"result": {
"author": {
"display_name": "<string>",
"handle": "<string>",
"platform": "tiktok",
"url": "<string>",
"user_id": "<string>"
},
"media": [
{
"duration_seconds": 123,
"height": 123,
"thumbnail_url": "<string>",
"type": "image",
"url": "<string>",
"width": 123
}
],
"platform": "tiktok",
"post_id": "<string>",
"url": "<string>",
"extras": {}
},
"status": "found",
"task": "social.download_media",
"version": 2
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}Get media download URLs
Use when you have the URL of a public TikTok, Douyin, Kuaishou or YouTube video, of a public Instagram, X, Facebook, Threads, Bluesky, LinkedIn, Telegram (channel), Truth Social, Snapchat Spotlight, Xiaohongshu (a note) or Weibo post, of an Instagram story or highlight or of a recorded X Space and need URLs to download its media files: the video (on TikTok and Douyin with and without watermark, on Kuaishou in every quality it offers), the images, every item of a carousel or highlight, or the Space’s audio. The links are the platform’s own and expire; TikTok links last a few hours, so download soon. An X Space recording and a Bluesky video are HLS playlists (.m3u8), which an HLS client such as ffmpeg downloads. YouTube returns one file in the best quality; its link lasts one hour, and a very long or 4K video can time out, which is not charged.
curl --request POST \
--url https://api.aisa.one/v1/tasks/social.download_media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"platform": "x",
"url": "https://x.com/NASA/status/2125691860706333095"
}
}
'{
"meta": {
"approximate_fields": [
"<string>"
],
"delivered": true,
"missing_fields": {}
},
"result": {
"author": {
"display_name": "<string>",
"handle": "<string>",
"platform": "tiktok",
"url": "<string>",
"user_id": "<string>"
},
"media": [
{
"duration_seconds": 123,
"height": 123,
"thumbnail_url": "<string>",
"type": "image",
"url": "<string>",
"width": 123
}
],
"platform": "tiktok",
"post_id": "<string>",
"url": "<string>",
"extras": {}
},
"status": "found",
"task": "social.download_media",
"version": 2
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}Examples
Each request below runs as written; the request panel offers the same examples. Media of a NASA post on X{
"input": {
"platform": "x",
"url": "https://x.com/NASA/status/2125691860706333095"
}
}
{
"input": {
"platform": "youtube",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
}
}
{
"input": {
"platform": "instagram",
"url": "https://www.instagram.com/p/DgLcatkmlPq/"
}
}
{
"input": {
"platform": "weibo",
"url": "https://weibo.com/detail/5362588927919919"
}
}
Billing
| Input | Price unit | Price (USD) |
|---|---|---|
| /input/platform = bluesky | Per successful request | 0.028 |
| /input/platform = douyin | Per successful request | 0.002 |
| /input/platform = facebook | Per successful request | 0.028 |
| /input/platform = instagram | Per successful request | 0.028 |
| /input/platform = kuaishou | Per successful request | 0.004 |
| /input/platform = linkedin | Per successful request | 0.028 |
| /input/platform = snapchat | Per successful request | 0.028 |
| /input/platform = telegram | Per successful request | 0.028 |
| /input/platform = threads | Per successful request | 0.028 |
| /input/platform = tiktok | Per successful request | 0.028 |
| /input/platform = truthsocial | Per successful request | 0.056 |
| /input/platform = weibo | Per successful request | 0.002 |
| /input/platform = x | Per successful request | 0.028 |
| /input/platform = xiaohongshu | Per successful request | 0.0443 |
| /input/platform = youtube | Per successful request | 0.0108 |
X-AISA-Cost-Mode: quote; quoting neither executes the Task nor reserves funds. Execution reserves the estimated request charge and settles under the rules above. Use X-AISA-Max-Price-USD to cap the price.
Use an Idempotency-Key when executing a Task. For errors, inspect error.code, error.request_id, error.retryable and error.retry_hint. A reconciliation hint requires checking the existing request before retrying; do not assume a pending settlement is a refund.