オープンモデル
更新日
このページの内容
オープンモデル API は、OpenAI 互換の Chat Completions API と Anthropic 互換の Messages API で、ホストされたオープンウェイトのモデルを提供します。 ワークスペースの API キー 1 つですべてに届き、利用はクレジットで支払います。
2 つのプロトコル、/v1/chat/completions の chat completions と /v1/messages の Messages は、同じワークスペースのキーを受け付けます。 どちらも 1 つのホストでオープンモデルに届きます。 利用は 1 つのクレジット残高から支払われ、バーで描かれています。
RightNow decision model には専用のドキュメントがあります。
ホストされたモデルを呼び出す
使うルートのベース URL を設定し、ワークスペースの API キーを使い、モデル ID を渡します。
例では glm-5-3 を呼び出します。Open models にある利用できる ID なら、どれでも代わりに使えます。現在の機能、制限、価格は GET /v1/models で読みます。
GET /v1/models は、ホストされたチャットのモデルの正式な一覧です。一時停止中のモデルもそこに示されます。
リクエストと応答の一部の名前は、プラットフォームの以前の名前に由来する runinfra で始まります。そのまま残ります。
どのルートか
| ルート | パス | クライアントのベース URL | 読む |
|---|---|---|---|
| Chat completions | POST /v1/chat/completions | https:// | Chat completions and Responses |
| Responses | POST /v1/responses | https:// | Chat completions and Responses |
| Messages | POST /v1/messages | https://api.rightnowai.co | Messages |
この順に読む
Get a workspace key, discover an available model and send a server-side chat request.
Discover the model ids a workspace key can reach, and the limits the gateway enforces on them.
Chat completions and Responses
Chat and Responses request fields, tool loops, streamed events, usage, validation and output budgets.
Stream chat completion deltas over Server-Sent Events, and ask for the usage frame.
The error envelope, every status and code, and whether retrying can help.
Retry a call, streaming or not, without starting duplicate inference work or a second charge.
What each purchase unlocks, what each 429 means, and how to back off.
Keep a session's requests together so its prefix cache stays warm across turns and fan-out workers.