PowerPost APIv1
PowerPost APIv1
PowerPost APIQuickstartAuthenticationWorkspacesInput Types

API Reference

Upload MediaGenerate ContentGenerationsGenerate ImagesPosts & PublishingGet Credits

Guides

WebhooksError CodesChangelog

Generate Content

Start a new content generation job from text, images, or video.

POST /api/v1/content/generate

Generate platform-optimized social media content from text, images, or video input.


Input Types

PowerPost supports three input types. The input type is determined automatically based on the fields you provide:

Input TypeHow to Use
TextSend prompt only
ImagesSend media_ids with image IDs (+ optional prompt)
VideoSend media_ids with a video ID (+ optional prompt)

You must provide either prompt or media_ids (or both).


Text Input

Generate content from a text prompt.

Request Body

FieldTypeRequiredDescription
promptstringYesWhat you want to post about (3-500 characters)
post_typesstring[]YesTarget post types (at least one)
research_modestringYesregular or deep
writing_style_idstringNoCustom writing style ID (see dashboard)
cta_textstringNoCustom call-to-action (max 100 characters)

Example

curl -X POST https://powerpost.ai/api/v1/content/generate \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "We just shipped dark mode across all our apps",
    "post_types": ["instagram-reel", "tiktok-video", "x-post"],
    "research_mode": "regular"
  }'
const res = await fetch('https://powerpost.ai/api/v1/content/generate', {
  method: 'POST',
  headers: {
    'x-api-key': 'pp_live_sk_YOUR_KEY',
    'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'We just shipped dark mode across all our apps',
    post_types: ['instagram-reel', 'tiktok-video', 'x-post'],
    research_mode: 'regular',
  }),
})
const data = await res.json()
import requests

res = requests.post(
"https://powerpost.ai/api/v1/content/generate",
headers={
"x-api-key": "pp_live_sk_YOUR_KEY",
"X-Workspace-Id": "YOUR_WORKSPACE_ID",
"Content-Type": "application/json",
},
json={
"prompt": "We just shipped dark mode across all our apps",
"post_types": ["instagram-reel", "tiktok-video", "x-post"],
"research_mode": "regular",
},
)
data = res.json()

Image Input

Generate content from uploaded images. PowerPost analyzes the images and creates captions. Optionally provide a prompt for additional context.

Supported formats: JPEG, PNG, WebP

Request Body

FieldTypeRequiredDescription
media_idsstring[]YesArray of uploaded image media IDs (up to 10)
promptstringNoAdditional context to guide the generated content
post_typesstring[]YesTarget post types (at least one)
research_modestringYesregular or deep
writing_style_idstringNoCustom writing style ID (see dashboard)
cta_textstringNoCustom call-to-action (max 100 characters)

Example

curl -X POST https://powerpost.ai/api/v1/content/generate \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "media_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    "prompt": "Behind the scenes at our product launch",
    "post_types": ["instagram-feed", "facebook-post"],
    "research_mode": "regular"
  }'
const res = await fetch('https://powerpost.ai/api/v1/content/generate', {
  method: 'POST',
  headers: {
    'x-api-key': 'pp_live_sk_YOUR_KEY',
    'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    media_ids: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890'],
    prompt: 'Behind the scenes at our product launch',
    post_types: ['instagram-feed', 'facebook-post'],
    research_mode: 'regular',
  }),
})
const data = await res.json()
import requests

res = requests.post(
"https://powerpost.ai/api/v1/content/generate",
headers={
"x-api-key": "pp_live_sk_YOUR_KEY",
"X-Workspace-Id": "YOUR_WORKSPACE_ID",
"Content-Type": "application/json",
},
json={
"media_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
"prompt": "Behind the scenes at our product launch",
"post_types": ["instagram-feed", "facebook-post"],
"research_mode": "regular",
},
)
data = res.json()

Upload images first using the Upload Media endpoint to get media_ids.


Video Input

Generate content from an uploaded video. PowerPost analyzes the video using AI video understanding, then generates captions based on the content.

Supported formats: MP4, MOV

Request Body

