---
title: "Create Translation"
method: POST
path: "/audio/translations"
tags: ["Audio"]
---

# Create Translation

`POST /audio/translations`

## Request

- Base URL: `https://gateway.obiguard.ai/v1`
- URL: `https://gateway.obiguard.ai/v1/audio/translations`
- Auth: API key in header `x-obiguard-api-key`

## Request body `multipart/form-data`

- CreateTranslationRequest
  - `file` string, binary, required: The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
  - `model` union, required: ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
    - string
    - 'whisper-1'
  - `prompt` string: An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English.
  - `response_format` string: The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
  - `temperature` number: 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](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.

## Response `200`

OK

- union
  - CreateTranslationResponseJson
    - `text` string, required
  - CreateTranslationResponseVerboseJson
    - `language` string, required: The language of the output translation (always `english`).
    - `duration` string, required: The duration of the input audio.
    - `text` string, required: The translated text.
    - `segments` TranscriptionSegment[]: Segments of the translated text and their corresponding details.
      - `id` integer, required: Unique identifier of the segment.
      - `seek` integer, required: Seek offset of the segment.
      - `start` number, float, required: Start time of the segment in seconds.
      - `end` number, float, required: End time of the segment in seconds.
      - `text` string, required: Text content of the segment.
      - `tokens` integer[], required: Array of token IDs for the text content.
      - `temperature` number, float, required: Temperature parameter used for generating the segment.
      - `avg_logprob` number, float, required: Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
      - `compression_ratio` number, float, required: Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.
      - `no_speech_prob` number, float, required: Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent.

---

[API](https://skmtc.dev/obiguard/apis/obiguard-api.md) - [All operations](https://skmtc.dev/obiguard/apis/obiguard-api/llms.txt) - [OpenAPI document](https://skmtc.dev/obiguard/apis/obiguard-api/revisions/ddd03c93e108?raw)
