InstagramInstagramSocial

Stage an Instagram post — create its media container

instagram.instagram.media.container.create

Stage an Instagram post by creating the media container it will be published from

价格
free按供应商原价
成功率
—暂无成功率数据暂无成功率数据
延迟 p50
——
最后验证
—尚未验证
POSThttps://toolswitch.dev/v1/tools/instagram.instagram.media.container.create预览
在线试用即将上线供应商文档 ↗
  • 可用平台额度调用
  • 同步返回
  • 读取公开数据

参数

step 1 of the publish flow. Needs instagram_content_publish (treg's `post` capability — a `read` connection 403s here) and returns {id: <container id>}. A VIDEO container is not ready when this returns: poll instagram.media.container.status until status_code is FINISHED before publishing, or the publish call fails. Stories have no carousel — publish each story as its own container

参数类型必填说明示例
路径参数
ig_user_id字符串必填numeric Instagram professional account id — the same one instagram.user.profile takes17841400000000000
查询参数
caption字符串可选up to 2,200 characters and 30 hashtags. On a carousel the caption belongs on the PARENT container — set it on a child and the post publishes captionlessThree things we learned this week.
children字符串可选CAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order17890000000000001,17890000000000002
image_url字符串可选public JPEG URL. Use this OR video_url, never bothhttps://example.com/photo.jpg
video_url字符串可选public MP4 URLhttps://example.com/clip.mp4
media_type字符串可选omit for a plain feed image; REELS for a video in the feed, STORIES for a 24-hour story, CAROUSEL for the parent container that groups childrenREELS
location_id字符串可选a Facebook Page id that has a location
thumb_offset整数可选video only — milliseconds into the clip to take the cover frame from0
collaborators字符串可选JSON array of @handles invited as collaborators; not allowed on stories
is_carousel_item布尔可选true on each child container of a carousel; children carry no caption and are never published on their owntrue
  • 路径参数
  • ig_user_id字符串必填

    numeric Instagram professional account id — the same one instagram.user.profile takes

    示例:17841400000000000

  • 查询参数
  • caption字符串可选

    up to 2,200 characters and 30 hashtags. On a carousel the caption belongs on the PARENT container — set it on a child and the post publishes captionless

    示例:Three things we learned this week.

  • children字符串可选

    CAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order

    示例:17890000000000001,17890000000000002

  • image_url字符串可选

    public JPEG URL. Use this OR video_url, never both

    示例:https://example.com/photo.jpg

  • video_url字符串可选

    public MP4 URL

    示例:https://example.com/clip.mp4

  • media_type字符串可选

    omit for a plain feed image; REELS for a video in the feed, STORIES for a 24-hour story, CAROUSEL for the parent container that groups children

    示例:REELS

  • location_id字符串可选

    a Facebook Page id that has a location

  • thumb_offset整数可选

    video only — milliseconds into the clip to take the cover frame from

    示例:0

  • collaborators字符串可选

    JSON array of @handles invited as collaborators; not allowed on stories

  • is_carousel_item布尔可选

    true on each child container of a carousel; children carry no caption and are never published on their own

    示例:true

代码示例

将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。

预览
curl -X POST 'https://toolswitch.dev/v1/tools/instagram.instagram.media.container.create' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。