FieldTypeRequiredDescription
media_idsstring[]YesArray with the uploaded video media ID
promptstringNoAdditional context to focus the generated content
post_typesstring[]YesTarget post types (at least one)
research_modestringYesregular or deep
writing_style_idstringNoCustom writing style ID (see dashboard)
cta_textstringNoCustom call-to-action (max 100 characters)

Example

curl -X POST https://powerpost.ai/api/v1/content/generate \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "media_ids": ["f9g0h1i2-j3k4-5678-lmno-pq9876543210"],
    "prompt": "Focus on the key insights about productivity",
    "post_types": ["tiktok-video", "youtube-short"],
    "research_mode": "deep"
  }'
const res = await fetch('https://powerpost.ai/api/v1/content/generate', {
  method: 'POST',
  headers: {
    'x-api-key': 'pp_live_sk_YOUR_KEY',
    'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    media_ids: ['f9g0h1i2-j3k4-5678-lmno-pq9876543210'],
    prompt: 'Focus on the key insights about productivity',
    post_types: ['tiktok-video', 'youtube-short'],
    research_mode: 'deep',
  }),
})
const data = await res.json()
import requests

res = requests.post(
"https://powerpost.ai/api/v1/content/generate",
headers={
"x-api-key": "pp_live_sk_YOUR_KEY",
"X-Workspace-Id": "YOUR_WORKSPACE_ID",
"Content-Type": "application/json",
},
json={
"media_ids": ["f9g0h1i2-j3k4-5678-lmno-pq9876543210"],
"prompt": "Focus on the key insights about productivity",
"post_types": ["tiktok-video", "youtube-short"],
"research_mode": "deep",
},
)
data = res.json()

Upload videos first using the Upload Media endpoint to get media_ids. Video input requires additional credits for video analysis (6 credits per minute of video, rounded up).


Common Parameters

Headers

HeaderValue
x-api-keyYour API key
X-Workspace-IdYour workspace ID
Content-Typeapplication/json

Post Types

Specify which post types to generate for. The platform is derived automatically from each post type.

PlatformPost Types
Instagraminstagram-feed, instagram-reel, instagram-story
TikToktiktok-video, tiktok-photos
YouTubeyoutube-video, youtube-short
Xx-post
Facebookfacebook-post, facebook-reel, facebook-story
LinkedInlinkedin-post

Multiple post types from the same platform (e.g., instagram-reel and instagram-feed) produce one shared caption for that platform. The post type declares your publishing intent.

Research Modes

ModeDescription
regularQuick generation with basic research
deepExtended research for higher engagement

Writing Styles

Create custom writing styles in Settings → Writing Styles. A writing style captures your brand voice so generated content sounds like you.

Pass the writing_style_id to apply a style:

{
  "prompt": "We just shipped dark mode",
  "post_types": ["instagram-reel"],
  "research_mode": "regular",
  "writing_style_id": "ws_abc123"
}

If omitted, the generation uses your active writing style (if you have one set), or defaults to no style.


Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "processing",
  "credits_used": 10,
  "remaining_credits": 90,
  "status_url": "/api/v1/content/generations/550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeDescription
generation_idstringUnique ID to track this generation
statusstringInitial status (always processing)
credits_usednumberCredits deducted for this generation
remaining_creditsnumberYour credit balance after deduction
status_urlstringRelative URL to poll for results

Use the Get Generation endpoint to poll for results.


Credit Costs

Credit costs depend on:

  • Research mode — Deep research costs more than regular
  • Platform count — More unique platforms require more credits
  • Input type — Image and video require extra credits for processing
  • Video duration — Longer videos cost more

See the Credits endpoint to check your current balance.


Errors

CodeDescription
400Invalid request body
401Invalid API key
402Insufficient credits
429Rate limit exceeded

What's Next?

Once you have captions:

  • Generate Images — Create visuals for your content
  • Create & Publish Posts — Publish to social platforms
  • Get Generation — Poll for results

Upload Media

Upload images or videos for use in content generation or publishing.

Generations

List generations and check generation status.

On this page

Input TypesText InputRequest BodyExampleImage InputRequest BodyExampleVideo InputRequest BodyExampleCommon ParametersHeadersPost TypesResearch ModesWriting StylesResponseCredit CostsErrorsWhat's Next?