generate_content_with_ai
Generates social media post copy from a prompt and lets you refine the last AI response with follow-up instructions; each generation uses an AI post credit.
Instructions
Write social media post text with RecurPost AI from a prompt. Spends one of the workspace owner's AI post credits (see ai_credits). To refine the last answer, send the new instruction as prompt_text together with ai_id, chat_progress and chat_history exactly as the previous answer returned them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt_text": "<prompt_text>"
},
"name": "generate_content_with_ai"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ai_id | No | Encrypted chat id returned by the previous call. Send it to continue that chat; leave it out to start a new one. Must be a chat of the workspace owner's account. Requires chat_progress and chat_history. | |
| prompt_text | Yes | What to write, up to 5000 characters. On a follow-up call this is the refinement instruction, for example Make it shorter and add emojis. | |
| chat_history | No | The chat_history array of the previous response, unchanged: objects with role (user or system) and content. A JSON body array or a JSON string. Required with ai_id. Do not append your new prompt yourself. | |
| workspace_id | No | Workspace to act in (ws_id from workspace_list). Omit to use your default workspace. | |
| chat_progress | No | Encrypted progress marker returned by the previous call. It is a check value on chat_history: the history you send must be the one the marker was issued for. Required with ai_id. |