> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 代理提供商请求

> 使用您的 ARouter API key 通过 ARouter 代理原生提供商请求。

ARouter 的提供商代理将请求直接转发到受支持提供商的原生 API，同时为您处理提供商认证。

<RequestExample>
  ```bash cURL theme={null}
  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!"}]
    }'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://api.arouter.ai/anthropic/v1/messages",
      headers={
          "Authorization": "Bearer lr_live_xxxx",
          "Content-Type": "application/json",
      },
      json={
          "model": "claude-sonnet-4.6",
          "max_tokens": 1024,
          "messages": [{"role": "user", "content": "Hello!"}],
      },
  )
  print(resp.json())
  ```

  ```typescript Node.js theme={null}
  const response = await fetch("https://api.arouter.ai/google/v1beta/models/gemini-2.5-flash:generateContent", {
    method: "POST",
    headers: {
      Authorization: "Bearer lr_live_xxxx",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      contents: [
        { role: "user", parts: [{ text: "Hello!" }] }
      ],
    }),
  });

  console.log(await response.json());
  ```
</RequestExample>

## 路径参数

| 参数         | 描述                                                        |
| ---------- | --------------------------------------------------------- |
| `provider` | 提供商标识，如 `openai`、`anthropic`、`google`、`deepseek` 或 `groq` |
| `path`     | 提供商前缀后要转发的原生 API 路径                                       |

## 说明

* 请求和响应以提供商的原生格式传递。
* ARouter 自动注入提供商凭证。您只需发送您的 ARouter API key。
* 使用量仍计入您的 ARouter 账户。
* 当您需要规范化 ARouter 请求模式中未涵盖的提供商原生功能时，请使用此端点。

包含提供商特定示例的更完整指南，请参阅[提供商代理](/zh/guides/provider-proxy)。
