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

# Speech

> Generate speech from up to 1,500 characters. Returns audio bytes, or server-sent events with `stream`.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/audio/speech
openapi: 3.1.0
info:
  description: ''
  title: Vocalistic API
  version: 1.0.0
servers:
  - url: https://api.vocalistic.ai
security: []
paths:
  /v1/audio/speech:
    post:
      tags:
        - Audio
      summary: Speech
      description: >-
        Generate speech from up to 1,500 characters. Returns audio bytes, or
        server-sent events with `stream`.
      operationId: speech_v1_audio_speech_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeechRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '400':
          description: >-
            `invalid_text` above 1,500 characters, or an unknown voice, language
            or format.
        '402':
          description: Not enough credits.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '503':
          description: >-
            The models are busy or unavailable. Nothing is charged. Try again
            shortly.
components:
  schemas:
    SpeechRequest:
      properties:
        format:
          anyOf:
            - enum:
                - wav
                - pcm
              type: string
            - type: 'null'
          title: Format
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        stream:
          default: false
          title: Stream
          type: boolean
        text:
          title: Text
          type: string
        voice:
          title: Voice
          type: string
      required:
        - text
        - voice
      title: SpeechRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.