YouTube video to social posts API
Paste the captions of your video and get an X thread and up to three captions for other networks in one go, each within its network's limit and linking the video once.
- Endpoint:
POST https://postboost.co/app/api/tools/youtube-to-social-posts(operationIdgenerateSocialPostsFromVideo) - Web tool: postboost.co/tools/youtube-to-social-posts
- Token: required. A new generation spends 1 AI credit of the workspace you name (or your active workspace); a repeated identical request is answered from the cache for free. A scoped API key needs the
aiability and pays with its own workspace - MCP: tool
generate-social-posts-from-videoonhttps://postboost.co/mcp/tools(listed only with a token)
Request
| Field | Type | Default | Description |
|---|---|---|---|
text | string | The captions of your video: an .srt, .vtt or .sbv file's text, or the text of YouTube's "Show transcript" panel. Timestamps, cue numbers and sound tags like [Music] are removed; 100 to 24,000 characters must remain. | |
video_url | string | The video's YouTube link (watch, youtu.be, Shorts or live). Each output links it once, the X thread in its last post; without it the posts have no link. | |
title | string | The video's title, as context for the posts. | |
outputs | array of string | ["x_thread","linkedin","instagram"] | What to write, 1 to 4 different keys. |
tone | string: friendly, professional, playful, inspirational, bold | "friendly" | |
workspace | string | UUID of the workspace whose AI credits pay for the call. Default: your active workspace (a scoped API key: its own workspace). |
Call it
- curl
- Python
- Node.js
- PHP
- Go
- Ruby
- Java
- C#
- Rust
- CLI
curl -X POST https://postboost.co/app/api/tools/youtube-to-social-posts \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"text":"1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'\''m showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.","video_url":"https://youtu.be/dQw4w9WgXcQ?si=share","outputs":["x_thread","linkedin"]}'
from postboost import ApiClient, Configuration
from postboost.api.free_tools_api import FreeToolsApi
from postboost.models import FreeToolGenerateSocialPostsFromVideoRequest
with ApiClient(Configuration()) as client:
api = FreeToolsApi(client)
result = api.generate_social_posts_from_video(FreeToolGenerateSocialPostsFromVideoRequest.from_dict({"text": "1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.", "video_url": "https://youtu.be/dQw4w9WgXcQ?si=share", "outputs": ["x_thread", "linkedin"]}))
print(result.to_dict())
import { FreeToolsApi } from 'postboost';
const api = new FreeToolsApi();
const { body } = await api.generateSocialPostsFromVideo({ text: "1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.", videoUrl: "https://youtu.be/dQw4w9WgXcQ?si=share", outputs: ["x_thread", "linkedin"] });
console.log(body);
use PostBoostClient\Api\FreeToolsApi;
use PostBoostClient\Model\FreeToolGenerateSocialPostsFromVideoRequest;
$api = new FreeToolsApi(new GuzzleHttp\Client());
$result = $api->generateSocialPostsFromVideo(new FreeToolGenerateSocialPostsFromVideoRequest(['text' => "1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.", 'video_url' => "https://youtu.be/dQw4w9WgXcQ?si=share", 'outputs' => ["x_thread", "linkedin"]]));
echo $result;
import (
"context"
"encoding/json"
"fmt"
postboost "github.com/postboost-co/postboost-go"
)
var request postboost.FreeToolGenerateSocialPostsFromVideoRequest
if err := json.Unmarshal([]byte(`{"text":"1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.","video_url":"https://youtu.be/dQw4w9WgXcQ?si=share","outputs":["x_thread","linkedin"]}`), &request); err != nil {
panic(err)
}
client := postboost.NewAPIClient(postboost.NewConfiguration())
result, _, err := client.FreeToolsAPI.GenerateSocialPostsFromVideo(context.Background()).FreeToolGenerateSocialPostsFromVideoRequest(request).Execute()
fmt.Println(result, err)
require 'postboost'
api = PostBoost::FreeToolsApi.new
result = api.generate_social_posts_from_video(PostBoost::FreeToolGenerateSocialPostsFromVideoRequest.new({ text: "1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.", video_url: "https://youtu.be/dQw4w9WgXcQ?si=share", outputs: ["x_thread", "linkedin"] }))
puts result.to_hash
import com.postboost.ApiClient;
import com.postboost.api.FreeToolsApi;
import com.postboost.model.FreeToolGenerateSocialPostsFromVideoRequest;
import com.postboost.model.FreeToolGenerateSocialPostsFromVideoResponse;
FreeToolsApi api = new FreeToolsApi(new ApiClient());
FreeToolGenerateSocialPostsFromVideoRequest request = FreeToolGenerateSocialPostsFromVideoRequest.fromJson("{\"text\":\"1\\n00:00:00,000 --> 00:00:04,000\\n[Music]\\n\\n2\\n00:00:04,000 --> 00:00:09,000\\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\\n\\n3\\n00:00:09,000 --> 00:00:15,000\\nFirst I write down three things I want people to know, then I turn each one into a short post.\",\"video_url\":\"https://youtu.be/dQw4w9WgXcQ?si=share\",\"outputs\":[\"x_thread\",\"linkedin\"]}");
FreeToolGenerateSocialPostsFromVideoResponse result = api.generateSocialPostsFromVideo(request);
System.out.println(result.toJson());
using Newtonsoft.Json;
using PostBoost.Client.Api;
using PostBoost.Client.Client;
using PostBoost.Client.Model;
var api = new FreeToolsApi(new Configuration());
var request = JsonConvert.DeserializeObject<FreeToolGenerateSocialPostsFromVideoRequest>(@"{""text"":""1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post."",""video_url"":""https://youtu.be/dQw4w9WgXcQ?si=share"",""outputs"":[""x_thread"",""linkedin""]}");
var result = await api.GenerateSocialPostsFromVideoAsync(request);
Console.WriteLine(result.ToJson());
use postboost::apis::configuration::Configuration;
use postboost::apis::free_tools_api;
use postboost::models::FreeToolGenerateSocialPostsFromVideoRequest;
let config = Configuration::new();
let request: FreeToolGenerateSocialPostsFromVideoRequest = serde_json::from_str(r##"{"text":"1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'm showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.","video_url":"https://youtu.be/dQw4w9WgXcQ?si=share","outputs":["x_thread","linkedin"]}"##)?;
let result = free_tools_api::generate_social_posts_from_video(&config, request).await?;
println!("{:?}", result);
echo '{"text":"1\n00:00:00,000 --> 00:00:04,000\n[Music]\n\n2\n00:00:04,000 --> 00:00:09,000\nToday I'\''m showing you how I plan a week of social posts in about twenty minutes.\n\n3\n00:00:09,000 --> 00:00:15,000\nFirst I write down three things I want people to know, then I turn each one into a short post.","video_url":"https://youtu.be/dQw4w9WgXcQ?si=share","outputs":["x_thread","linkedin"]}' | ./postboost-cli --content-type application/json generateSocialPostsFromVideo -
This tool needs a token: send Authorization: Bearer YOUR_API_TOKEN as a default header (how, per SDK).
Response
{
"outputs": {
"x_thread": [
"I plan a full week of social posts in about 20 minutes. Here is the routine:",
"Step 1: write down three things you want people to know this week. Just three.",
"Step 2: turn each one into a short post. The full walkthrough:\n\nhttps://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"linkedin": "Planning a week of social posts doesn't have to take an afternoon.\n\nMy routine takes about 20 minutes: I write down three things I want people to know, then turn each one into a short post.\n\nI walk through it in this video: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
"outputs_skipped": [],
"warnings": [],
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"cleaned_chars": 175,
"removed_timestamps": true,
"credits_spent": 1,
"cached": false
}
With MCP
Connect https://postboost.co/mcp/tools (setup) and ask, for example: Turn a YouTube video's captions into an X thread and social captions with AI (needs a token, spends AI credits) with the PostBoost generate-social-posts-from-video tool.
Errors
| Status | When |
|---|---|
401 | No token, or an invalid one. The body has register_url to create a free account. |
403 | workspace is not a workspace you belong to, or your account has no workspace, or a scoped API key lacks the ai ability or is bound to another workspace (code: insufficient_scope). |
413 | The JSON body is larger than 128 KB. |
422 | A field is invalid; the body lists the errors per field. |
429 | The workspace has no AI credits left this billing cycle (code: ai_credits_exhausted, upgrade_url), or the per-minute limit is reached. |
502 | The AI provider failed or timed out. No credit was spent. |
503 | AI tools are switched off right now. |