NeonAPI Docs
客戶端接入

cURL 接入

面向 NeonAPI 使用者的實際操作指南。

檢視可用模型

export NEON_API_KEY="YOUR_API_KEY"
curl https://neon-api.com/v1/models \
  -H "Authorization: Bearer $NEON_API_KEY"

傳送對話請求

curl https://neon-api.com/v1/chat/completions \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_ID","messages":[{"role":"user","content":"Hello"}],"stream":false}'

流式讀取

在 JSON 中加入 "stream":true,並使用 curl -N 關閉輸出緩衝。按所用協議解析事件,不要把每個網路分片當作一條完整訊息。詳見流式響應。

不要分享包含真實金鑰的命令歷史。上傳影像或音訊檔案時,應按介面要求使用 multipart,不能僅在 JSON 中傳送本地檔案路徑。