PowerPost APIv1
PowerPost APIv1
DashboardAPI keysPowerPost API
QuickstartAuthenticationWorkspacesErrors & Rate Limits
Input TypesPost TypesCreditsResearch Modes
Generate CaptionsGenerate ImagesPublish and ScheduleWebhooksMCP Server

Content

Generate ContentGenerations

Media

Upload MediaGenerate ImagesGenerate VideosVideo Captions

Publishing & planning

PostsPublish & SchedulePost ItemsAnalyticsCalendar

Account

Get Credits
Changelog
API reference

Generations

List generations, check status, and regenerate platform captions.

List Generations

GET /api/v1/content/generations

List your caption generations with optional filtering.

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: pending, processing, completed, failed
limitnumberNoResults per page (1-100, default: 20)
cursorstringNoCursor for pagination (from next_cursor)

Example

curl "https://powerpost.ai/api/v1/content/generations?status=completed&limit=10" \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID"

Response

{
  "data": [
    {
      "generation_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "completed",
      "prompt": "We just shipped dark mode",
      "platforms": ["tiktok", "instagram"],
      "research_mode": "regular",
      "credits_used": 10,
      "created_at": "2026-01-10T18:30:00Z"
    },
    {
      "generation_id": "661f9511-f3ac-52e5-b827-557766551111",
      "status": "completed",
      "prompt": "New feature: AI-powered search",
      "platforms": ["x", "facebook"],
      "research_mode": "deep",
      "credits_used": 15,
      "created_at": "2026-01-09T12:00:00Z"
    }
  ],
  "next_cursor": "gen_cursor_abc123",
  "has_more": true
}

The list endpoint does not include outputs. Use the Get Generation endpoint below to retrieve full outputs for a specific generation.


Get Generation

GET /api/v1/content/generations/{id}

Retrieve the status and outputs of a generation.

Request

Path Parameters

ParameterTypeDescription
idstringThe generation ID

Headers

HeaderValue
x-api-keyYour API key
X-Workspace-IdYour workspace ID

Example Request

curl https://powerpost.ai/api/v1/content/generations/550e8400-e29b-41d4-a716-446655440000 \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID"

Response (Processing)

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "processing",
  "prompt": "We just shipped dark mode",
  "platforms": ["tiktok", "instagram"],
  "research_mode": "regular",
  "credits_used": 10,
  "created_at": "2026-01-10T18:30:00Z"
}

Response (Completed)

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "prompt": "We just shipped dark mode",
  "platforms": ["tiktok", "instagram"],
  "research_mode": "regular",
  "credits_used": 10,
  "created_at": "2026-01-10T18:30:00Z",
  "outputs": {
    "tiktok": "🌙 Dark mode activated! POV: your eyes at 2am finally getting some relief... #darkmode #tech #appupdate",
    "instagram": "✨ Dark mode is here!\n\nYour late-night scrolling just got easier on the eyes... #DarkMode #ProductUpdate"
  }
}

YouTube outputs have a different structure with separate title and description fields:

"youtube": {
  "title": "We Just Shipped Dark Mode",
  "description": "Dark mode is finally here across all our apps... #darkmode"
}

All other platforms output a single string with hashtags included.

Response (Failed)

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "failed",
  "prompt": "We just shipped dark mode",
  "platforms": ["tiktok", "instagram"],
  "research_mode": "regular",
  "credits_used": 0,
  "created_at": "2026-01-10T18:30:00Z",
  "error": {
    "code": "GENERATION_FAILED",
    "message": "Failed to generate content. Please try again."
  }
}

Response Fields

FieldTypeDescription
generation_idstringUnique generation ID
statusstringCurrent status (see below)
promptstringThe original input prompt
platformsarrayPlatforms content was generated for
research_modestringResearch mode used
credits_usednumberCredits charged for this generation
created_atstringISO 8601 timestamp
outputsobjectPlatform content (only when completed)
errorobjectError details (only when failed)

Status Values

StatusDescription
pendingQueued, not yet started
processingGeneration is running
completedOutputs are ready
failedGeneration failed

Polling Strategy

We recommend polling every 2-3 seconds until status is completed or failed:

async function waitForGeneration(generationId, apiKey, workspaceId, maxAttempts = 60) {
  for (let i = 0; i < maxAttempts; i++) {
    const res = await fetch(`https://powerpost.ai/api/v1/content/generations/${generationId}`, {
      headers: { 'x-api-key': apiKey, 'X-Workspace-Id': workspaceId },
    })
    const data = await res.json()

    if (data.status === 'completed') return data.outputs
    if (data.status === 'failed') throw new Error(data.error.message)

    await new Promise((r) => setTimeout(r, 2000))
  }
  throw new Error('Generation timed out')
}

For production, consider using webhooks instead of polling.

Errors

CodeDescription
400Invalid status, limit, or cursor (List Generations only)
401Invalid API key
403API key is missing the content:read scope
404Generation not found (Get Generation only)
429Rate limit exceeded

Regenerate Content

POST /api/v1/content/generations/{id}/regenerate

Regenerate caption content for one platform on a completed generation. Optionally pass free-text feedback (the same “tweak this draft” flow as the studio UI). Returns the new content for that platform immediately — no polling.

Uses the original research and hashtag data from the generation. Costs 1 credit.

Path Parameters

ParameterTypeDescription
idstringThe generation ID

Headers

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

Body

FieldTypeRequiredDescription
platformstringYesPlatform to rewrite. Must be one of the generation’s original platforms.
refinementstringNoFeedback for the rewrite, e.g. "be more friendly" or "shorter, less hype". Max 2000 characters.

Example

curl -X POST https://powerpost.ai/api/v1/content/generations/550e8400-e29b-41d4-a716-446655440000/regenerate \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "refinement": "be more friendly and casual"
  }'

Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "platform": "instagram",
  "content": "Hey friends — dark mode is finally here...\n\n#DarkMode #ProductUpdate",
  "credits_used": 1,
  "remaining_credits": 42
}

YouTube and TikTok return a structured object for content (title + description) instead of a plain string. Other platforms return a string. The generation’s stored outputs are updated in place — a later GET includes the new version.

Response Fields

FieldTypeDescription
generation_idstringThe generation that was updated
platformstringPlatform that was regenerated
contentstring|objectNew caption for that platform
credits_usednumberCredits charged (always 1)
remaining_creditsnumberAccount balance after the charge

Errors

CodeDescription
400Invalid body, generation not completed, platform not on generation, or missing research data
401Invalid API key
402Insufficient credits
403API key is missing the content:generate scope
404Generation not found
429Rate limit exceeded

Generate Content

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

Upload Media

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

On this page

List GenerationsQuery ParametersExampleResponseGet GenerationRequestPath ParametersHeadersExample RequestResponse (Processing)Response (Completed)Response (Failed)Response FieldsStatus ValuesPolling StrategyErrorsRegenerate ContentPath ParametersHeadersBodyExampleResponseResponse FieldsErrors