Docs
Docs
/v1/generations · Generations
Generations API
Generate posts with the same engine as the XBeast app. Generation saves a history post, so nothing is scheduled or published until you call the posts endpoints. Every call consumes credits.
Full-access keys only
Read-only keys cannot generate. Check remaining credits with GET /api/v1/workspace or GET /api/v1/credits.
Generate text
POST
/api/v1/generations/textBody
Generate a thread from a topic
curl -X POST "https://xbeast.io/api/v1/generations/text" \
-H "Authorization: Bearer xb_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "ai",
"format": "thread",
"prompt": "5 lessons from shipping a micro-SaaS",
"media_type": "off"
}'Response:
{ data: { post, tweets, article_title, credits_used } }. Use post.id with POST /api/v1/posts/:id/queue or PATCH /api/v1/posts/:id to schedule it.Beast Mode
POST
/api/v1/generations/beast-modeOne tweet built from the account's profile and recent history. Body:
account_id (required) and optional prompt. Costs 1 credit.Chat-edit tweets
POST
/api/v1/generations/chatBody
Returns the assistant response, annotations, edited
tweets, media results and credits_used. Sent posts cannot be edited.Credits
- Text generation costs 1–10 credits depending on the source, format and media.
- Beast Mode costs 1 credit.
- Chat editing costs at least 1 credit, plus extra for edits and media.
- GET /api/v1/workspace shows available credits and the reset date.