---
title: "Generate a caption"
method: POST
path: "/ai/captions"
tags: ["AI"]
---

# Generate a caption

`POST /ai/captions`

## Request

- Base URL: `https://post.adaptlypost.com/post/api/v1`
- URL: `https://post.adaptlypost.com/post/api/v1/ai/captions`
- Auth: HTTP bearer

Writes a caption from a prompt. Pass `platform` and the caption is held to that platform's character limit. Consumes one caption credit unless the workspace has its own provider key connected.. Requires the `ai.generate` permission.

## Headers

- `X-Workspace-Id` string

## Request body

- GenerateCaptionRequest
  - `prompt` string, required: What the caption should say or be about
  - `platform` 'TWITTER' | 'BLUESKY' | 'MASTODON' | 'THREADS' | 'PINTEREST' | 'INSTAGRAM' | 'TIKTOK' | 'LINKEDIN' | 'YOUTUBE' | 'FACEBOOK' | 'GOOGLE_BUSINESS' | 'TUMBLR': Holds the caption to this platform's character limit

## Response `201`

Generated caption

- CaptionResponse
  - `caption` string

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `402`: Insufficient credits
- `403`: The key's role does not hold `ai.generate`
- `429`: Rate limit exceeded

---

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