---
title: "Generate post copy with AI"
method: POST
path: "/api/generate_content_with_ai"
---

# Generate post copy with AI

`POST /api/generate_content_with_ai`

## Request

- Base URL: `https://social.recurpost.com`
- URL: `https://social.recurpost.com/api/generate_content_with_ai`
- Auth: none declared

Generates social media post text from a prompt. Supports multi-turn refinement: pass back ai_id and chat_progress from the previous response to continue the conversation.

## Request body

- GenerateContentRequest
  - `emailid` string, email, required: RecurPost account email address
  - `pass_key` string, required: API Password Key from Account Settings (NOT the login password)
  - `prompt_text` string, required: Topic or instruction to generate content about
  - `ai_id` string: AI session ID from a previous response, to continue the conversation
  - `chat_progress` string: Progress marker from a previous response
  - `chat_history` object[]: Previous conversation messages with roles (user/assistant) and content

## Response `200`

Request completed successfully

- object

## Other responses

- `400`: Missing or invalid parameters
- `401`: Invalid emailid or pass_key

---

[API](https://skmtc.dev/recurpost/apis/recurpost-public-api.md) - [All operations](https://skmtc.dev/recurpost/apis/recurpost-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/recurpost/apis/recurpost-public-api/revisions/c8e270a283a1?raw)
