Sonix Translations API

Translate a completed transcript into another language.

OpenAPI Specification

sonix-translations-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Sonix AI Analysis Translations API
  description: The Sonix API lets you programmatically upload audio and video media for automated transcription, retrieve the resulting transcripts, export subtitles and captions (SRT, VTT, TXT, JSON, DOCX, PDF), translate transcripts into other languages, and run AI analysis (summaries, chapters, sentiment, entities). Sonix transcribes in 54+ languages and translates into 55+ languages. The API is available to Sonix subscribers; trial accounts can request an API key from Sonix support. All requests are authorized with a Bearer API key. This description was modeled by API Evangelist from Sonix's public API documentation at https://sonix.ai/docs/api; request and response schemas are honestly modeled where the public docs do not enumerate every field.
  version: '1.0'
  contact:
    name: Sonix
    url: https://sonix.ai
  x-modeled-by: API Evangelist
  x-source: https://sonix.ai/docs/api
servers:
- url: https://api.sonix.ai/v1
  description: Sonix API v1
security:
- bearerAuth: []
tags:
- name: Translations
  description: Translate a completed transcript into another language.
paths:
  /media/{id}/translations:
    parameters:
    - $ref: '#/components/parameters/MediaId'
    post:
      operationId: createTranslation
      tags:
      - Translations
      summary: Create translation
      description: Translates a completed transcript into a target language. Sonix translates into 55+ languages.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - language
              properties:
                language:
                  type: string
                  description: Target language code (e.g. es, fr, de, ja).
      responses:
        '200':
          description: The created translation job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /media/{id}/translations/{language}:
    parameters:
    - $ref: '#/components/parameters/MediaId'
    - name: language
      in: path
      required: true
      schema:
        type: string
      description: Target language code of the translation to check.
    get:
      operationId: getTranslation
      tags:
      - Translations
      summary: Check translation status
      description: Retrieves the status of a translation for the given target language.
      responses:
        '200':
          description: The translation job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Job:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        url:
          type: string
          description: Download URL for the job output when available.
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    MediaId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: The unique identifier of the media file.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Sonix API key passed as `Authorization: Bearer <API Key>`. Subscribers find their key at https://my.sonix.ai/api; trial accounts request one from Sonix support.'