Attach Image to Post
set_post_imageAttaches one image to a draft or scheduled post, from a public HTTPS URL (image_url) or from an image already stored in FeedSquad (asset_id, or the asset url an image upload returned), which attaches at once with no re-download. External URLs must be HTTPS images (JPEG, PNG, WebP or GIF), checked with a HEAD request, max 10MB; WebP and GIF are stored as JPEG or PNG (first frame only, so an animated GIF loses its animation), and anything over 3MB is downscaled on the server. One stored asset can be attached to any number of posts. A post holds one media format at a time (single image, carousel or video): replace=true swaps an existing carousel or video for this image. Published posts cannot be changed. Errors carry error.data = { code, recovery, ... } with codes URL_NOT_REACHABLE (received_status), URL_NOT_IMAGE (received_content_type), IMAGE_TOO_LARGE, POST_NOT_FOUND, POST_ALREADY_PUBLISHED, ASSET_NOT_FOUND; recovery says how to fix the call. Attaching media to an approved (ready or scheduled) post returns it to draft, and it needs approval again before it can publish. Every response carries status_before, status_after and approval_required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"post_id": "<post_id>"
},
"name": "set_post_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | When true, the call validates without writing. | |
| post_id | Yes | The post id to attach an image to. | |
| replace | No | When true, the call discards any existing carousel or video on the post and attaches this image instead. | |
| alt_text | No | Optional accessibility text. | |
| asset_id | No | A stored image asset id (ast_...) from an earlier image upload. Takes image_url or asset_id, not both. | |
| image_url | No | HTTPS URL of the image. A FeedSquad asset URL from an earlier image upload attaches without re-downloading. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| dry_run | No | ||
| post_id | Yes | ||
| asset_id | No | ||
| image_url | No | ||
| mime_type | No | ||
| status_after | No | ||
| dashboard_url | No | ||
| status_before | No | ||
| approval_reset | No | ||
| approval_required | No |