Refine Caption
refine_captionRewrite an existing caption following an instruction, such as "shorter", "more playful" or "add a question at the end". Returns { caption }, the rewritten text; nothing is saved or posted. Send partialText to continue from a partly written caption. Pass platform to target 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. Costs the same as generate_caption.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | How the caption should change (max 2000 characters) | |
| platform | No | Platform the caption is for; generation targets that platform's character limit; check the returned text before posting | |
| partialText | No | A partly written caption to continue from (max 10000 characters) | |
| 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 | |
| originalText | Yes | The caption to rewrite (max 10000 characters) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | An object with caption: the rewritten text. |