An X profile header is the largest image on your profile, and most stay the same for years. A header that changes — "Launching in 3 days", "10,000 subscribers, thank you", the date and city of your next talk, the title of your latest article — gives every profile visit something new. Making that by hand each time is the reason nobody does it. With Shareglint the header is a template at 1500×500 and the changing part is data; a small scheduled script renders the new header and uploads it.
The size
From X's help for customising a profile (as summarised on our social media image sizes page): the header is 1500×500 recommended, and up to 60 pixels at the top and bottom may be cropped depending on the screen. Keep text and the important parts of the image in the central band.
None of the size presets is 1500×500, so this is your own template at that size: copy a built-in template such as countdown, stat-highlight or launch-day into your account (POST /v1/templates/library/{slug}/copy), set its width and height to 1500×500 and adjust the layout, or write the HTML yourself. Raster files come out at twice the template size by default (3000×1000); add "scale": 1 for a 1500×500 file, which is all X shows.
Render the header
curl -X POST "https://shareglint.com/v1/images?wait=true" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"template": "x-header-countdown",
"format": "jpeg",
"scale": 1,
"modifications": {
"number": "3",
"unit": "days to launch",
"event": "Northwind 2.0",
"site": "northwind.dev"
}
}'
Copied from countdown, the template keeps its fields (number, unit, event, date, site). The response's url is the new header. The same values again return the same file without using quota, so a script that runs every hour but finds the countdown unchanged costs nothing.
Upload it
Uploading is X's side. X's API documents a profile banner endpoint — PUT /2/users/me/profile_banner (X developer docs) — which a script calls with your account's authorisation. X's API access levels and pricing change from time to time, so check what your access includes before building on it. The flow:
- Decide whether the content changed: the countdown's day, the follower count's milestone, the latest article's title.
- Render the header with the new values (a cache hit if nothing changed).
- Download the file from the returned URL and upload it with X's endpoint.
Run it from cron, a serverless schedule or an automation tool on a timer (integrations). Once a day is plenty for a countdown; a milestone header only needs to run when the number crosses the next threshold.
Ideas that work
- Countdown to a launch, a sale or an event, one number a day (
countdown). - Milestones: "10,000 subscribers" or "500 customers" as a thank-you, rendered when the number crosses a threshold (
stat-highlight). - Your next event: city, date and venue of the next talk or meetup (
save-the-date). - Latest work: the title of your newest article, video or episode, with its cover image.
- Launch day: a product launch header that switches to "Live now" on the day (
launch-day).
Keep the design calm: a header is seen behind your name and photo, not on its own. One number or one line of text reads; a dashboard does not. Use your brand colour as the accent so the header matches the rest of your profile and posts.
The same idea elsewhere
The template part works for any banner: a YouTube channel banner (2048×1152 minimum, with a safe area for text, per YouTube's help), a LinkedIn background (1584×396), a newsletter header, a Discord server banner. Each needs its own template at that size; how to upload it automatically depends on what each platform's API allows. The sizes, with sources, are on social media image sizes.
For the twitter:image of your links — the card shown when someone shares your page on X — see the Twitter card guide; that is a different image from the profile header.
A minimal script
The whole job fits in a few dozen lines in any language, and the shape is always the same:
- Read the value that drives the header (days to launch, follower count, latest article title) and decide whether it changed.
- Call the render endpoint with the new values and
scale: 1. - Download the image and send it to X's profile banner endpoint with your account's credentials.
- Remember what you uploaded, so the next run can skip unchanged values.
Store X's credentials in your secret store, not in the script. If X refuses the upload (wrong size, expired token, access level), the render has already happened — fix the upload and retry; re-rendering the same values is free.
Cost
One render per new header. A daily countdown is about 30 renders a month; a milestone header a handful a year. The Free plan's 100 renders carry a watermark, which a profile header should not have; Starter is $9 a month for 2,000 renders (pricing). X's API usage is billed by X under its own terms.
What it does not do
- It does not upload to X or hold your X credentials; your script does, with X's API.
- It does not read your follower count or analytics; your script fetches the numbers and sends them.
- It does not post tweets — only the header image is generated.
X's own guidance on profile images and headers is in its help center.