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

# Generate Caption

> Generate a short caption from a topic. Returns the text content and default styling (font, color, size).



## OpenAPI

````yaml api-reference/openapi/content.json POST /api/content/caption
openapi: 3.1.0
info:
  title: Recoup API - Content
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/content/caption:
    post:
      description: >-
        Generate a short caption from a topic. Returns the text content and
        default styling (font, color, size).
      requestBody:
        description: Text generation parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentCreateTextRequest'
      responses:
        '200':
          description: Text generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentCreateTextResponse'
        '400':
          description: Validation failed — invalid or missing request body fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    ContentCreateTextRequest:
      type: object
      required:
        - topic
      properties:
        template:
          type: string
          description: >-
            Optional template ID. When provided, injects the template's caption
            guide (tone, rules, formats) and examples into the LLM prompt.
            Caller's topic is still required. See [GET
            /api/content/templates](/api-reference/content/templates) for
            available options.
        topic:
          type: string
          description: The subject or theme for caption generation
        length:
          type: string
          enum:
            - short
            - medium
            - long
          default: short
          description: Desired text length
    ContentCreateTextResponse:
      type: object
      required:
        - content
        - color
        - borderColor
        - maxFontSize
      properties:
        content:
          type: string
          description: Generated on-screen text content
        font:
          type:
            - string
            - 'null'
          description: Font name for the text, or null for default
        color:
          type: string
          description: Text color as a CSS color value
          example: white
        borderColor:
          type: string
          description: Text border/stroke color as a CSS color value
          example: black
        maxFontSize:
          type: number
          description: Maximum font size in pixels
          example: 42
    ContentErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````