心流api测试通不过,这样用不对吗?
少了user-agent,试试这样:
curl https://apis.iflow.cn/v1/chat/completions
-H “Content-Type: application/json”
-H “Authorization: Bearer sk-你的实际API密钥”
-H “user-agent: iFlow-Cli”
-d ‘{
“model”: “qwen3-coder-plus”,
“messages”: [
{“role”: “user”, “content”: “你好”}
],
“temperature”: 0.7,
“max_new_tokens”: 1000
}’
1 个赞
