---
title: "Download images and videos from tweets"
method: POST
path: "/api/v1/x/media/download"
tags: ["Media"]
---

# Download images and videos from tweets

`POST /api/v1/x/media/download`

Download images and videos from tweets.

## Request body

- object
  - `tweetInput` string — Tweet URL or ID (single tweet)
  - `tweetId` string — Numeric tweet ID alias for tweetInput
  - `tweetUrl` string — Tweet URL alias for tweetInput
  - `tweetIds` string[] — Array of tweet URLs or IDs (bulk, max 50 string items)

## Response `200`

Media download result. Single: tweetId + galleryUrl + cacheHit. Bulk: galleryUrl + totalTweets + totalMedia.

- object
  - `tweetId` string
  - `galleryUrl` string
  - `cacheHit` boolean
  - `totalTweets` integer
  - `totalMedia` integer

## Other responses

- `400` — Invalid input
- `401` — Unauthenticated
- `402` — Payment required. MPP reads return a problem document and `WWW-Authenticate`. Authenticated reads return balances and checkout actions. Guest keys receive only the guest top-up action. Other endpoints may use legacy errors. A failed request never creates checkout. Require user confirmation before creating one.
- `404` — Tweet media source not found
- `424` — Dependency unavailable, unauthorized, or rate limited. Default v1 returns 502. The best-practice response contract returns 424 for transparent dependency failures.
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.
- `502` — Dependency unavailable, unauthorized, or rate limited. Default v1 returns 502. The best-practice response contract returns 424 for transparent dependency failures.
- `default` — Unexpected error.

---

[API](https://skmtc.net/xquik-dev/apis/xquik-api-2.md) · [All operations](https://skmtc.net/xquik-dev/apis/xquik-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api-2/revisions/832835de69eb/schema)
