Skip to main content
POST
/
v1beta
/
models
/
{model_path}
curl --request POST \
  --url https://api.orcarouter.ai/v1beta/models/{model_path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Write a one-sentence haiku about the sea."
        }
      ]
    }
  ]
}
'
{}

Authorizations

Authorization
string
header
required

OrcaRouter API 密鑰形如 sk-orca-...。請在 Authorization: Bearer sk-orca-... 頭中傳入。

Path Parameters

model_path
string
required

Body

application/json

Gemini 原生請求體(Google 的 GenerateContentRequest 形態)。常見載荷請見 examples。

Response

成功響應。對于 :generateContent,響應體是 JSON (GenerateContentResponse)。對于 :streamGenerateContent, 響應體是 SSE(text/event-stream);每個事件都是一個 部分的 GenerateContentResponse

Gemini 原生 GenerateContentResponse