X Articles API: draft, publish and a generated cover image
The X Articles API has POST /2/articles/draft and a publish call, with optional cover media. Make the cover with a Sume image call, then upload it to X.

The X API has two Articles endpoints: POST /2/articles/draft creates a draft with a title, a DraftJS content_state and optional cover media, and POST /2/articles/{article_id}/publish makes it public. For the cover, generate an image with a Sume image call, upload it through X's media endpoints, and attach it to the draft; Sume does not call X.
X facts are from the Articles introduction, read 2026-10-01. Sume facts are from Image API and Image 1.0.
What do the two X endpoints do?
Both need a user access token, via OAuth 1.0a or OAuth 2.0 PKCE, with the tweet.read, tweet.write and users.read scopes.
| Endpoint | Purpose | Returns |
|---|---|---|
POST /2/articles/draft | Create a draft: title, content_state, optional cover media | Draft id and title |
POST /2/articles/{article_id}/publish | Publish a draft | post_id of the published Article |
How do I make a cover image on Sume?
Send a prompt to the image route and pick an aspect_ratio; the options are a per-model catalog, so read your model's list. One call can return up to four candidates, and each output has a durable media.sume.com URL such as https://media.sume.com/img/01J.../0.png.
How does the cover get to X?
X says cover media is uploaded through its media upload endpoints, then used in the draft. The introduction page does not state a cover size or ratio, so check X's current Articles guidance for that. Download the chosen file from its Sume URL, keep it within X's general image limit of 5 MB, which X does not say applies to covers specifically (see the 5 MB image post), and upload it.
What is the order of operations?
Generate and choose the cover, upload it to X, create the draft with the title, body and cover, review, then publish. Publishing returns a Post ID, so the Article appears as a Post.
Sources
Related posts
More in Developers
- X API media_category: tweet_video vs amplify_video vs dm_video
Pick media_category by destination: tweet_video for Posts, amplify_video for Ads, dm_video for DMs. Wrong category uploads fine and fails at Post create.
- X API media upload succeeded but the Post fails: two-stage checks
X enforces media limits at upload and again at POST /2/tweets, by the posting user. Here is a pre-flight list and what Sume's inspect and trim cover.
- X API subtitles media_category: SRT sidecar vs burned-in captions
X lists `subtitles` as a media_category for sidecar files. Sume burns captions into the picture and does not take SRT uploads. Pick the path that fits.
- X DM video limit: 140 seconds and 512 MB, and how to trim to it
X lists DM video (dm_video) at 140 seconds and 512 MB by default. Cut a clip to length with Sume video-trim, which takes 0.2 to 900 seconds.
Written by Sume