快速开始

3 步接入 聚恒AI引擎 API

1. 获取 API Key

控制台 → API Key 管理创建 Key

2. 设置 Base URL

https://api-broker.stdyllm.com/v1

3. 发送请求

python
import requests

response = requests.post(
    "https://api-broker.stdyllm.com/v1/chat/completions",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "model": "gpt-5",
        "messages": [{"role": "user", "content": "Hello!"}]
    }
)
print(response.json())