GitHub social preview 1280x640: generate it with an image API
GitHub's social preview is 1280x640 PNG, JPG or GIF under 1 MB. 1280x640 passes GPT Image 2.5's size rules on Sume; here is the request and the file-size step.

GitHub's social preview image should be PNG, JPG or GIF under 1 MB, at least 640x320 and best at 1280x640. 1280x640 is a legal GPT Image 2.5 custom size on Sume, so you can request it directly with image_size: "1280x640". Check the file size afterward, because Sume does not serve output_compression.
GitHub's figures are from its docs page; Sume's from the Image API docs. Both read 2026-10-01.
What does GitHub require?
Per GitHub's page: PNG, JPG or GIF, under 1 MB, a 640x320 minimum, and 1280x640 for best display. Transparent PNGs are supported, but GitHub recommends a solid background so the card looks right on any page color.
Does 1280x640 pass the GPT size rules?
OpenAI's guide lists the GPT Image 2.5 custom-size rules: both edges multiples of 16, edges at most 3840, aspect ratio between 1:3 and 3:1, and 655,360 to 8,294,400 total pixels. Sume's Image API docs state the same limits for image_size on GPT models.
| Check | Result |
|---|---|
| Edges multiples of 16 | Yes (80 x 16, 40 x 16) |
| Aspect ratio within 1:3 to 3:1 | Yes (2:1) |
| Pixels 655,360 to 8,294,400 | Yes (819,200) |
What do I send?
Ask for a solid background and leave the lettering short. Request png for sharp text, or jpeg for a smaller file.
curl -X POST https://api.sume.com/v1/images \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.5",
"prompt": "Repository banner, dark navy background, large word 'ingest' in white, minimal line pattern",
"image_size": "1280x640",
"output_format": "png"
}'How do I stay under 1 MB?
Sume's docs say output_compression is in the schema but not served in v1; sending it returns 400 unsupported_parameter. If the PNG is over 1 MB, switch output_format to jpeg, or recompress the file with your own tool before uploading to GitHub.
Sources
Related posts
More in Use cases
- Google Play screenshot rules: 320-3840 px, no alpha, 2x ratio
Play screenshots must be JPEG or 24-bit PNG, 320 to 3840 px, with the long edge at most twice the short one. Sume's 3:1 limit is looser, so check 2:1.
- Small business holiday ad creative with AI: one Format, one bulk run
Google showed three creatives building local campaigns with Flow. A shop can run a first-party Sume Format per product and queue up to 100 runs in a bulk call.
- How many ad variants per product? Google says test gradually
Google's YouTube ads guidance says test gradually and favor quality over quantity. A starting plan: 3 variants per SKU in one bulk run, reviewed by a person.
- Change a garment's colour in a photo with a mask_url edit
Recolour clothing with a mask: send the photo as an input reference, a public HTTPS mask_url, and a colour prompt to ChatGPT Image 2.5 on POST /v1/images.
Written by Sume