基础配置
Base URL:https://newapi.makelove.cloud/v1。请求头使用 Bearer Token,令牌在控制台创建。
Authorization: Bearer sk-your-api-key Content-Type: application/json
聊天接口
POST /v1/chat/completions 适合大多数 OpenAI 兼容客户端。
curl https://newapi.makelove.cloud/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}],"stream":true}'Responses API
POST /v1/responses 适合支持新版 OpenAI Responses 的客户端和工具流。
curl https://newapi.makelove.cloud/v1/responses \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4.1-mini","input":"Summarize this in one sentence."}'图像生成与编辑
GPT-image / image2 类模型请使用图像路径,NewAPI 新版已保留图像质量参数修复。
curl https://newapi.makelove.cloud/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A clean premium product render","size":"1024x1024","quality":"high"}'Grok Video 路由
视频任务使用 /v1/video/generations 或新版兼容路径 /v1/videos。无令牌访问返回 401 表示路由存在且受保护。
curl https://newapi.makelove.cloud/v1/video/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"grok-imagine-video","prompt":"A short cinematic product shot"}'客户端接入
| 客户端 | 配置 |
|---|---|
| Claude Code / Codex | Base URL 填写 https://newapi.makelove.cloud/v1,API Key 使用控制台令牌。 |
| CC Switch | 令牌页面一键导入,或手动选择 OpenAI Compatible。 |
| Cherry Studio / ChatBox | 新建 OpenAI 兼容服务,填入 Base URL 与 Key。 |
错误处理
401 表示令牌无效或缺失;400 多为参数或路径错误;429 表示额度、并发或上游冷却;5xx 表示上游渠道暂时异常,可稍后重试或换模型。
安全建议
不要在前端代码、公开仓库、截图或共享文档里暴露 API Key。为不同项目创建独立令牌,设置额度和过期时间,定期检查异常日志。