---
title: "Generate platform captions from a prompt"
method: POST
path: "/api/ai/generate"
tags: ["AI"]
---

# Generate platform captions from a prompt

`POST /api/ai/generate`

## Request

- Base URL: `https://www.fuxux.com`
- URL: `https://www.fuxux.com/api/ai/generate`
- Auth: none declared

Enforces the plan's AI limits: a monthly number on Free, and fair-use limits per day and per month on paid plans. When a limit is reached the response is **429** with `code: "ai_limit"` and an `ai_limit` object (`reason`, `used`, `limit`, `resetsAt`). Valid platform ids: `twitter`, `instagram`, `linkedin`, `facebook`, `tiktok`, `youtube`, `bluesky`, `threads`, `pinterest`, `discord`, `twitch`, `kick`, `google-business`. Reddit is not available here. Ids that are not recognised are ignored; repeated ids count once.

## Request body

- object
  - `prompt` string, required
  - `platforms` string[], required: Platforms to generate in one call
  - `regenerate` string: If set, only this platform id is regenerated; `platforms` is ignored for selection.

## Response `200`

OK

- AiCaptionsResponse
  - `captions` object: Platform id → generated caption

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `429`: User rate limit or monthly AI cap
- `500`: Misconfiguration
- `502`: Upstream model error

---

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