---
title: "Create a translation"
description: "Turns speech in any language into English text. Takes the same form as a transcription, without `language`. Served by OpenAI and Groq. MiniMax, Qwen, Gemini and Meta refuse a translation with `400`."
---

<a id="playground-button:docs/apis/gateway/create-translation"></a>

**POST** `https://gateway.respan.ai/v1/audio/translations`

Turns speech in any language into English text. Takes the same form as a transcription, without `language`. Served by OpenAI and Groq. MiniMax, Qwen, Gemini and Meta refuse a translation with `400`.

## Servers

`https://gateway.respan.ai`: Respan gateway

## Authentication

### RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer &lt;RESPAN_API_KEY&gt;. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -&gt; Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: `bearer`; format: `Respan API key`.


```http
Authorization: Bearer $RESPAN_API_KEY
```


## Headers


| Parameter | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `X-Data-Respan-Params` | `string` | Optional | Base64-encoded JSON object of Respan request parameters. |


## Request body

A request body is required.

### multipart/form-data


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Required body | - |
| `model` | `string` | Required in parent | The model, such as `whisper-1`. |
| `file` | `string` | Required in parent | The audio to translate.<br />Format: `binary` |
| `prompt` | `string` | Optional | Text to guide the model. |
| `temperature` | `number` | Optional | Sampling temperature. |
| `response_format` | `string` | Optional | `json` by default.<br />Allowed: `"json"`, `"verbose_json"`, `"text"`, `"srt"`, `"vtt"` |


<details class="api-schema-source">
<summary>OpenAPI request schema</summary>


```json
{
  "type": "object",
  "required": [
    "model",
    "file"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "The model, such as `whisper-1`."
    },
    "file": {
      "type": "string",
      "description": "The audio to translate.",
      "format": "binary"
    },
    "prompt": {
      "type": "string",
      "description": "Text to guide the model."
    },
    "temperature": {
      "type": "number",
      "description": "Sampling temperature."
    },
    "response_format": {
      "type": "string",
      "description": "`json` by default.",
      "enum": [
        "json",
        "verbose_json",
        "text",
        "srt",
        "vtt"
      ]
    }
  }
}
```

</details>

## Responses

### 200

The English text, as JSON or as text.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | Additional properties are allowed |
| `text` | `string` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
```

</details>

#### text/plain


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `string` | Body | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "string"
}
```

</details>

### 400

The request is malformed, or a field is one the provider cannot take. Fields refused before the call say which one.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | Additional properties are allowed |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "additionalProperties": true
}
```

</details>

### 403

The API key is missing, invalid or expired.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | - |
| `detail` | `string` | Required in parent | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
```


### 429

A rate limit or usage limit was reached. Retry with exponential backoff.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | Additional properties are allowed |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "additionalProperties": true
}
```

</details>

## OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

<!-- openapi-operation:start -->
<details class="api-schema-source">
<summary>OpenAPI operation</summary>


```json
{
  "summary": "Create a translation",
  "operationId": "createTranslation",
  "tags": [
    "Gateway"
  ],
  "servers": [
    {
      "url": "https://gateway.respan.ai",
      "description": "Respan gateway"
    }
  ],
  "description": "Turns speech in any language into English text. Takes the same form as a transcription, without `language`. Served by OpenAI and Groq. MiniMax, Qwen, Gemini and Meta refuse a translation with `400`.",
  "security": [
    {
      "RespanApiKey": []
    }
  ],
  "parameters": [
    {
      "name": "X-Data-Respan-Params",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string"
      },
      "description": "Base64-encoded JSON object of Respan request parameters."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "multipart/form-data": {
        "schema": {
          "type": "object",
          "required": [
            "model",
            "file"
          ],
          "properties": {
            "model": {
              "type": "string",
              "description": "The model, such as `whisper-1`."
            },
            "file": {
              "type": "string",
              "description": "The audio to translate.",
              "format": "binary"
            },
            "prompt": {
              "type": "string",
              "description": "Text to guide the model."
            },
            "temperature": {
              "type": "number",
              "description": "Sampling temperature."
            },
            "response_format": {
              "type": "string",
              "description": "`json` by default.",
              "enum": [
                "json",
                "verbose_json",
                "text",
                "srt",
                "vtt"
              ]
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "The English text, as JSON or as text.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "text/plain": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "description": "The request is malformed, or a field is one the provider cannot take. Fields refused before the call say which one.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    },
    "429": {
      "description": "A rate limit or usage limit was reached. Retry with exponential backoff.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  }
}
```

</details>
<!-- openapi-operation:end -->

<!-- openapi-path-item:start -->
<details class="api-schema-source">
<summary>OpenAPI path metadata</summary>


```json
{}
```

</details>
<!-- openapi-path-item:end -->

<!-- openapi-components:start -->
<details class="api-schema-source">
<summary>Referenced OpenAPI components</summary>


```json
{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}
```

</details>
<!-- openapi-components:end -->
