/v1/chat/completions を使用します。
ストリーミング
stream: true を設定すると Server-Sent Events で結果を受け取れます。各イベントは OpenAI の
chat.completion.chunk であり、ストリームは data: [DONE] で終了します。
パラメータ
OpenAI 標準のパラメータに対応しています:temperature、top_p、max_tokens、stop、n、
frequency_penalty、presence_penalty、seed、response_format、tools、
tool_choice、logprobs、top_logprobs、logit_bias、user、stream。
補足
modelは APIAny.AI の公開モデル ID です。- token usage データが利用できる場合、プラットフォームは OpenAI スタイルの
usageオブジェクトに正規化します。