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

# Gradium TTS default

> Real-time multilingual text-to-speech with streaming WebSocket and one-shot HTTP synthesis

export const HostingBanner = ({type = "slng", provider, regions = []}) => {
  const isSlng = type === "slng";
  const regionLabel = regions.map(r => r.toUpperCase()).join(", ");
  return <div className={`hosting-banner ${isSlng ? "hosting-banner--slng" : "hosting-banner--thirdparty"}`}>
      <span className="hosting-banner__label">
        {isSlng ? "SLNG Sovereign Hosting" : `3rd Party API Hosted by ${provider}`}
      </span>
      <span className="hosting-banner__text">
        {isSlng ? <>
            On demand in: {regionLabel}.{" "}
            <a href="mailto:support@slng.ai">Request here</a> if you want access
            in any other of our 11 regions.
          </> : <>
            For SLNG Sovereign Hosting in any of our 11 regions{" "}
            <a href="mailto:support@slng.ai">contact us</a>.
          </>}
      </span>
    </div>;
};

<HostingBanner type="thirdparty" provider="Gradium" />


## OpenAPI

````yaml POST /v1/tts/gradium/tts:default
openapi: 3.0.3
info:
  title: SLNG Gateway API - Gradium TTS
  version: 0.1.0
  description: >-
    Real-time multilingual text-to-speech with streaming WebSocket and one-shot
    HTTP synthesis
  contact:
    name: SLNG Support
    email: support@slng.ai
servers:
  - url: https://api.slng.ai
    description: Production
  - url: https://stageapi.slng.ai
    description: Staging
security:
  - BearerAuth: []
paths:
  /v1/tts/gradium/tts:default:
    post:
      tags:
        - Gradium TTS
      summary: Gradium TTS default
      description: >-
        Real-time multilingual text-to-speech with streaming WebSocket and
        one-shot HTTP synthesis
      operationId: gradium/tts:default
      parameters:
        - $ref: '#/components/parameters/XRegionOverride'
      requestBody:
        $ref: '#/components/requestBodies/GradiumTtsDefaultRequestBody'
      responses:
        '200':
          description: Success
        '400':
          $ref: '#/components/responses/ProviderBadRequest'
        '401':
          $ref: '#/components/responses/ProviderUnauthorized'
        '500':
          $ref: '#/components/responses/ProviderInternalServerError'
        '503':
          $ref: '#/components/responses/ProviderServiceUnavailable'
components:
  parameters:
    XRegionOverride:
      name: x-region
      in: header
      required: false
      description: Override the default region for this request.
      schema:
        type: string
  requestBodies:
    GradiumTtsDefaultRequestBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GradiumTtsDefaultRequest'
          examples:
            example1:
              summary: Basic synthesis
              value:
                text: Hello, this is a test of Gradium text to speech.
                voice_id: YTpq7expH9539ERJ
                output_format: wav
  responses:
    ProviderBadRequest:
      description: Bad request — invalid parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    ProviderUnauthorized:
      description: Unauthorized — invalid or missing API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    ProviderInternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    ProviderServiceUnavailable:
      description: Service temporarily unavailable.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  schemas:
    GradiumTtsDefaultRequest:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          description: Text to synthesize.
        voice_id:
          type: string
          description: Voice ID from the Gradium voice library or a custom voice ID.
        output_format:
          type: string
          description: Output audio format.
          enum:
            - wav
            - pcm
            - pcm_8000
            - pcm_16000
            - pcm_24000
            - opus
            - ulaw_8000
            - alaw_8000
          default: wav
        encoding:
          type: string
          description: SLNG normalized output audio encoding (WebSocket streaming).
          default: wav
          enum:
            - wav
            - linear16
            - pcm
            - opus
            - mulaw
            - alaw
        language:
          type: string
          description: Language hint for synthesis.
          default: en
          enum:
            - en
            - fr
            - de
            - es
            - pt
        temperature:
          type: number
          description: Sampling temperature (stability). Lower is more stable.
          minimum: 0
          maximum: 1.4
        only_audio:
          type: boolean
          description: >-
            HTTP only. When true, returns raw audio bytes instead of a JSON
            message stream.
          default: true
      required:
        - text
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````