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

# 翻訳

> Ruby SDKで/audio/translationsを呼び出します。

**メソッド**: `client.generate_translation(...)`または`client.create_translation(...)`。

### 例

```ruby theme={null}
require 'phaseo_sdk'

client = PhaseoSdk::Phaseo.new(api_key: ENV.fetch("PHASEO_API_KEY"))
translated = client.generate_translation(
  model: 'openai/gpt-4o-translate',
  audio_b64: 'base64_audio_data'
)
```

### 主なパラメーター

* `model`（必須）：翻訳に対応するモデルのID。
* `audio_url`または`audio_b64`（必須）：翻訳する音声データ。
* `prompt`：翻訳の参考となる任意のコンテキスト。
* `temperature`（0～2）：サンプリングのランダム性。
* `response_format`：`json`、`text`、`srt`、`verbose_json`など。

### 戻り値

`AudioTranscriptionResponse`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.