Skip to content

Instagram media requirements#

Beta version

The functionality is in beta. Features may change and may also work unstably.

The requirements to the files differ: for posts Instagram checks the format and the frame, while for the files in a chat there are no such checks.

Files of posts#

File formats#

Instagram does not accept just any file: the format is checked by the content of the file, not by the extension in the link.

What is published File format
The image of a post and a frame of a carousel JPEG
The video of a post, a Reel and a frame of a carousel MP4 (H.264 video, AAC audio)
The avatar of the account - SetProfilePicture JPEG or PNG

The size and the duration#

Limitation Value
The minimum side of an image 320 px
The maximum side of an image 1920 px (Instagram reduces larger images)
The aspect ratio of an image in the feed from 0.8 (4:5) to 1.91 (1.91:1)
The aspect ratio of a video from 0.5625 (9:16) to 1.91 (1.91:1)
The duration of a video in the feed - SendPostByUrl from 3 to 60 seconds
The duration of a Reel - SendReelByUrl from 3 to 180 seconds
Frames in a carousel from 2 to 10

An image is not cropped: if its aspect ratio is outside the allowed range, it is fitted into the frame with padding.

There is no separate field for the cover of a Reel in the request: the cover is picked to match the aspect ratio of the video automatically.

Files in messages#

When sending a file to a chat - by the SendFileByUrl and SendFileByUpload methods - the format, the size and the aspect ratio of the file are not checked: the file goes to Instagram as is.

The kind of the attachment is determined automatically - by the extension in the link, the type in the server response and the content of the file:

File How the contact receives it
Image As an image - imageMessage
Video As a video message - videoMessage
Audio As a voice message - audioMessage

The limitations of a chat:

  • Instagram Direct does not support document attachments: a PDF, an archive or an arbitrary file cannot be sent;
  • a voice message is accepted only in an MP4 or M4A container with AAC audio - other audio is rejected with a 400 error;
  • voice messages are not available to an instance with an imported browser session - the method responds with 422.