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

# Translate audio to English text



## OpenAPI

````yaml /api-reference/openapi.json post /v1/audio/translations
openapi: 3.1.0
info:
  title: SynapsAI Inference API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/audio/translations:
    post:
      summary: Translate audio to English text
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model:
                  type: string
                file:
                  oneOf:
                    - type: string
                      format: binary
                    - type: string
                language:
                  type: string
                prompt:
                  type: string
                  maxLength: 244
                response_format:
                  type: string
                  enum:
                    - json
                    - text
                    - str
                    - verbose_json
                    - vtt
                  default: json
                temperature:
                  type: number
                  default: 0
                  minimum: 0
                  maximum: 1
                stream:
                  type: boolean
                  default: false
                seed:
                  type: integer
                top_p:
                  type: number
                  minimum: 0
                  maximum: 1
                top_k:
                  type: integer
                  minimum: 1
                'n':
                  type: integer
                  minimum: 1
                frequency_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                presence_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                max_completion_tokens:
                  type: integer
                  minimum: 1
                to_language:
                  type: string
                repetition_penalty:
                  type: number
              required:
                - model
                - file
          application/json:
            schema:
              $ref: '#/components/schemas/AudioTranslationsRequest'
      responses:
        '200':
          description: Translation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                  language:
                    type: string
                  duration:
                    type: number
                  timestamps:
                    type: object
                    additionalProperties: true
components:
  schemas:
    AudioTranslationsRequest:
      allOf:
        - type: object
          description: Request for audio translation endpoint.
          properties:
            model:
              type: string
              description: Model identifier for translation. Required.
            file:
              oneOf:
                - type: string
                - type: string
                  format: binary
              description: >-
                Path, URL, base64 string or binary upload of the audio file to
                translate. Required.
            language:
              type: string
              nullable: true
              description: Source language ISO-639-1 code (auto-detected if not specified).
            prompt:
              type: string
              maxLength: 244
              nullable: true
              description: Optional prompt to guide translation.
            response_format:
              type: string
              enum:
                - json
                - text
                - str
                - verbose_json
                - vtt
              default: json
              description: Output format for the translation.
            temperature:
              type: number
              default: 0
              minimum: 0
              maximum: 1
              description: Controls randomness in translation generation.
            stream:
              type: boolean
              default: false
              description: Enable real-time streaming of translation chunks.
            seed:
              type: integer
              nullable: true
              description: Random seed for reproducible results.
            top_p:
              type: number
              nullable: true
              minimum: 0
              maximum: 1
              description: Nucleus sampling parameter.
            top_k:
              type: integer
              nullable: true
              minimum: 1
              description: Top-k sampling parameter.
            'n':
              type: integer
              nullable: true
              minimum: 1
              description: Number of translations to generate.
            frequency_penalty:
              type: number
              nullable: true
              minimum: -2
              maximum: 2
              description: Penalize frequent tokens.
            presence_penalty:
              type: number
              nullable: true
              minimum: -2
              maximum: 2
              description: Penalize repeated tokens.
            max_completion_tokens:
              type: integer
              nullable: true
              minimum: 1
              description: Maximum tokens in translation.
            to_language:
              type: string
              nullable: true
              description: >-
                Optional language hint for transcription (ISO code). Defaults to
                'en'.
            repetition_penalty:
              type: number
              nullable: true
              description: Additional repetition control.
          required:
            - model
            - file

````