跳轉到主要內容
POST
/
{provider}
/
{path}
curl https://api.arouter.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
ARouter 的提供商代理將請求直接轉發到受支援提供商的原生 API,同時為您處理提供商認證。
curl https://api.arouter.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

路徑參數

參數描述
provider提供商識別碼,如 openaianthropicgoogledeepseekgroq
path提供商前綴後要轉發的原生 API 路徑

說明

  • 請求和回應以提供商的原生格式傳遞。
  • ARouter 自動注入提供商憑證。您只需發送您的 ARouter API key。
  • 使用量仍計入您的 ARouter 帳戶。
  • 當您需要規範化 ARouter 請求結構中未涵蓋的提供商原生功能時,請使用此端點。
包含提供商特定範例的更完整指南,請參閱提供商代理