外观
文本补全 接口
创建文本补全请求(Legacy API)。
API 端点
POST https://ai.cccode.org/v1/completions请求体
json
{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}示例请求
bash
curl https://ai.cccode.org/v1/completions \
-H "Authorization: Bearer sk-你的密钥" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Say this is a test",
"max_tokens": 7
}'💡 建议
大多数场景推荐使用聊天补全 API,文本补全 API 主要用于兼容旧版应用。
