These examples show the tool calls an AI agent makes behind the scenes. You don't need to write these yourself, just describe what you want in natural language and your AI agent handles the rest.
Schedule a Post to X
A typical flow to schedule a post to X (Twitter):
List integrations
The agent calls integrationList and finds your X account:
{
"output": [
{
"id": "abc123",
"name": "My X Account",
"picture": "https://...",
"platform": "x"
}
]
}
Get platform schema
The agent calls integrationSchema with platform: "x" to learn the rules:
{
"output": {
"rules": "...",
"maxLength": 280,
"settings": { ... },
"tools": []
}
}
Schedule the post
The agent calls schedulePostTool:
{
"socialPost": [
{
"integrationId": "abc123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [
{
"content": "<p>Excited to announce our new feature!</p>",
"attachments": []
}
],
"settings": [
{ "key": "who_can_reply_post", "value": "everyone" }
]
}
]
}
Post to Discord with Channel Selection
Platforms like Discord require selecting a channel first:
Get the schema
The agent calls integrationSchema with platform: "discord" and discovers a tool to list channels.
List channels
The agent calls triggerTool:
{
"integrationId": "discord-123",
"methodName": "listChannels",
"dataSchema": []
}
Returns available channels with their IDs.
Schedule the post
The agent includes the channel ID in settings:
{
"socialPost": [
{
"integrationId": "discord-123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "now",
"postsAndComments": [
{
"content": "<p>Hello Discord!</p>",
"attachments": []
}
],
"settings": [
{ "key": "channel", "value": "channel-id-here" }
]
}
]
}
Schedule an Instagram Reel with Trending Audio
Instagram (Facebook Business-linked) exposes an audioSearch tool for finding
music or original sounds to attach to a Reel:
Search for audio
The agent calls triggerTool (an empty q returns trending audio):
{
"integrationId": "instagram-123",
"methodName": "audioSearch",
"dataSchema": [
{ "key": "q", "value": "summer vibes" },
{ "key": "type", "value": "music" }
]
}
Returns audio assets with their IDs:
{
"output": [
{
"id": "587784541076604",
"title": "Summer Vibes",
"artist": "Some Artist",
"duration": 30000,
"previewUrl": "https://..."
}
]
}
Schedule the Reel
The agent includes the chosen audio in settings. The post must be a single
video with post_type: "post":
{
"socialPost": [
{
"integrationId": "instagram-123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [
{
"content": "<p>New reel with trending audio!</p>",
"attachments": ["https://tryferra.co/uploads/reel.mp4"]
}
],
"settings": [
{ "key": "post_type", "value": "post" },
{ "key": "audio", "value": { "id": "587784541076604", "audio_volume": 80, "video_volume": 20 } }
]
}
]
}
Note
Audio is not available on instagram-standalone channels. The Instagram Audio
API requires Facebook Login.
Post with an AI-Generated Image
Generate the image
The agent calls generateImageTool:
{
"prompt": "A futuristic city skyline at sunset, digital art style"
}
Returns:
{
"id": "img-456",
"path": "https://tryferra.co/uploads/generated-image.png"
}
Schedule with the image
The agent includes the image URL in attachments:
{
"postsAndComments": [
{
"content": "<p>The future is here</p>",
"attachments": ["https://tryferra.co/uploads/generated-image.png"]
}
]
}
Reuse an Existing Upload
Find the file
The agent calls mediaListTool:
{
"search": "launch-banner"
}
Returns:
{
"pages": 1,
"output": [
{
"id": "med-789",
"name": "6fba0ef5febb4400ae8778a5b854224d.png",
"originalName": "launch-banner.png",
"path": "https://tryferra.co/uploads/6fba0ef5febb4400ae8778a5b854224d.png",
"createdAt": "2025-01-10T09:12:00.000Z"
}
]
}
Schedule with the existing file
The agent passes the returned path as an attachment, no re-upload needed:
{
"postsAndComments": [
{
"content": "<p>Launch day!</p>",
"attachments": ["https://tryferra.co/uploads/6fba0ef5febb4400ae8778a5b854224d.png"]
}
]
}
Generate a Video and Post
Check video options
The agent calls generateVideoOptions to see available generators.
Get voice options
For Image Text Slides, the agent calls videoFunctionTool:
{
"identifier": "image-text-slides",
"functionName": "loadVoices"
}
Returns a list of available voices with their IDs.
Generate the video
The agent calls generateVideoTool:
{
"identifier": "image-text-slides",
"output": "vertical",
"customParams": [
{ "key": "prompt", "value": "5 tips for better social media engagement" },
{ "key": "voice", "value": "voice-id-here" }
]
}
Returns the video URL.
Schedule with the video
The agent uses the video URL as an attachment when calling schedulePostTool.
Clip a YouTube Video into Draft Posts
Video clipping runs for several minutes, so it is a start call followed by status calls:
List integrations
The agent calls integrationList to get the IDs of the channels the drafts are for.
Start the clipping
The agent calls clippingTool:
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"integrations": ["tiktok-123", "instagram-123"],
"clips": 3
}
Returns right away:
{
"clippingId": "0b6f1c1e-5f0a-4c55-9a53-2f1f6f7f7c11"
}
Check the status
The agent calls clippingStatusTool with the clippingId. Each call waits up to 25 seconds for a change, and the agent repeats it while the status is pending:
{
"status": "pending",
"step": "rendering",
"title": "How we grew to 10k users",
"clips": [
{
"id": "clip-1",
"title": "The launch that failed",
"content": "Our first launch got 12 signups. Here is what we changed.",
"status": "pending"
}
]
}
Read the clips
When the status is completed, every finished clip has a hosted url:
{
"status": "completed",
"step": "completed",
"title": "How we grew to 10k users",
"clips": [
{
"id": "clip-1",
"title": "The launch that failed",
"content": "Our first launch got 12 signups. Here is what we changed.",
"status": "completed",
"url": "https://tryferra.co/uploads/clip-clip-1.mp4",
"thumbnail": "https://tryferra.co/uploads/clip-clip-1.jpg"
}
]
}
The clips are already in the media library, and a draft per clip was created on each of the two channels. To publish one somewhere else, the agent passes its url in attachments when calling schedulePostTool.
Create an X Thread
To create a thread on X, add multiple items to postsAndComments:
{
"socialPost": [
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [
{
"content": "<p>Thread: 5 things I learned this week</p>",
"attachments": []
},
{
"content": "<p>1. Consistency beats intensity</p>",
"attachments": []
},
{
"content": "<p>2. Start before you're ready</p>",
"attachments": []
}
],
"settings": [
{ "key": "who_can_reply_post", "value": "everyone" }
]
}
]
}
Post to LinkedIn with a Comment
For LinkedIn, the first item in postsAndComments is the post and the rest are comments:
{
"socialPost": [
{
"integrationId": "linkedin-123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [
{
"content": "<p>We just launched something big!</p>",
"attachments": []
},
{
"content": "<p>Check it out at example.com</p>",
"attachments": []
}
],
"settings": []
}
]
}
Bulk Schedule
Schedule 5 posts across different days:
{
"socialPost": [
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-13T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [{ "content": "<p>Monday motivation</p>", "attachments": [] }],
"settings": [{ "key": "who_can_reply_post", "value": "everyone" }]
},
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-14T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [{ "content": "<p>Tuesday tip</p>", "attachments": [] }],
"settings": [{ "key": "who_can_reply_post", "value": "everyone" }]
},
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-15T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [{ "content": "<p>Midweek thoughts</p>", "attachments": [] }],
"settings": [{ "key": "who_can_reply_post", "value": "everyone" }]
},
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-16T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [{ "content": "<p>Thursday throwback</p>", "attachments": [] }],
"settings": [{ "key": "who_can_reply_post", "value": "everyone" }]
},
{
"integrationId": "x-123",
"isPremium": false,
"date": "2025-01-17T10:00:00.000Z",
"shortLink": false,
"type": "schedule",
"postsAndComments": [{ "content": "<p>Friday wrap-up</p>", "attachments": [] }],
"settings": [{ "key": "who_can_reply_post", "value": "everyone" }]
}
]
}
Each item in the socialPost array is an independent post with its own date, content, and settings.