本指南帮助你在 5 分钟内完成 ProxyCast 的基本配置和首次 API 调用。
确保你已经:
ProxyCast 会自动检测本地的 AI 客户端凭证文件。
| Provider | 凭证路径 |
|---|---|
| Kiro Claude | ~/.kiro/credentials.json |
| Gemini CLI | ~/.config/gemini-cli/oauth_creds.json |
| Qwen | ~/.config/qwen/credentials.json |
如果自动检测未找到凭证:
http://127.0.0.1:9090)OpenAI 格式:
curl http://127.0.0.1:9090/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Claude 格式:
curl http://127.0.0.1:9090/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'
在 Cursor 设置中配置 OpenAI API:
http://127.0.0.1:9090/v1编辑 ~/.continue/config.json:
{
"models": [{
"title": "ProxyCast Claude",
"provider": "openai",
"model": "claude-sonnet-4-20250514",
"apiBase": "http://127.0.0.1:9090/v1",
"apiKey": "your-api-key"
}]
}