AI Instagram carousel post generator: same size, same style
Generate every carousel slide at one aspect ratio, 4:5 or 1:1, and reuse an approved slide as a style reference. Instagram's rules and an API recipe.

An AI Instagram carousel post generator has to make slides that match. Generate every slide at the same aspect ratio, 4:5 portrait or 1:1 square, because Instagram crops all carousel images based on the first one. Then keep one look across the set: repeat the same style description in every prompt and pass an approved slide to the model as a reference image.
With Sume, each slide is one POST /v1/images call to a model that lists 4:5. Sume facts come from the Image API docs and current API code; Instagram's numbers come from Meta's content publishing guide and IG User media reference. All were read on 2026-09-27.
What size should Instagram carousel slides be?
Pick one shape for the whole post. For images published through Instagram's API, Meta documents these rules; 4:5 is the tallest shape they allow, and 1:1 is the carousel default:
| Rule | What Meta's docs say |
|---|---|
| Carousel crop | All carousel images are cropped based on the first image; the default is 1:1. |
| Items per carousel | Up to 10 images, videos, or a mix. |
| Aspect ratio | Must be within a 4:5 to 1.91:1 range. |
| Width | 320 minimum and 1440 maximum; images outside that are scaled. |
| File | JPEG only, 8 MB maximum; other color spaces are converted to sRGB. |
How do I generate carousel slides with an AI image API?
Make one request per slide, because each slide shows something different. n gives you several takes of the same slide to pick from, not a sequence. The Image API docs allow up to 10 images per request with lower ceilings per model, and current code caps most models at 4.
- Pin a model that lists
4:5(or1:1) and send the sameaspect_ratioon every slide. A model only accepts the values its catalog descriptors list; the aspect ratio guide shows each model's list. - Ask for
output_format: "jpeg"if you publish through Instagram's API, which takes JPEG only. - Keep one style block, such as palette, light, and framing, word for word in every prompt, and change only what the slide shows.
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": "Slide 1 of 5, cover: a ceramic mug on a linen table. Style: warm film photo, soft window light, cream and terracotta palette.",
"aspect_ratio": "4:5",
"output_format": "jpeg",
"n": 4
}'How do I keep every slide in the same style?
Reuse the slide you approved as a reference. Send its public HTTPS URL in input_references on every later request, and say in the prompt what stays and what changes, as the request body below does for slide two.
- ChatGPT Image 2.5 takes up to 16 reference images. Models whose
input_referencesrange is 0 to 0 are text-to-image only and reject references. - Localhost, private-network, and non-HTTPS reference URLs are rejected before submission.
- There is no seed to lock a look:
seedis in the schema but not served, so sending it returns400 unsupported_parameter. - Each slide is still a new generation, so compare the set before you post. More on this: consistent characters across images.
{
"model": "openai/gpt-image-2.5",
"prompt": "Slide 2 of 5: the same mug, held in two hands. Keep the style, palette, light, and framing of the reference image.",
"aspect_ratio": "4:5",
"output_format": "jpeg",
"input_references": [
{ "type": "image_url", "image_url": { "url": "https://example.com/carousel/slide-1.jpg" } }
]
}Can the generator output an exact pixel size?
Not every size. On the ChatGPT Image models, custom sizes need both edges in multiples of 16, which rules out 1080×1350, and current code serves their aspect_ratio: "4:5" at 1024×1280. That width is inside the 320 to 1440 range in Meta's docs. If you need exact pixels, resize the downloaded file yourself; the aspect ratio guide covers custom sizes on other models.
What does a carousel cost, and what are the limits?
- Every image in
nis billed, plus a 5.5% agent fee by default, so five slides with four takes each is 20 billed images. ChatGPT Image 2.5 is priced by tokens, so its size andqualityset the price of each one. A failed generation is not billed; AI image generator API cost lists every model's price. - Slow configurations, a large
namong them, can answer202with a job instead of200with the images. PollGET /v1/jobs/{id}/status, then fetchGET /v1/jobs/{id}/result. - Result URLs are Sume-hosted and signed, so download the slides you keep.
- Check any text the model draws letter by letter before you publish; AI images with text covers that case.
Sources
Related posts
More in Use cases
- AI jingle generator from text: make a podcast intro sting
Generate a jingle or podcast intro from a text brief: ask for the length in the prompt, then cut the track to the exact second with an audio split.
- AI lifestyle product photography from one packshot
Turn one packshot into lifestyle scenes: send it as a reference to an image model, describe one scene per request, and keep the shots that match.
- AI magazine cover generator API: covers with room for type
Generate a magazine-cover-style image with Sume: run the sume-magazine-cover-campaign Format with your photos, then set the masthead yourself.
- AI mockup generator API: put your design on a product
Make product mockups with an image API: send your design and a blank product photo as references, say where the design goes, and check each result.
Written by Sume