channel. expand
Adapt a piece of content for different social platforms.
0 credits. Free: preview text only. The posts are charged by the posting tools.
Example prompt
Send this to your AI app when Heelo is connected:
Post this update to Bluesky and LinkedIn
Input fields
| Field | Type | Description |
|---|---|---|
content | string | The content to distribute |
channels | array of string | Target channels, e.g. ['bluesky','linkedin'] |
query | string | A request in words, for a caller that has no structured input (the NL router, the ReAct loop): 'Post "We shipped" to Bluesky and LinkedIn'. The text in quotes, or after a colon, is the content; the channels named outside it are the targets. Use content and channels when you can. |
message | string | Your answer to the confirmation question of an open session: 'post' to post the drafts, 'cancel' to drop them. Send it with the session_id. |
budget_cap | number | Optional spend ceiling in CENTS. If the pre-dispatch cost estimate exceeds it, the run is refused with error_code 'quota_exceeded' before anything posts. On a hosted environment the lower of budget_cap and the hard cap (METERED_CAP_CENTS, default 0) applies; the result's cost.cap_source says which. |
estimate_only | boolean | When true, return the cost_hint (link vs no-link) and `previews` (the final text for each channel) without posting — used to show the user the cost and the texts before they commit. The result's cost.would_exceed_cap says whether a real run would be refused by the cap, and cost.pricing where the prices come from. |
media | object | Optional media for a channel, by channel name: {'instagram': ['https://.../card.png']}. Only a channel whose poster takes media (Instagram, Bluesky) may be named; any other channel, or a channel that is not in `channels`, is refused before anything posts. A channel that needs media (Instagram) stops at its 'need media' prompt without it. |
Output fields
The fields in data when status is success.
| Field | Type |
|---|---|
results | array of object |
answer | string |
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/channel.expand/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"content": "We opened early access to our API.",
"channels": ["bluesky", "linkedin"],
}},
timeout=120,
)
response.raise_for_status()
print(response.json())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/channel.expand/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"content": "We opened early access to our API.",
"channels": [
"bluesky",
"linkedin"
]
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());