SLNG Rime Coda API

Rime Coda TTS for Bahasa Indonesian.

OpenAPI Specification

slng-rime-coda-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: SLNG Voice Agents Account Rime Coda API
  version: 1.0.0
  description: 'Public API for managing Voice Agents, dispatching outbound calls, and creating web (non-telephony) sessions.


    Base URL: `https://api.agents.slng.ai`

    '
  contact:
    name: SLNG Support
    email: support@slng.ai
servers:
- url: https://api.agents.slng.ai
  description: Production
security:
- bearerAuth: []
tags:
- name: Rime Coda
  description: Rime Coda TTS for Bahasa Indonesian.
paths:
  /v1/tts/slng/rime/coda:0-id:
    post:
      operationId: rime/coda:0-id
      summary: Coda (Indonesian)
      description: Synthesize Bahasa Indonesian speech using Rime Coda TTS model.
      tags:
      - Rime Coda
      parameters:
      - $ref: '#/components/parameters/XRegionSlngCoda0Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RimeCoda0IdTtsRequestId'
            examples:
              basic:
                summary: Basic Indonesian synthesis
                value:
                  text: Halo dari Rime Coda Indonesia. Pengujian sintesis teks ke ucapan.
                  speaker: pujianti_plesmita
      responses:
        '200':
          $ref: '#/components/responses/TtsSynthesisSuccess'
        '400':
          $ref: '#/components/responses/RimeCodaBadRequest'
        '401':
          $ref: '#/components/responses/ProviderUnauthorized'
        '500':
          $ref: '#/components/responses/RimeCodaInternalServerError'
        '503':
          $ref: '#/components/responses/ProviderServiceUnavailable'
components:
  schemas:
    RimeCoda0IdSpeaker:
      type: string
      description: Voice speaker ID for Rime Coda Indonesian.
      default: pujianti_plesmita
      enum:
      - pujianti_plesmita
      - siswoko_sigit
      - taryadi_dani
      - usmany_tatianna
    ProviderErrorResponse:
      type: object
      description: 'Provider error response. Contains error information from the upstream provider.

        Common errors include invalid speakers, unsupported languages, or malformed requests.

        '
      properties:
        error:
          type: string
          description: Error type or category (e.g., "TTS service error", "Validation error").
          example: TTS service error
        status:
          type: number
          description: Original HTTP status code from the provider (may differ from gateway response code).
          example: 400
        details:
          type: string
          description: 'Detailed error message from the provider. For TTS errors, this typically includes

            the specific validation failure (e.g., invalid speaker ID for the selected model/language).

            '
          example: 'Rime TTS API error: 400 Bad Request - Invalid argument: Invalid speaker: aurelie'
      required:
      - error
    RimeCoda0IdTtsRequestId:
      description: Rime Coda TTS request for Bahasa Indonesian.
      allOf:
      - $ref: '#/components/schemas/RimeCoda0IdTtsRequestBase'
    RimeArcanaAudioFormat:
      type: string
      description: Output audio format as MIME type.
      enum:
      - audio/webm;codecs=opus
      - audio/ogg;codecs=opus
      - audio/mp3
      - audio/wav
      - audio/pcm
      - audio/x-mulaw
      default: audio/wav
    RimeCodaModelId:
      type: string
      description: Rime Coda model identifier.
      enum:
      - coda
      default: coda
    RimeArcanaSampleRate:
      type: integer
      description: Output sample rate in Hz. Values above 24000 are upsampled.
      default: 24000
      enum:
      - 8000
      - 16000
      - 22050
      - 24000
      - 44100
      - 48000
      - 96000
    RimeCodaLanguage:
      type: string
      description: Language code. Coda Indonesian variant only supports Bahasa Indonesian.
      enum:
      - id
      default: id
    RimeCoda0IdTtsRequestBase:
      description: Base schema for Rime Coda Indonesian TTS requests.
      allOf:
      - type: object
        required:
        - speaker
        properties:
          speaker:
            $ref: '#/components/schemas/RimeCoda0IdSpeaker'
      - $ref: '#/components/schemas/RimeCodaTtsRequestCommon'
    AudioBinary:
      type: string
      format: binary
      description: Binary audio data.
    RimeCodaTtsRequestCommon:
      type: object
      description: Common Rime Coda TTS options.
      properties:
        text:
          type: string
          minLength: 1
          description: Text to synthesize.
        modelId:
          $ref: '#/components/schemas/RimeCodaModelId'
        lang:
          $ref: '#/components/schemas/RimeCodaLanguage'
        top_p:
          type: number
          format: float
          default: 1
          description: The top p. Float that controls the cumulative probability of the top tokens to consider. Must be in (0, 1]. Set to 1 to consider all tokens.
        audioFormat:
          $ref: '#/components/schemas/RimeArcanaAudioFormat'
        sample_rate:
          $ref: '#/components/schemas/RimeArcanaSampleRate'
        speed:
          type: number
          description: Speech rate multiplier (0.25 = half speed, 2.0 = double speed).
          minimum: 0.25
          maximum: 2
          default: 1
        segment:
          type: boolean
          default: false
          description: Enable segment markers in output.
      required:
      - text
  parameters:
    XRegionSlngCoda0Id:
      name: X-Region-Override
      in: header
      required: false
      description: Target region override. Auto-selected if not provided.
      schema:
        type: string
        enum:
        - asia-southeast2
  responses:
    ProviderUnauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderErrorResponse'
    RimeCodaBadRequest:
      description: 'Rime Coda TTS bad request. Common causes include invalid speaker ID, unsupported audio format, or malformed request body.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderErrorResponse'
          examples:
            invalid-speaker:
              summary: Invalid speaker ID
              value:
                error: TTS service error
                details: 'Rime TTS API error: 400 Bad Request - Invalid argument: Invalid speaker'
            missing-text:
              summary: Missing text field
              value:
                error: Validation error
                details: 'Missing required field: text'
    TtsSynthesisSuccess:
      description: Synthesis successful.
      content:
        audio/*:
          schema:
            $ref: '#/components/schemas/AudioBinary'
    RimeCodaInternalServerError:
      description: 'Rime Coda TTS internal error. Note: Some validation errors (e.g., invalid speaker) may currently return 500 instead of 400. Check the error details for specifics.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderErrorResponse'
          examples:
            processing-error:
              summary: Processing error
              value:
                error: TTS service error
                details: Internal processing error
    ProviderServiceUnavailable:
      description: Service unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key