POST/ai/generate-caption
Generate social media captions with the PostEverywhere API
Generates 1-5 captions for a topic, styled per platform/tone/length. Costs 1 AI credit per caption returned; credits are reserved atomically before generation and refunded for captions that fail. `402 insufficient_credits` when the plan's monthly credit budget (plus bonus credits) cannot cover the request; `502 ai_no_content` when the model returns nothing. Unknown platform/tone/length values silently fall back to defaults. Every caption fits the platform's character limit, counted the way the platform counts (X weighted length, Bluesky graphemes): X 280, Bluesky 300, Threads 500, Pinterest 500, Google Business Profile 1500, Instagram and TikTok 2200, LinkedIn 3000, Facebook 5000, YouTube 5000 (the description). A caption the model writes too long is cut at a word break; `char_limit` gives the limit used and `trimmed_to_fit` how many captions were cut.
Guides: AI caption guide · Brand Kit API guide
This endpoint accepts a JSON request body. See the ai guide for a worked example.
Responses
- 200Captions generated
- 400
- 401
- 402
- 403
- 404
- 429
- 500
- 502AI model returned no content (credits refunded)