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

# Synthesize



## OpenAPI

````yaml https://api.somya.ai/openapi.json post /v1/speech/synthesize
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/speech/synthesize:
    post:
      tags:
        - tts
      summary: Synthesize
      operationId: synthesize_v1_speech_synthesize_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TTSSynthesizeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/x-ndjson: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TTSSynthesizeRequest:
      properties:
        text:
          type: string
          maxLength: 2500
          minLength: 1
          title: Text
        voice:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice
        ref_audio:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref Audio
      type: object
      required:
        - text
      title: TTSSynthesizeRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````