Skip to main content
POST
/
x
/
media
/
download
Download media
curl --request POST \
  --url https://xquik.com/api/v1/x/media/download \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "tweetInput": "<string>",
  "tweetId": "<string>",
  "tweetUrl": "<string>",
  "tweetIds": [
    "<string>"
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.xquik.com/llms.txt

Use this file to discover all available pages before exploring further.

1 credit per fresh tweet processed with media · cache hits are free · All plans from $0.00012/credit
curl -X POST https://xquik.com/api/v1/x/media/download \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "tweetInput": "1893456789012345678"
  }' | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported.
Content-Type
string
required
Must be application/json.

Body

Use tweetIds for bulk downloads. If tweetIds is present with at least 1 string value, the route uses bulk mode and ignores single-tweet fields. Otherwise, use tweetInput, tweetId, or tweetUrl for a single tweet.
tweetInput
string
Tweet URL or numeric tweet ID for a single download. Accepts x.com and twitter.com URL formats.
tweetId
string
Numeric tweet ID alias for tweetInput. Used when tweetInput is not provided.
tweetUrl
string
Tweet URL alias for tweetInput. Used when tweetInput and tweetId are not provided.
tweetIds
string[]
Array of tweet URLs or IDs for bulk download. Maximum 50 string items. Invalid IDs are skipped; the request fails only when no valid tweet IDs remain.

Media download handoff

Use this endpoint when your agent needs a saved gallery for tweet images, videos, or GIFs. Write one manifest row per request so downstream jobs can store the gallery link without treating it as an uploaded media ID or an individual media file URL.

Gallery URL

Store gallery_url from galleryUrl as the durable link for downloaded media.

Single tweet

Store requested_tweet_id, tweet_id, and cache_hit. cacheHit: true means the single-tweet request used cached media and is free.

Bulk result

Store requested_tweet_ids, successful_tweet_count from totalTweets, and media_item_count from totalMedia. totalTweets counts successful tweets with media after invalid or failed IDs are skipped.

Input mode

Send tweetIds for bulk. When it contains at least 1 string, bulk mode ignores tweetInput, tweetId, and tweetUrl.

Batch limit

Keep tweetIds at 50 items or fewer. Split larger backfills into multiple requests.

Write handoff

This endpoint creates a gallery download, not an uploaded media ID. Use Upload Media before DMs or hosted tweet assets.
Fresh downloads cost 1 credit per tweet processed with media. Cached single downloads return cacheHit: true and are free. Bulk responses do not return freshCount; store the request IDs with totalTweets and totalMedia for reconciliation.

Response

tweetId
string
Resolved tweet ID.
Shareable gallery page URL with all downloaded media.
cacheHit
boolean
true if media was served from cache (no usage consumed).
{
  "tweetId": "1893456789012345678",
  "galleryUrl": "https://xquik.com/gallery/abc123",
  "cacheHit": false
}
First download is metered and counts toward your monthly credit allowance. Subsequent requests for the same tweet return cached URLs at no cost (cacheHit: true). All downloads are saved to your gallery at https://xquik.com/gallery.
This endpoint supports dual authentication: API key (x-api-key header) or session cookie from the dashboard.Related: Get Tweet to look up tweet details and metrics, or use the xquik MCP tool for AI agent access.
Last modified on May 19, 2026