AI writing, exposed the way you will actually call it
One REST endpoint generates a caption from a brief. The rest of the writing toolkit, rewriting a draft for each network and repurposing a URL, lives on the FoPost MCP server, where an AI client can chain it straight into scheduling.
curl -X POST https://api.fopost.com/v1/ai/generate-caption \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "9b2f6c1e-...",
"instructions": "Announce webhook retries with exponential backoff",
"platforms": ["linkedin"],
"tone": "direct"
}'One REST endpoint
generate-caption takes a brief, a platform, and a tone, and returns ready copy.
Three MCP tools
generate_caption, rewrite_for_platforms, and repurpose_url for any MCP client.
Credit based
Every call draws from the workspace’s AI credits. Read the balance any time.
Generate a caption from your own pipeline
Send a short brief and the target network, and get back a caption written inside that network’s limits. It needs the ai scope on the key. The response is text; nothing is published until you pass it to POST /v1/posts yourself.
Read the AI reference{
"caption": "Webhook retries are live. A failed delivery now retries with exponential backoff before it ever reaches your inbox as an error. Details in the changelog.",
"credits": { "charged": 1, "remaining": 199 }
}Platform aware
Length, hashtag use, and line breaks follow the network you name.
Never auto-posts
The endpoint returns text. Publishing is a separate, explicit request.
ai scope
Grant it only on keys that should spend credits.
Rewrite and repurpose from an AI client
The MCP server exposes the full writing set. rewrite_for_platforms turns one draft into a thread for X and a paragraph for LinkedIn. repurpose_url reads a page and proposes a series of posts. Both hand their output to schedule_post in the same session, with the client asking before anything goes live.
Set up the MCP server> Take our latest changelog at https://yourbrand.com/changelog
and turn it into three posts for LinkedIn and X this week.
Agent: I'll call repurpose_url, then rewrite_for_platforms for each,
then schedule_post for Tue, Wed, and Thu at 9am. Proceed? (y/n)rewrite_for_platforms
One draft in, one version per network out, each inside its limits.
repurpose_url
Point it at a post, a changelog, or a docs page and get a series back.
Straight to schedule
The agent chains writing tools into schedule_post without leaving the chat.
Spend is visible, capped, and per workspace
Every AI call is metered against the free monthly usage credit included with every account. Read the balance over MCP with get_ai_credits, and in the dashboard under AI Usage. When the balance runs out, the call returns 402 with an upgrade link instead of silently failing.
Start building
get_ai_credits
Ask the agent how many credits are left before a big batch.
Clear 402
An exhausted balance is an explicit error, never a half-written post.
Workspace scoped
Credits and prompts stay inside the workspace the key belongs to.
AI API questions, answered
Which AI features are on the REST API?
Which model does it use?
Will it publish on its own?
How are credits charged?
Does it know my brand voice?
Which scope does the key need?
Build on the AI API today
Starting is free and the full API is included. Create a key and make your first call in minutes.
Get your API key