Generate Captions
End-to-end flow for caption generation — start a job, poll or use webhooks, regenerate one platform.
This guide walks through caption generation: create a job, wait for results, and optionally regenerate one platform with feedback.
Prerequisites
- API key with
content:generate(andcontent:readto poll) - Workspace ID (
X-Workspace-Id) - Enough credits
1. Start a generation
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 launched dark mode for our app",
"post_types": ["tiktok-video", "instagram-reel"],
"research_mode": "regular"
}'You get a generation_id and status: "processing" right away. Credits for this job are deducted at start.
For image or video input, upload first with Upload Media, then pass media_ids. See Input types.
2. Wait for results
Poll
curl https://powerpost.ai/api/v1/content/generations/GENERATION_ID \
-H "x-api-key: pp_live_sk_YOUR_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_ID"Keep polling until status is completed or failed. On success, outputs is keyed by platform (YouTube uses { title, description }).
Or use webhooks
Subscribe to generation.completed / generation.failed so you don't have to poll. See Webhooks.
3. (Optional) Regenerate one platform
If one caption is off, regenerate that platform with optional feedback:
curl -X POST https://powerpost.ai/api/v1/content/generations/GENERATION_ID/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 casual and shorter"
}'Costs 1 credit. Details: Generations.
4. Use the captions
- Attach media and create a post
- Or generate visuals first: images / videos
- Then publish or schedule
Common mistakes
| Issue | Fix |
|---|---|
400 missing prompt/media | Send prompt and/or media_ids |
Wrong post_types | Use values from Post types |
402 | Top up credits |
403 INSUFFICIENT_SCOPE | Key needs content:generate |