Blog to social media post generator API
Paste the URL of a blog post, pick the networks, tone and length, and get one caption per network, written by AI from the article and kept within each network's character limit.
- Endpoint:
POST https://postboost.co/app/api/tools/blog-to-social-media(operationIdgenerateSocialPostsFromBlog) - Web tool: postboost.co/tools/blog-to-social-media
- Token: required. Each post spends 1 AI credit of the workspace you name (or your active workspace), so a call costs one credit per platform that comes back; results are not cached. A scoped API key needs the
aiability and pays with its own workspace - MCP: tool
generate-social-posts-from-blogonhttps://postboost.co/mcp/tools(listed only with a token)
Request
| Field | Type | Default | Description |
|---|---|---|---|
url | string | Public http(s) address of the blog post. Give url or text. | |
text | string | The blog post itself, instead of url. | |
platforms | array of string | Networks to write for, at most 4 per call (one AI credit each). | |
tone | string: casual, professional, humorous, formal, friendly, conversational, informative, inspirational, playful, authoritative, empathetic, persuasive, sarcastic, trendy, neutral, excited, calm, bold, energetic, encouraging | "casual" | |
length | string: short, medium, long | "short" | |
hashtags | string: no, few, some, many | "no" | How many hashtags to include. |
cta | string: no, question, link, subscribe, follow, share, learn more, signup, buy, download | "no" | Call to action to end with. |
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/blog-to-social-media \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com/blog/utm-links","platforms":["x","linkedin"],"tone":"professional","hashtags":"few"}'
from postboost import ApiClient, Configuration
from postboost.api.free_tools_api import FreeToolsApi
from postboost.models import FreeToolGenerateSocialPostsFromBlogRequest
with ApiClient(Configuration()) as client:
api = FreeToolsApi(client)
result = api.generate_social_posts_from_blog(FreeToolGenerateSocialPostsFromBlogRequest.from_dict({"url": "https://example.com/blog/utm-links", "platforms": ["x", "linkedin"], "tone": "professional", "hashtags": "few"}))
print(result.to_dict())
import { FreeToolsApi } from 'postboost';
const api = new FreeToolsApi();
const { body } = await api.generateSocialPostsFromBlog({ url: "https://example.com/blog/utm-links", platforms: ["x", "linkedin"], tone: "professional", hashtags: "few" });
console.log(body);
use PostBoostClient\Api\FreeToolsApi;
use PostBoostClient\Model\FreeToolGenerateSocialPostsFromBlogRequest;
$api = new FreeToolsApi(new GuzzleHttp\Client());
$result = $api->generateSocialPostsFromBlog(new FreeToolGenerateSocialPostsFromBlogRequest(['url' => "https://example.com/blog/utm-links", 'platforms' => ["x", "linkedin"], 'tone' => "professional", 'hashtags' => "few"]));
echo $result;
import (
"context"
"encoding/json"
"fmt"
postboost "github.com/postboost-co/postboost-go"
)
var request postboost.FreeToolGenerateSocialPostsFromBlogRequest
if err := json.Unmarshal([]byte(`{"url":"https://example.com/blog/utm-links","platforms":["x","linkedin"],"tone":"professional","hashtags":"few"}`), &request); err != nil {
panic(err)
}
client := postboost.NewAPIClient(postboost.NewConfiguration())
result, _, err := client.FreeToolsAPI.GenerateSocialPostsFromBlog(context.Background()).FreeToolGenerateSocialPostsFromBlogRequest(request).Execute()
fmt.Println(result, err)
require 'postboost'
api = PostBoost::FreeToolsApi.new
result = api.generate_social_posts_from_blog(PostBoost::FreeToolGenerateSocialPostsFromBlogRequest.new({ url: "https://example.com/blog/utm-links", platforms: ["x", "linkedin"], tone: "professional", hashtags: "few" }))
puts result.to_hash
import com.postboost.ApiClient;
import com.postboost.api.FreeToolsApi;
import com.postboost.model.FreeToolGenerateSocialPostsFromBlogRequest;
import com.postboost.model.FreeToolGenerateSocialPostsFromBlogResponse;
FreeToolsApi api = new FreeToolsApi(new ApiClient());
FreeToolGenerateSocialPostsFromBlogRequest request = FreeToolGenerateSocialPostsFromBlogRequest.fromJson("{\"url\":\"https://example.com/blog/utm-links\",\"platforms\":[\"x\",\"linkedin\"],\"tone\":\"professional\",\"hashtags\":\"few\"}");
FreeToolGenerateSocialPostsFromBlogResponse result = api.generateSocialPostsFromBlog(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<FreeToolGenerateSocialPostsFromBlogRequest>(@"{""url"":""https://example.com/blog/utm-links"",""platforms"":[""x"",""linkedin""],""tone"":""professional"",""hashtags"":""few""}");
var result = await api.GenerateSocialPostsFromBlogAsync(request);
Console.WriteLine(result.ToJson());
use postboost::apis::configuration::Configuration;
use postboost::apis::free_tools_api;
use postboost::models::FreeToolGenerateSocialPostsFromBlogRequest;
let config = Configuration::new();
let request: FreeToolGenerateSocialPostsFromBlogRequest = serde_json::from_str(r##"{"url":"https://example.com/blog/utm-links","platforms":["x","linkedin"],"tone":"professional","hashtags":"few"}"##)?;
let result = free_tools_api::generate_social_posts_from_blog(&config, request).await?;
println!("{:?}", result);
echo '{"url":"https://example.com/blog/utm-links","platforms":["x","linkedin"],"tone":"professional","hashtags":"few"}' | ./postboost-cli --content-type application/json generateSocialPostsFromBlog -
This tool needs a token: send Authorization: Bearer YOUR_API_TOKEN as a default header (how, per SDK).
Response
{
"posts": [
{
"platform": "x",
"text": "Messy campaign data starts with messy links. Five UTM rules that keep your reports clean: https://example.com/blog/utm-links #marketing #analytics",
"hashtags": [
"#marketing",
"#analytics"
],
"characters": 135,
"limit": 280
},
{
"platform": "linkedin",
"text": "Most reporting problems start before the first click.\n\nOur new guide covers five UTM rules: lowercase only, one source name per network, no spaces, a campaign naming scheme and a shared sheet.\n\nRead it here: https://example.com/blog/utm-links #marketing #analytics",
"hashtags": [
"#marketing",
"#analytics"
],
"characters": 264,
"limit": 3000
}
],
"source": {
"title": "Five UTM rules for clean campaign data",
"final_url": "https://example.com/blog/utm-links"
},
"warnings": [],
"credits_spent": 2
}
With MCP
Connect https://postboost.co/mcp/tools (setup) and ask, for example: Turn a blog post (URL or text) into one social post per network with AI (needs a token, spends AI credits) with the PostBoost generate-social-posts-from-blog 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. |