PowerPost APIv1
PowerPost APIv1
PowerPost APIQuickstartAuthenticationWorkspacesInput Types

API Reference

Upload MediaGenerate ContentGenerationsGenerate ImagesPosts & PublishingGet Credits

Guides

WebhooksError CodesChangelog

Generations

List generations and check generation status.

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"
const res = await fetch(
  'https://powerpost.ai/api/v1/content/generations?status=completed&limit=10',
  { headers: { 'x-api-key': 'pp_live_sk_YOUR_KEY', 'X-Workspace-Id': 'YOUR_WORKSPACE_ID' } }
)
const data = await res.json()
import requests

res = requests.get(
"https://powerpost.ai/api/v1/content/generations",
params={"status": "completed", "limit": 10},
headers={"x-api-key": "pp_live_sk_YOUR_KEY", "X-Workspace-Id": "YOUR_WORKSPACE_ID"},
)
data = res.json()

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"
const res = await fetch(
  'https://powerpost.ai/api/v1/content/generations/550e8400-e29b-41d4-a716-446655440000',
  { headers: { 'x-api-key': 'pp_live_sk_YOUR_KEY', 'X-Workspace-Id': 'YOUR_WORKSPACE_ID' } }
)
const data = await res.json()
import requests

res = requests.get(
"https://powerpost.ai/api/v1/content/generations/550e8400-e29b-41d4-a716-446655440000",
headers={"x-api-key": "pp_live_sk_YOUR_KEY", "X-Workspace-Id": "YOUR_WORKSPACE_ID"},
)
data = res.json()

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.

Generate Content

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

Generate Images

Create AI-generated images from text, reference images, or existing captions.

On this page

List GenerationsQuery ParametersExampleResponseGet GenerationRequestPath ParametersHeadersExample RequestResponse (Processing)Response (Completed)Response (Failed)Response FieldsStatus ValuesPolling Strategy