> ## Documentation Index
> Fetch the complete documentation index at: https://docs.realtoraai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Content

> Create captions, hooks, scripts, and hashtags for social media posts.

Generate AI-powered captions, hooks, scripts, and hashtags for social media posts.

## Endpoint

```
POST /functions/v1/generate-content
```

## Authentication

Requires a valid JWT in the Authorization header.

## Request body

| Parameter     | Type   | Description                                                   |
| ------------- | ------ | ------------------------------------------------------------- |
| `topic`       | string | The topic or listing description                              |
| `type`        | string | Content type: `caption`, `hook`, `script`                     |
| `platform`    | string | Target platform: `instagram`, `tiktok`, `facebook`, `youtube` |
| `listing_url` | string | Optional listing URL for context                              |
| `template_id` | string | Optional template to guide formatting                         |

## Response

```json theme={null}
{
  "caption": "🏡 Just Listed in Beverly Hills! ...",
  "hashtags": ["#BeverlyHills", "#LuxuryRealEstate"],
  "hook": "You won't believe this view...",
  "script": "Scene 1: Aerial shot of the property...",
  "impact_score": 85
}
```
