本文へスキップ

オープンモデル

RightNow AIOpen models 更新日

このページの内容

オープンモデル API は、OpenAI 互換の Chat Completions API と Anthropic 互換の Messages API で、ホストされたオープンウェイトのモデルを提供します。 ワークスペースの API キー 1 つですべてに届き、利用はクレジットで支払います。

2 つのプロトコル、1 つのキー
Text
1 つのワークスペースのキーが 2 つのプロトコルでオープンモデルに届く様子の図。

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 で読みます。

TypeScript
import OpenAI from "openai";

// Server side only: never expose this key in browser code.
const client = new OpenAI({
  baseURL: "https://api.rightnowai.co/v1",
  apiKey: process.env.RIGHTNOW_API_KEY,
});
const response = await client.chat.completions.create({
  model: "glm-5-3",
  messages: [{ role: "user", content: "Write a TypeScript retry helper." }],
  max_tokens: 16384,
  reasoning_effort: "low",
});
console.log(response.choices[0]?.message?.content);

GET /v1/models は、ホストされたチャットのモデルの正式な一覧です。一時停止中のモデルもそこに示されます。

リクエストと応答の一部の名前は、プラットフォームの以前の名前に由来する runinfra で始まります。そのまま残ります。

どのルートか

ルートパスクライアントのベース URL読む
Chat completionsPOST /v1/chat/completionshttps://api.rightnowai.co/v1Chat completions and Responses
ResponsesPOST /v1/responseshttps://api.rightnowai.co/v1Chat completions and Responses
MessagesPOST /v1/messageshttps://api.rightnowai.coMessages

この順に読む

  1. Call an open model

    Get a workspace key, discover an available model and send a server-side chat request.

  2. Models

    Discover the model ids a workspace key can reach, and the limits the gateway enforces on them.

  3. Chat completions and Responses

    Chat and Responses request fields, tool loops, streamed events, usage, validation and output budgets.

  4. Streaming

    Stream chat completion deltas over Server-Sent Events, and ask for the usage frame.

  5. Errors

    The error envelope, every status and code, and whether retrying can help.

  6. Retries

    Retry a call, streaming or not, without starting duplicate inference work or a second charge.

  7. Limits

    What each purchase unlocks, what each 429 means, and how to back off.

  8. Sessions

    Keep a session's requests together so its prefix cache stays warm across turns and fan-out workers.

料金、アクセス、ヘルプ