Generate Caption
generate_captionWrite a new social media caption from a prompt with AdaptlyPost AI. Returns { caption }, text only; nothing is saved or posted, so pass the caption to create_post, update_post or bulk_schedule_posts yourself. Pass platform and generation targets that platform's character limit; check the returned text before posting. Needs the ai.generate permission, which Admin, Editor and Contributor hold and Viewer does not (403 permission_denied). Each call spends 2 of the member's AI credits (the member who signed in or created the key), refunded if generation fails, unless the member has their own AI provider key connected in AdaptlyPost. With no credits left the call fails: explain that generation is unavailable with the current credit balance and do not retry automatically. To rework a caption you already have, use refine_caption instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | What the caption should say or be about, including tone, audience, hashtags or a call to action (max 2000 characters) | |
| platform | No | Platform the caption is for; generation targets that platform's character limit; check the returned text before posting. Omit for a general caption | |
| workspaceId | No | Workspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | An object with caption: the generated text. |