Post or schedule a video on Instagram, Facebook, TikTok and YouTube with one call. Pedra Pro only, no credits charged.
Post a video to Instagram, Facebook, TikTok and YouTube with one call, now or at a set time. Send a public MP4 URL and one entry per network with its caption and settings. Pedra stores the video, publishes it on each network and gives you a status for every post.
What you get from one call:
One video, four networks: Instagram (as a Reel), a Facebook Page, TikTok and YouTube, each with its own caption and settings.
Post now or schedule: leave out scheduledAt and the video goes out within about a minute, or pick any time up to 180 days ahead.
A status per post: list your posts to see what went out, the network's own post id and why anything failed. Cancel a scheduled post before it goes out.
Works from chat: the same endpoints are tools on the remote Pedra MCP server, so ChatGPT and Claude can schedule posts from a conversation.
Before you start
Pedra Pro only. Every call checks that the account is on the Pro plan. Other accounts get 403 pro_required. A scheduled post is only published if the account is still on Pro when it's due; if not, the post fails with an error.
Connect the accounts in the app. Social accounts are connected in Pedra under Settings › Socials, where you log in to each network. The API can't connect them. One account per network per Pedra user.
Supported networks: Instagram (a professional account, posted as a Reel), a Facebook Page, TikTok and YouTube. Video only for now.
No credits. Posting is free. The limit is 25 posts per network in any rolling 24 hours (429 daily_limit).
How it works
Three calls cover most integrations:
Check: POST /api/social/accounts tells you which networks are connected.
Post: POST /api/social/posts with a video URL and one entry per network. You get one post per network back, with status: "pending".
Follow up: POST /api/social/posts/list shows each post's status. Once it's "posted", platformPostId holds the network's id.
The example schedules a vertical video for Instagram, TikTok and YouTube Shorts, tomorrow at 10:00 Madrid time.
# 1. Check which networks are connected
curl -X POST https://app.pedra.ai/api/social/accounts \
-H "Content-Type: application/json" \
-d '{ "apiKey": "YOUR_API_KEY" }'
# 2. Schedule the video for tomorrow at 10:00 Madrid time
curl -X POST https://app.pedra.ai/api/social/posts \
-H "Content-Type: application/json" \
-d '{
"apiKey": "YOUR_API_KEY",
"videoUrl": "https://example.com/videos/calle-mayor-12.mp4",
"scheduledAt": "2026-10-14T10:00:00+02:00",
"timezone": "Europe/Madrid",
"coverOffsetMs": 1000,
"posts": [
{ "network": "instagram", "caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio." },
{ "network": "tiktok", "caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio.", "privacyLevel": "PUBLIC_TO_EVERYONE" },
{ "network": "youtube", "title": "Calle Mayor 12: 3-bed flat with terrace", "caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio." }
]
}'
# 3. Later: check how it went
curl -X POST https://app.pedra.ai/api/social/posts/list \
-H "Content-Type: application/json" \
-d '{ "apiKey": "YOUR_API_KEY", "limit": 10 }'
The Python and Node SDKs don't have social methods yet, so the samples use plain HTTP.
List connected accounts
POST/api/social/accounts
Returns every supported network and whether it's connected. account is the Instagram or TikTok username, or the Facebook Page name. YouTube doesn't share the channel name, so it's always null there.
Posts one video to one or more networks, now or at scheduledAt. Pedra first copies the video to its own storage (max 1 GB), so your URL only has to work during this call. A Pedra video URL (img.pedra.ai) is used as is. Each network can appear once in posts and has to be connected, or you get 400 not_connected.
apiKeystringrequired
Your API key.
videoUrlstringrequired
Public https URL of an MP4. Pedra copies it to its own storage (max 1 GB). A Pedra video URL (img.pedra.ai) is used as is.
scheduledAtstring
When to post, as an ISO 8601 date-time. Leave it out to post now (goes out within about a minute). Can't be in the past or more than 180 days ahead.
timezonestring
IANA timezone, e.g. Europe/Madrid. Stored for display only; the time itself comes from scheduledAt.
coverOffsetMsinteger
The cover frame on Instagram and TikTok, in milliseconds from the start of the video (0 to 600000). Ignored on Facebook and YouTube.
postsarrayrequired
One entry per network, at least one. Each network at most once.
Post entry
One object per network in posts. network and caption work the same everywhere; the other fields depend on the network and are listed below.
networkstringrequired
The network this entry is for.
Values:instagramfacebooktiktokyoutube
captionstring
Post text. On YouTube it's the description. Max 2,200 characters on Instagram and TikTok, 5,000 on YouTube.
Instagram
Posted as a Reel on the connected professional account. Only caption, max 2,200 characters.
Facebook
Posted to the connected Facebook Page.
videoTypestring
Post it as a Reel or as a regular feed video.
Values:REELFEED
Default:REEL
firstCommentstring
Posted as the Page's first comment, for example a link. Max 8,000 characters.
TikTok
privacyLevel is required and has to be one the creator's account allows. caption max 2,200 characters.
privacyLevelstringrequired
Who can see the video. Has to be one the creator's account allows.
TikTok's AI-generated content label. Set it to false only for real footage.
Default:true
YouTube
title is required. caption becomes the video description, max 5,000 characters. YouTube shows short vertical videos as Shorts.
titlestringrequired
Video title, max 100 characters. Title and caption can't contain < or >.
privacyStatusstring
Video visibility.
Values:publicunlistedprivate
Default:public
categoryIdstring
YouTube category number, as a string (e.g. "22").
curl -X POST https://app.pedra.ai/api/social/posts \
-H "Content-Type: application/json" \
-d '{
"apiKey": "YOUR_API_KEY",
"videoUrl": "https://example.com/videos/calle-mayor-12.mp4",
"scheduledAt": "2026-10-14T10:00:00+02:00",
"timezone": "Europe/Madrid",
"coverOffsetMs": 1000,
"posts": [
{
"network": "instagram",
"caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio."
},
{
"network": "tiktok",
"caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio.",
"privacyLevel": "PUBLIC_TO_EVERYONE",
"brandOrganicToggle": true
},
{
"network": "youtube",
"title": "Calle Mayor 12: 3-bed flat with terrace",
"caption": "3-bed flat with a sunny terrace on Calle Mayor 12. Book a visit, link in bio.",
"privacyStatus": "public",
"categoryId": "22"
}
]
}'
Cancels a post that hasn't gone out yet. Only pending posts can be cancelled; anything else returns 409 not_cancellable. Each network's post is separate, so cancelling one leaves the others from the same call untouched.
Errors come back as { "error": "...", "code": "..." }. Branch on code; error is a readable message. See Errors & limits for the general model.
400: invalid_video_url (not a public https URL), video_unreachable (Pedra couldn't download it), not_a_video, video_too_large (over 1 GB), invalid_network, not_connected (connect it under Settings › Socials), invalid_post (the message names the network and the field), invalid_scheduled_at (not ISO 8601, in the past, or more than 180 days ahead), invalid_cover (coverOffsetMs isn't whole milliseconds between 0 and 600000).
401 invalid_api_key: the API key is missing or wrong.
403 pro_required: the account isn't on Pedra Pro.
404 post_not_found: no post with that postId on this account.
409 not_cancellable: the post is already posted, failed, processing or cancelled.
429 daily_limit: that network already has 25 posts in the last 24 hours.
Next
Make the video first with the Video API (its URL is used as is), or schedule posts from ChatGPT or Claude with the MCP server.