设置 API 密钥
将您的 API 密钥设置为环境变量:SUNRA_KEY,无需额外配置。各客户端也支持在代码中显式传入密钥。
直接发起 HTTP 请求
如果您直接通过 HTTP 调用 API,请在Authorization 请求头中传递密钥。两条产品线的 API 使用不同的方案:
同一个 API 密钥对两个 API 均有效。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The developer site has moved to platform.sunra.ai. API endpoints, SDKs and keys are unchanged — you may just need to sign in again.
export SUNRA_KEY="your-api-key-here"
SUNRA_KEY,无需额外配置。各客户端也支持在代码中显式传入密钥。
Authorization 请求头中传递密钥。两条产品线的 API 使用不同的方案:
| API | Base URL | 请求头 |
|---|---|---|
| 多模态(predictions) | api.sunra.ai | Authorization: Key $SUNRA_KEY |
| LLM(completions) | api-llm.sunra.ai | Authorization: Bearer $SUNRA_KEY |