Skip to content

Docs / All tools / Base tools

instagram.post

Publish an image or video from the connected Instagram account.

40 credits. Per post. 0 when cancelled.

Example prompt

Send this to your AI app when Heelo is connected:

Post https://example.com/launch.jpg to Instagram with the caption 'Launch day!'

Input fields

FieldTypeDescription
queryRequiredstringNatural-language request to post to Instagram
verbatimbooleanTrue: `query` is the whole caption, posted exactly as given; `media` holds the files (used by loop1.run and channel.expand)
mediaarray of stringOptional list of photo/video URLs to post (a local path must be in the user's uploads folder)

Output fields

The fields in data when status is success.

FieldType
captionstring
post_urlstring
post_url_statusstring
answerstring

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/instagram.post/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "query": "Post https://example.com/launch.jpg to Instagram with the caption 'Launch day!'",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())