Endpoint 覆蓋範圍
公開 2 個公共 endpoint:chat_completion, response。
curl -X POST https://runapi.ai/v1/responses \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.5",
"messages": [
{
"role": "user",
"content": "審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"
}
]
}'
import { GrokClient } from "@runapi.ai/grok";
const client = new GrokClient();
const result = await client.response.run({
model: "grok-4.5",
messages: [{"role":"user","content":"審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"}],
});
import os
import requests
response = requests.post(
"https://runapi.ai/v1/responses",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"grok-4.5","messages":[{"role":"user","content":"審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"}]}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/v1/responses");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'grok-4.5',
'messages' => [['role' => 'user', 'content' => '審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。']],
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.response().run({"model":"grok-4.5","messages":[{"role":"user","content":"審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"}]});
task.waitForResult();
require "runapi/grok"
client = RunApi::Grok::Client.new
result = client.response.run(
model: "grok-4.5",
messages: [{role: "user", content: "審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"}]
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.response.Run({"model":"grok-4.5","messages":[{"role":"user","content":"審查這份上線計畫,找出風險最高的三項假設,並為每一項提出精簡的緩解措施。"}]})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model grok-4.5 \
--endpoint response \
--wait
4 個版本可用
選擇任一模型,幾秒內即可開始生成。
選擇任一模型,幾秒內即可開始生成。
| 提供者 | xAI |
| 模型 ID | grok-4.5 |
| 模態 | Text |
| 任務類型 | Synchronous |
| API 端點 | /v1/chat/completions |
| /v1/responses |
| /v1/messages | |
| /v1beta/models/grok-4.5:generateContent | |
| /v1beta/models/grok-4.5:streamGenerateContent | |
| 計費單位 | 1K tokens |
| 目錄狀態 | 可直接上線 |
免費註冊後,從控制台建立 grok-4.5 的 API 金鑰。
向 /v1/responses 傳送 POST 請求,並傳入 grok-4.5 模型 ID 與參數。
直接從端點讀取已完成的 grok-4.5 回應。
公開 2 個公共 endpoint:chat_completion, response。
依 1K tokens 計量,無需訂閱。
此端點尚未發布請求參數。
從私有知識庫回答顧客問題,減少工單量。
起草合約摘要,並標示關鍵條款供律師審閱。
在 CI 中自動產生單元測試、程式碼審查與重構建議。
傳入 quickstart 顯示的 model ID。
每個金鑰的速率限制會依使用方案而調整。請查看定價頁面以了解目前限制。
可以——variant 只是旗標。只要變更 model 參數即可切換。
只要支援串流,RunAPI 就會端到端串流。
請在公開 GitHub repo 提交 issue,或寄信給支援。