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

# Generate podcast

> Generates natural-sounding, engaging podcast between two speakers.



## OpenAPI

````yaml POST /v1/generate_podcast
openapi: 3.1.0
info:
  title: OpenAPI Contextlm
  description: ContextLM API endpoints
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.contextlm.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/generate_podcast:
    post:
      description: Generates natural-sounding, engaging podcast between two speakers.
      requestBody:
        description: Podcast synthesis parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratePodcast'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechResponse'
        '400':
          description: Bad request. Occurs when parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechError'
        '401':
          description: Unauthorized. Occurs when API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechError'
        '403':
          description: >-
            Forbidden. Occurs when API key is valid but user does not have
            permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechError'
        '404':
          description: Not found. Occurs when requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSpeechError'
components:
  schemas:
    GeneratePodcast:
      allOf:
        - required:
            - dialogues
            - host
            - guest
          type: object
          properties:
            dialogues:
              description: >-
                The text input to be converted to podcast. Must be an
                alternating list of text and role.
              type: array
              items:
                type: object
                properties:
                  role:
                    description: The role of the speaker
                    type: string
                    enum:
                      - host
                      - guest
                  content:
                    description: The text input to be converted to speech
                    type: string
            host:
              description: The voice id to use in podcast synthesis
              type: string
            guest:
              description: The voice id to use in podcast synthesis
              type: string
    GenerateSpeechResponse:
      type: object
      properties:
        audiobytes:
          type: string
          format: binary
    GenerateSpeechError:
      type: object
      properties:
        error:
          type: integer
          format: int32
        detail:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````