AI
What an API key can do with AI, and where the rest of the AI features live.
Most AI in FoPost runs inside the dashboard and the FoPost Agent, where a person is in the loop. Two endpoints are reachable with an API key, both under the ai scope.
The ai scope is deliberately separate from every other scope, because it is the only one that spends money. A key that can publish cannot generate unless you also grant ai.
Generate a caption
POST /v1/ai/generate-captioncurl -X POST https://api.fopost.com/v1/ai/generate-caption \
-H "X-API-Key: $FOPOST_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "content": "Notes from our launch week retro" }'Writes or improves a caption. It is billed as AI usage and deducted from your prepaid balance as it runs.
Usage balance
GET /v1/ai/creditsYour prepaid balance, whether auto-reload is on, how much of the free monthly credit is left on account fees, what AI has spent this month, and whether a payment method is on file. Read it before a batch job so you fail early instead of halfway through.
Running out
An AI call answers 402 when the prepaid balance cannot cover it (and auto-reload is off or capped), or when your own AI spend cap for the month is reached. It is not a rate limit, so do not retry it with backoff. Add funds or turn on auto-reload (or raise the cap), or degrade to publishing without generation.
Funds never expire and the free credit on account fees refreshes monthly. See Pricing and Billing.
Everything else
Rewriting for each platform, hashtags, turning a URL into posts, voice notes, alt text, and image and video generation are dashboard and agent features and are not exposed to API keys. They are documented in the guide, not here.
Next
Related documentation
- API Overview
Base URL, envelopes, pagination, and errors for the FoPost REST API.
- Authentication
API keys, scopes, and workspace binding.
- Publishing
Create a post, target accounts, publish it, and read the per-account result.
- Scheduling
Schedule a post, repeat it, and import a batch from a spreadsheet.
- Media
Upload files, list the media library, and attach media to a post.
- Validation
Check content, text length, and media against platform rules before a post exists.
- Accounts
List connected social accounts, check their health, and refresh credentials.
- Workspaces
Workspaces, labels, and how isolation works across them.