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

# Audio · Translations

> 将音频翻译为目标语言文本，支持多种输出格式（JSON/SRT/VTT）。

接口说明

* 路径：`POST /v1/audio/translations`（multipart/form-data）。
* 输入：音频文件（`file`），可带 `prompt`、`language`、`temperature` 等字段。
* 输出：默认 JSON；也可通过 `response_format` 指定 `text`/`srt`/`vtt`。

请求示例（cURL）

```bash theme={null}
curl -X POST "https://models.phanedge.cloud/v1/audio/translations" \
  -H "Authorization: Bearer $TOKEN" \
  -F "model=whisper-1" \
  -F "file=@sample.wav" \
  -F "response_format=srt"
```

最佳实践

* 大文件建议预处理（降采样/切片），缩短时延并提升稳定性。
* 需要纯文本可选 `response_format=text`；字幕场景推荐 `srt`/`vtt`。
* 若你已在“转写（Transcriptions）”拿到原文，可复用 `prompt` 做辅助提示，提升翻译通顺度。


## OpenAPI

````yaml POST /v1/audio/translations
openapi: 3.0.3
info:
  title: PhanEdge Core API
  version: '1.0'
  description: >-
    Core OpenAI-compatible and model-family endpoints used by the PhanEdge user
    docs.
servers:
  - url: https://models.phanedge.cloud
security:
  - BearerAuth: []
paths:
  /v1/audio/translations:
    post:
      tags:
        - OpenAI Audio
      summary: Audio translation
      requestBody:
        $ref: '#/components/requestBodies/MultipartObject'
      responses:
        '200':
          $ref: '#/components/responses/JsonObject'
components:
  requestBodies:
    MultipartObject:
      required: true
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/GenericObject'
  responses:
    JsonObject:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericObject'
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <token>'

````