X (Twitter)

X (Twitter) sizes, specs, and posting limits

X supports up to four photos, one video, or one GIF per post, but those media types cannot be mixed. The API does not require one fixed static-image resolution. PublishQ automatically resizes very high-resolution images to fit.

Updated July 2026

Recommended sizes

Good defaults for X (Twitter)

Use these sizes when you need a sensible default. The tables below cover the limits enforced by the API.

Landscape image

1600×900 (16:9)

A good timeline-friendly image size.

Landscape video

1280×720

The documented landscape video resolution.

Large images

Any resolution

PublishQ automatically resizes very high-resolution images to fit.

API limits

X (Twitter) API specifications

Check these values in your upload validator or before an agent submits a post.

Image, video, and GIF limits

Media limits for a single X post.

Photos
4 × JPEG, PNG, or WebP; 5 MB each
Video
1 × MP4 or MOV; 512 MB
Video duration
0.5–140 seconds
Video aspect ratio
Between 1:3 and 3:1
GIF
1 × 15 MB; 1280×1080; 350 frames

Text, poll, and rate limits

Copy and API constraints that commonly affect automated posts.

Post text
280 characters / 25,000 with Premium
Poll choices
2–4 options; 25 characters each
Poll duration
5 minutes to 7 days
API rate
200 posts / 15 min; 300 / 3 hours

Common publishing errors

X (Twitter) publishing errors

Find the returned code or the closest matching failure below, then fix the cause before retrying the post.

invalid-request (400)

The post body is malformed, has missing fields, or combines incompatible options.

Fix: Validate the JSON and send only one compatible post mode, such as media or a poll.

client-forbidden (403)

The app or access token cannot use the requested posting operation.

Fix: Check the app access tier, OAuth scopes, and user-context authentication.

usage-capped (429)

The project has exhausted its current X API usage allowance.

Fix: Wait for the usage window to reset or review the project’s API plan.

rate-limit-exceeded (429)

Too many requests were sent inside the endpoint’s rate window.

Fix: Read x-rate-limit-reset and retry after that time with backoff.

text-too-long (400)

The post exceeds the account’s text allowance after X applies weighted character counting.

Fix: Shorten the X version. Remember that links count as 23 characters and some Unicode characters count as two.

duplicate-content (403)

X found an identical or near-identical post published recently by the same account.

Fix: Change the post meaningfully before trying again. Repeating the same request will keep failing.

unauthorized (401)

The X access token has expired, was revoked, or no longer belongs to an authorized app session.

Fix: Reconnect the X account and approve posting access again.

Why X (Twitter) uploads fail

  • Photos, video, GIF, poll, or quote-tweet modes are mixed when they are mutually exclusive.
  • Weighted character counting is ignored: URLs count as 23 and some characters count as 2.
  • A GIF exceeds its frame, resolution, or 15 MB limit.

What PublishQ handles

  • Uses weighted X character validation and supports Premium long posts.
  • Keeps polls, media, quote tweets, and reply controls in valid combinations.
  • Prepares each image into the best version X accepts, resizing high-resolution photos that exceed X’s limits and compressing oversized images, so you never have to edit a photo first.
For developers and agents

Publish to X (Twitter) through one API

Send PublishQ the post. We check it, prepare the media, and deliver it to X (Twitter). You can work in the dashboard or connect through the API, CLI, or MCP server.

Frequently asked questions

Common questions about X (Twitter) media sizes and API publishing limits.

What image size works best on X (Twitter)?

1600×900 works well for landscape images. X does not require one fixed static-image resolution, but photos must be JPEG, PNG, or WebP and no larger than 5 MB.

How many images can an X post contain?

An X post can contain up to four photos, or one video, or one GIF. These media modes cannot be mixed.

Can PublishQ post to X from an API or agent?

Use the PublishQ API, CLI, or MCP server for X posts. PublishQ checks text, polls, media combinations, and reply settings before delivery.