---
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`

Downloads images and videos attached to selected 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 include `WWW-Authenticate`. Authenticated reads include balances and checkout; a failed request never creates checkout. Guest keys offer top-up.
- `404` — Tweet media source not found
- `424` — Dependency unavailable, unauthorized, or limited. Default v1 uses 502; best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself.
- `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 limited. Default v1 uses 502; best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself.
- `default` — Unexpected error.

## Changes

- **2026-09-26** `9ae77b3e4fdc` — 16 warning
  - added the new `bookmark_folders_unavailable` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `bookmark_folders_unavailable` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `bookmark_folders_unavailable` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `bookmark_folders_unavailable` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …12 more
- …earlier changes not shown

[Full history](https://skmtc.dev/xquik-dev/apis/xquik-api-2/changes/api/v1/x/media/download/post.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api-2.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api-2/revisions/9ae77b3e4fdc?raw)
