Audio

Create translation

Changed on

Translate audio input into English text using the configured translation model and return the result.

post/v2/router/audio/translations

Request

  • Base URL
    https://my.orq.ai
  • URL
    https://my.orq.ai/v2/router/audio/translations
  • Auth
    HTTP bearer

Request body multipart/form-data

modelstring required

ID of the model to use

promptstring

An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.

enable_loggingboolean

When enable_logging is set to false, zero retention mode is used. This disables history features like request stitching and is only available to enterprise customers.

diarizeboolean

Whether to annotate which speaker is currently talking in the uploaded file.

response_format'json' | 'text' | 'srt' | 'verbose_json' | 'vtt'

The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.

tag_audio_eventsboolean

Whether to tag audio events like (laughter), (footsteps), etc. in the transcription.

num_speakersnumber

The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.

timestamps_granularity'none' | 'word' | 'character'

The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.

temperaturenumber

The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.

namestring

The name to display on the trace. If not specified, the default system name will be used.

fallback_on_codesinteger[]

HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].

filestring binary

The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

Example request

{
  "model": "openai/whisper-1",
  "temperature": 0.5,
  "retry": {
    "count": 3,
    "on_codes": [
      429,
      500,
      502,
      503,
      504
    ]
  },
  "load_balancer": {
    "models": [
      {
        "model": "openai/gpt-5.6-sol",
        "weight": 0.7
      }
    ]
  },
  "timeout": {
    "call_timeout": 30000
  },
  "orq": {
    "fallbacks": [
      {
        "model": "openai/gpt-5.4-mini"
      }
    ],
    "retry": {
      "count": 3,
      "on_codes": [
        429,
        500,
        502,
        503,
        504
      ]
    },
    "identity": {
      "id": "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "display_name": "Jane Doe",
      "email": "jane.doe@example.com",
      "metadata": [
        {
          "department": "Engineering",
          "role": "Senior Developer"
        }
      ],
      "logo_url": "https://example.com/avatars/jane-doe.jpg",
      "tags": [
        "hr",
        "engineering"
      ]
    },
    "contact": {
      "id": "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "display_name": "Jane Doe",
      "email": "jane.doe@example.com",
      "metadata": [
        {
          "department": "Engineering",
          "role": "Senior Developer"
        }
      ],
      "logo_url": "https://example.com/avatars/jane-doe.jpg",
      "tags": [
        "hr",
        "engineering"
      ]
    },
    "load_balancer": {
      "type": "weight_based",
      "models": [
        {
          "model": "openai/gpt-4o",
          "weight": 0.7
        },
        {
          "model": "anthropic/claude-3-5-sonnet",
          "weight": 0.3
        }
      ]
    },
    "timeout": {
      "call_timeout": 30000
    }
  }
}

Response

Returns the translated text

OR
OR
string required

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property /

    • warning

      removed the request property

    • warning

      removed the request property /