Captions Audio API

The Audio API from Captions — 1 operation(s) for audio.

OpenAPI Specification

captions-audio-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Mirage Video Audio API
  description: API for AI-powered video generation
  version: 0.0.1
tags:
- name: Audio
paths:
  /v1/audio/text-to-speech/{voice_id}:
    post:
      tags:
      - Audio
      summary: Generate Speech from Text
      description: 'Generate speech from text using the specified voice and model.


        This endpoint synchronously generates audio and returns the binary data directly.

        The request will block until the TTS generation is complete.'
      operationId: generate_text_to_speech_v1_audio_text_to_speech__voice_id__post
      parameters:
      - name: voice_id
        in: path
        required: true
        schema:
          type: string
          description: Voice ID to use for TTS generation
          title: Voice Id
        description: Voice ID to use for TTS generation
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: API Key for authentication
          title: X-Api-Key
        description: API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TTSRequest'
      responses:
        '200':
          description: Returns the generated audio file as binary data
          content:
            application/json:
              schema: {}
            audio/wav: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TTSRequest:
      properties:
        text:
          type: string
          title: Text
          description: The text to convert to speech
          examples:
          - Hello, welcome to Mirage!
        model:
          type: string
          const: mirage-audio-1
          title: Model
          description: TTS model to use for generation
          examples:
          - mirage-audio-1
      type: object
      required:
      - text
      - model
      title: TTSRequest
      description: Request body for text-to-speech generation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError