API Documentation
Programmatically transform content using the PrimePost API. Requires a Business plan and an API key.
Contents
Authentication
All API requests require a valid API key sent via the Authorization header using the Bearer scheme.
Authorization: Bearer pp_live_your_key_hereGenerate API keys from your Business Settings page. Keys are prefixed with pp_live_.
Base URL
https://www.primepost.app/api/v1POST /transform
Transform long-form content into multiple platform-optimized formats.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | The original content to transform (min 50 chars, max 10,000) |
| formats | string[] | Yes | Array of output format IDs (see Available Formats) |
| brand_voice | boolean | No | If true, applies your configured brand voice to the output |
Response
{
"results": [
{
"format": "twitter",
"content": "1/ Your AI-generated Twitter thread...\n\n2/ Each tweet optimized..."
},
{
"format": "linkedin",
"content": "Your AI-generated LinkedIn post..."
},
{
"format": "email",
"content": "Subject: Your compelling subject line\n\nHi there,..."
}
]
}Available Formats
twitterX / TwitterThread with 5-8 tweets, hooks, and hashtags
linkedinLinkedInProfessional post with hooks and engagement
emailEmail NewsletterNewsletter segment with subject line and CTA
instagramInstagramCaption with storytelling and hashtags
blog_summaryBlog SummaryTL;DR, key takeaways, and audience
youtubeYouTubeVideo description with timestamps and tags
facebookFacebookConversational post with engagement hooks
Brand Voice
When brand_voice: true is set in your request, the API will load your active brand voice configuration and apply it to all generated content. Configure your brand voice in Business Settings.
Brand voice settings include tone, style, target audience, keywords to include/avoid, and custom instructions.
Rate Limits
| Limit | Value |
|---|---|
| Requests per key per day | 100 |
| Max API keys per account | 5 |
| Max content length | 10,000 characters |
Rate limit counters reset daily at midnight UTC.
Error Handling
The API returns standard HTTP status codes with JSON error messages.
| Status | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid body, missing fields) |
| 401 | Invalid or missing API key |
| 403 | Not on Business tier |
| 429 | Rate limit exceeded (100/day per key) |
| 500 | Internal server error |
{
"error": "Rate limit exceeded. Maximum 100 requests per day per key."
}Code Examples
cURL
curl -X POST https://www.primepost.app/api/v1/transform \
-H "Authorization: Bearer pp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"content": "Your long-form content goes here...",
"formats": ["twitter", "linkedin", "email"],
"brand_voice": true
}'JavaScript (fetch)
const response = await fetch("https://www.primepost.app/api/v1/transform", {
method: "POST",
headers: {
"Authorization": "Bearer pp_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "Your long-form content goes here...",
formats: ["twitter", "linkedin", "email"],
brand_voice: true,
}),
});
const data = await response.json();
// data.results = [{ format: "twitter", content: "..." }, ...]Python (requests)
import requests
response = requests.post(
"https://www.primepost.app/api/v1/transform",
headers={
"Authorization": "Bearer pp_live_your_key_here",
"Content-Type": "application/json",
},
json={
"content": "Your long-form content goes here...",
"formats": ["twitter", "linkedin", "email"],
"brand_voice": True,
},
)
data = response.json()
# data["results"] = [{"format": "twitter", "content": "..."}, ...]