快速接入
使用 PinduCloud 发起第一个 OpenAI 兼容请求。
Base URL
https://pinducloud.cc
1. 设置 API Key
export PINDUCLOUD_API_KEY="your_api_key"
PowerShell:
$env:PINDUCLOUD_API_KEY="your_api_key"
2. 发送 Chat 请求
curl https://pinducloud.cc/v1/chat/completions \
-H "Authorization: Bearer $PINDUCLOUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [
{
"role": "system",
"content": "You are a concise API assistant."
},
{
"role": "user",
"content": "Write a one sentence product summary."
}
],
"temperature": 0.7
}'
响应示例
{
"id": "chatcmpl_abc123",
"object": "chat.completion",
"created": 1710000000,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "PinduCloud provides an OpenAI Compatible API gateway for production AI applications."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 18,
"total_tokens": 46
}
}