リファレンス: リアルタイム (Qwen-Omni-Realtime)。
error
サーバーから返されるエラーメッセージです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_RoUu4T8yExPMI37GKwaOC",
"type": "error",
"error": {
"type": "invalid_request_error",
"code": "invalid_value",
"message": "無効なモダリティ: ['audio']。サポートされている組み合わせは、['text'] および ['audio', 'text'] です。",
"param": "session.modalities"
}
}
|
type string イベントタイプです。常に error です。 |
error object エラーに関する詳細情報です。 プロパティ message string エラーメッセージです。 param string エラーに関連するパラメーター(例: session.modalities)です。 |
session.created
クライアントが接続した後、サーバーが最初に返すイベントです。このイベントには、会話のデフォルト構成情報が含まれます。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_RdvlSpbBb2ssyBjYrDHjt",
"type": "session.created",
"session": {
"object": "realtime.session",
"model": "qwen3-omni-flash-realtime",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"input_audio_format": "pcm",
"output_audio_format": "pcm",
"input_audio_transcription": {
"model": "gummy-realtime-v1"
},
"turn_detection": {
"type": "server_vad",
"threshold": 0.5,
"prefix_padding_ms": 300,
"silence_duration_ms": 800,
"create_response": true,
"interrupt_response": true
},
"tools": [],
"tool_choice": "auto",
"temperature": 0.8,
"id": "sess_Ov7GOXoNXhNjlxXtOGKQS"
}
}
|
type string イベントタイプです。常に session.created です。 |
session object 会話の構成情報です。 プロパティ object string 常に realtime.session です。 modalities array モデルの出力モダリティ設定です。 voice string モデルが生成する音声の音色です。 input_audio_format string 入力音声フォーマットです。常に pcm です。 output_audio_format string 出力音声フォーマットです。常に pcm です。 input_audio_transcription object 音声認識の構成です。 プロパティ model string 音声認識モデルです。常に gummy-realtime-v1 です。 turn_detection object 音声区間検出 (VAD) の構成です。 プロパティ type string サーバー VAD の種類です。常に server_vad です。 threshold float VAD 検出しきい値です。 silence_duration_ms integer 発話終了を検出するためのサイレンスの持続時間です。 temperature float モデルの温度パラメーターです。 |
session.updated
ユーザーの session.update リクエストを受信した後、リクエストが成功した場合にサーバーが返すイベントです。エラーが発生した場合は、error イベントが返されます。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_X1HsXS4b4uptp6yo1LgKd",
"type": "session.updated",
"session": {
"id": "sess_Aih6vAcY5Ddt6jwFx1tCa",
"object": "realtime.session",
"model": "qwen3-omni-flash-realtime",
"modalities": [
"text",
"audio"
],
"instructions": "あなたは個人アシスタントの「小雲」として動作します。ユーザーの質問に正確かつフレンドリな態度で回答し、常に親切な姿勢で応答してください。",
"voice": "Cherry",
"input_audio_format": "pcm",
"output_audio_format": "pcm",
"input_audio_transcription": {
"model": "gummy-realtime-v1"
},
"turn_detection": {
"type": "server_vad",
"threshold": 0.1,
"prefix_padding_ms": 500,
"silence_duration_ms": 900,
"create_response": true,
"interrupt_response": true
},
"temperature": 0.8,
"max_response_output_token": "inf",
"max_tokens": 16384,
"repetition_penalty": 1.05,
"presence_penalty": 0.0,
"top_k": 50,
"top_p": 1.0,
"seed":-1
}
}
|
type string イベントタイプです。常に session.updated です。 |
session object 会話の構成情報です。 プロパティ temperature float モデルの温度パラメーターです。 modalities array モデルの出力モダリティ設定です。 voice string モデルが生成する音声の音色です。 instructions string モデルの目的および役割です。 input_audio_format string 入力音声フォーマットです。常に pcm です。 output_audio_format string 出力音声フォーマットです。常に pcm です。 input_audio_transcription object 音声認識の構成です。 プロパティ model string 音声認識モデルです。常に gummy-realtime-v1 です。 turn_detection object VAD の構成です。 プロパティ type string サーバー VAD の種類です。常に server_vad です。 threshold float VAD 検出しきい値です。 silence_duration_ms integer 発話終了を検出するためのサイレンスの持続時間です。 top_pfloat 核サンプリングの確率しきい値です。 top_k integer モデル生成時のサンプリングにおける候補セットのサイズです。 max_tokens integer 現在のリクエストに対してモデルが返すことができるトークンの最大数です。 repetition_penalty float モデル生成時に連続するシーケンスにおける反復度合いを制御します。 presence_penalty float モデルがコンテンツを生成する際の反復度合いを制御します。 seed integer 各リクエストに対する結果の一貫性の程度です。 |
input_audio_buffer.speech_started
VAD モードにおいて、サーバーが音声バッファー内の発話開始を検出したときに返すイベントです。
このイベントは、サーバーがまだ発話を検出していない場合、音声がバッファーに追加されるたびにトリガーされる可能性があります。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_Pvp8nEhsQuGCQbFJ9x58n",
"type": "input_audio_buffer.speech_started",
"audio_start_ms": 3647,
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
type string イベントタイプです。常に input_audio_buffer.speech_started です。 |
audio_start_ms integer 音声書き込みがバッファーに開始されてから、発話が初めて検出されるまでのミリ秒単位の時間です。 |
item_id string 発話停止時に作成されるユーザー メッセージ項目の ID です。 ユーザー メッセージ項目は、後続のモデル推論および生成のために、ユーザー入力を会話履歴に追加するために使用されます。 |
input_audio_buffer.speech_stopped
VAD モードにおいて、サーバーが音声バッファー内の発話終了を検出したときに返すイベントです。
同時に、サーバーは対応するユーザー メッセージ項目を作成するために conversation.item.created イベントも返します。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_UhQiqNVRsgUiq4KUS5Xb5",
"type": "input_audio_buffer.speech_stopped",
"audio_end_ms": 4453,
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
type string イベントタイプです。常に input_audio_buffer.speech_stopped です。 |
audio_end_ms integer 会話開始から発話が停止するまでのミリ秒単位の時間です。 |
item_id string 作成されるユーザー メッセージ項目の ID です。 |
input_audio_buffer.committed
入力音声バッファーがコミットされたときに返されるイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_Iy6sUzL1nmdFgshFYxJEz",
"type": "input_audio_buffer.committed",
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba"
}
|
type string イベントタイプです。常に input_audio_buffer.committed です。 |
item_id string 作成されるユーザー メッセージ項目の ID です。 |
input_audio_buffer.cleared
クライアントが input_audio_buffer.clear イベントを送信した後に、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_RoUu4T8yExPMI37GKwaOC",
"type": "input_audio_buffer.cleared"
}
|
type string イベントタイプです。常に input_audio_buffer.cleared です。 |
conversation.item.created
会話項目が作成されたときに返されるイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_JEfkrr9gO3Ny7Xcv9bGVd",
"type": "conversation.item.created",
"item": {
"id": "item_YbAiGvK2H7YaS34o4R6Ba",
"object": "realtime.item",
"type": "message",
"status": "in_progress",
"role": "assistant",
"content": [
{
"type": "input_audio"
}
]
}
}
|
type string イベントタイプです。常に conversation.item.created です。 |
item object 会話に追加する項目です。 プロパティ object string 常に realtime.item です。 status string 会話項目のステータスです。 content string メッセージの内容です。 |
conversation.item.input_audio_transcription.completed
ユーザーの音声がバッファーに格納された後に生成される音声認識結果を提供するイベントです。音声認識は、現在 gummy-realtime-v1 に設定されている別個の音声認識モデルによって処理されます。
音声認識モデルによるテキスト化結果は、Qwen-Omni-Realtime モデルが処理するテキストと異なる場合があり、あくまで参考情報としてご活用ください。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_FrrZcxiDfTB9LD9p4pVng",
"type": "conversation.item.input_audio_transcription.completed",
"item_id": "item_YbAiGvK2H7YaS34o4R6Ba",
"content_index": 0,
"transcript": "こんにちは。"
}
|
type string イベントタイプです。常に conversation.item.input_audio_transcription.completed です。 |
item_id string ユーザー メッセージ項目の ID です。 |
content_index integer 現在の値は固定で 0 です。 |
transcript string 音声認識によりテキスト化された内容です。 |
conversation.item.input_audio_transcription.failed
入力音声認識が有効化されており、かつ失敗した場合に、サーバーが返すイベントです。このイベントは、クライアントが問題を特定できるよう、error イベントとは独立して発行されます。
event_id string このイベントの固有識別子です。 | {
"type": "conversation.item.input_audio_transcription.failed",
"item_id": "<item_id>",
"content_index": 0,
"error": {
"code": "<code>",
"message": "<message>",
"param": "<param>"
}
}
|
type string イベントタイプです。常に conversation.item.input_audio_transcription.failed です。 |
item_id string ユーザー メッセージ項目の ID です。 |
content_index integer 現在の値は固定で 0 です。 |
error object エラーメッセージです。 プロパティ message string エラーメッセージです。 param string エラーに関連するパラメーターです。 |
response.created
サーバーが新しいモデル応答を生成したときに返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_XuDavMzQN3KKepqGu3KRh",
"type": "response.created",
"response": {
"id": "resp_HaVOPdbmX6vifiV5pAfJY",
"object": "realtime.response",
"conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
"status": "in_progress",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"output_audio_format": "pcm",
"output": []
}
}
|
type string イベントタイプです。常に response.created です。 |
response object 応答オブジェクトです。 プロパティ conversation_id string 現在の会話の固有 ID です。 object string オブジェクトタイプです。このイベントでは、常に realtime.response です。 status string 応答のステータスです。有効な値: [completed, failed, in_progress, or incomplete]。 modalities array 応答のモダリティです。 voice string モデルが生成する音声の音色です。 output string このイベントでは、現在空です。 |
response.done
応答が生成された後に、サーバーが返すイベントです。response オブジェクトには、生の音声データを除くすべての出力項目が含まれます。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_CSaxRRYLvbrfexDXAEuDG",
"type": "response.done",
"response": {
"id": "resp_HaVOPdbmX6vifiV5pAfJY",
"object": "realtime.response",
"conversation_id": "conv_FjJaccpnvwHNo9cPVuzGc",
"status": "completed",
"modalities": [
"text",
"audio"
],
"voice": "Cherry",
"output_audio_format": "pcm",
"output": [
{
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "audio",
"transcript": "こんにちは!お手伝いできることはありますか?"
}
]
}
],
"usage": {
"total_tokens": 377,
"input_tokens": 336,
"output_tokens": 41,
"input_tokens_details": {
"text_tokens": 228,
"audio_tokens": 108
},
"output_tokens_details": {
"text_tokens": 9,
"audio_tokens": 32
}
}
}
}
|
type string イベントタイプです。常に response.done です。 |
response object 応答オブジェクトです。 プロパティ conversation_id string 現在の会話の固有 ID です。 object string オブジェクトタイプです。このイベントでは、常に realtime.response です。 status string 応答のステータスです。 modalities array 応答のモダリティです。 voice string モデルが生成する音声の音色です。 output object 応答の出力です。 プロパティ id string 応答出力に対応する ID です。 type string 出力項目のタイプです。現在の値は message です。 object string 出力項目のオブジェクトタイプです。現在の値は realtime.item です。 status string 出力項目のステータスです。 content array 出力項目の内容です。 プロパティ type string 出力コンテンツのタイプです。出力がプレーンテキストの場合は text、音声を含む場合は audio です。 transcript string 音声からテキスト化された内容です。 usage object この応答におけるトークン消費量の情報です。 |
response.text.delta
出力モダリティがテキストのみであり、モデルが新しいテキストを増分的に生成する場合に、サーバーが返すイベントです。
event_id 文字列 このイベントの固有識別子です。 | {
"delta": "Hello",
"event_id": "event_TH49MauuPmRo1RGaMSlP7",
"type": "response.text.delta",
"response_id": "resp_PrRSvPVpnCExdUOGHHLuP",
"item_id": "item_L8IRm9kRXFpxoOjDqDC96",
"output_index": 0,
"content_index": 0
}
|
type 文字列 イベントタイプです。常に response.text.delta です。 |
delta 文字列 増分的に返されるテキストです。 |
response_id 文字列 応答の ID です。 |
item_id 文字列 メッセージ項目の ID です。この ID を使用して、同一メッセージ内の項目を相互に関連付けられます。 |
output_index 整数 応答内の出力項目のインデックスです。現在の値は固定で 0 です。 |
content_index 整数 出力項目内のコンテンツ部分のインデックスです。現在の値は固定で 0 です。 |
response.text.done
出力モダリティがテキストのみであり、モデルがテキストの生成を完了した場合に、サーバーが返すイベントです。
このイベントは、応答が中断された場合、不完全な場合、またはキャンセルされた場合にも返されます。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_B1lIeE2Nac33zn5V7h2mm",
"type": "response.text.done",
"response_id": "resp_B1lIdtjF4Noqpn5NOjznj",
"item_id": "item_B1lIdJsAJlJiFs8ztWpJt",
"output_index": 0,
"content_index": 0,
"text": "本日はどのようなお手伝いをしましょうか?"
}
|
type string イベントタイプです。常に response.text.done です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。 |
text string モデルが出力した完全なテキストです。 |
response.audio.delta
出力モダリティに音声が含まれており、モデルが新しい音声データを増分的に生成する場合に、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_B1osWMZBtrEQbiIwW0qHQ",
"type": "response.audio.delta",
"response_id": "resp_P79OOMs8LnrXVpiIHUCKR",
"item_id": "item_OFaPGtzfWCPyGzxnuEX9i",
"output_index": 0,
"content_index": 0,
"delta": "{base64 audio}"
}
|
type string イベントタイプです。常に response.audio.delta です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。 |
delta string モデルが出力した増分音声データで、Base64 でエンコードされています。 |
response.audio.done
出力モダリティに音声が含まれており、モデルが音声データの生成を完了した場合に、サーバーが返すイベントです。
このイベントは、応答が中断された場合、不完全な場合、またはキャンセルされた場合にも返されます。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_Le1TDl7VfyHQxl47DtGxI",
"type": "response.audio.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0
}
|
type string イベントタイプです。常に response.audio.done です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。 |
response.audio_transcript.delta
出力モダリティに音声が含まれており、モデルが新しい音声に対応するテキストを増分的に生成する場合に、サーバーが response.audio_transcript.delta イベントを返します。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_BksW7fOwnyavZdDxIzZYM",
"type": "response.audio_transcript.delta",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"delta": "何かありますか"
}
|
type string イベントタイプです。常に response.audio_transcript.delta です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。 |
delta string 増分テキストです。 |
response.audio_transcript.done
出力モダリティに音声が含まれており、モデルが音声のテキスト化を完了した場合に、サーバーが response.audio_transcript.done イベントを返します。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_X49tL2WerT4WjxcmH16lS",
"type": "response.audio_transcript.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"transcript": "こんにちは!お手伝いできることはありますか?"
}
|
type string イベントタイプです。常に response.audio_transcript.done です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。 |
transcript string 完全なテキストです。 |
response.output_item.added
応答生成中に新しい項目が作成されたときに、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_DsCO341DEVtiATtCB6BUY",
"type": "response.output_item.added",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"output_index": 0,
"item": {
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "in_progress",
"role": "assistant",
"content": []
}
}
|
type string イベントタイプです。常に response.output_item.added です。 |
response_id string 応答の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
item object 出力項目に関する情報です。 プロパティ object string 常に realtime.item です。 status string 出力項目のステータスです。 role string メッセージ送信者のロールです。 content string メッセージの内容です。 |
response.output_item.done
新しい出力項目が完了したときに、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_MEu5nlLw1LsOguHiehIP8",
"type": "response.output_item.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"output_index": 0,
"item": {
"id": "item_Ls6MtCUWO7LM4E59QziNv",
"object": "realtime.item",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "audio",
"text": "こんにちは!お手伝いできることはありますか?"
}
]
}
}
|
type string イベントタイプです。常に response.output_item.done です。 |
response_id string 応答の ID です。 |
output_index integer 応答内の出力項目のインデックスです。 |
item object 出力項目に関する情報です。 プロパティ object string 常に realtime.item です。 status string 出力項目のステータスです。 role string メッセージ送信者のロールです。 content string メッセージの内容です。 |
response.content_part.added
応答生成中に、アシスタントのメッセージ項目に新しいコンテンツ部分が追加されたときに、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_AVBOmrgY3C8bjlRajfSUT",
"type": "response.content_part.added",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"part": {
"type": "audio",
"text": ""
}
}
|
type string イベントタイプです。常に response.content_part.added です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。現在の値は固定で 0 です。 |
content_index integer 出力項目内のコンテンツ部分のインデックスです。現在の値は固定で 0 です。 |
part object コンテンツ部分に関する情報です。 プロパティ type string コンテンツ部分のタイプです。 text string コンテンツ部分のテキストです。 |
response.content_part.done
アシスタントのメッセージ項目におけるコンテンツ部分のストリーミングが完了したときに、サーバーが返すイベントです。
event_id string このイベントの固有識別子です。 | {
"event_id": "event_Il8HD19v58Qr5IBkw7LtN",
"type": "response.content_part.done",
"response_id": "resp_HaVOPdbmX6vifiV5pAfJY",
"item_id": "item_Ls6MtCUWO7LM4E59QziNv",
"output_index": 0,
"content_index": 0,
"part": {
"type": "audio",
"text": "こんにちは!お手伝いできることはありますか?"
}
}
|
type string イベントタイプです。常に response.content_part.done です。 |
response_id string 応答の ID です。 |
item_id string メッセージ項目の ID です。 |
output_index integer 応答内の出力項目のインデックスです。現在の値は固定で 0 です。 |
content_index integer 項目のコンテンツ配列内のコンテンツ部分のインデックスです。現在の値は固定で 0 です。 |
part object 返される情報です。 プロパティ type string コンテンツ部分のタイプです。 text string コンテンツ部分のテキストです。 |