通过一枚 sk- API Key,调用 Gemini 3 文本/思考、Nano Banana 图片、Wan 2.7 图片三类上游 AI 模型。CNY 计费,按量结算,失败全额退款。
sk-xxxxxxxxxxx 的明文。
⚠ 明文只显示一次,请立即保存到服务端配置。
https://www.jlike.com,在 HTTP 头加上 Authorization: Bearer sk-xxx 即可。
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
401402429promptTokenCount + candidatesTokenCount + thoughtsTokenCount 实际 token 计费/api/v1/openapi/gemini3/generateGemini 3 文本 / 思考生成。透传 contents / generationConfig / tools / systemInstruction,响应附加 _billing 字段。
| model | 说明 |
|---|---|
gemini-3.1-pro-preview | 最强,慢 |
gemini-3-flash-preview | 平衡 |
gemini-3.1-flash-lite-preview | 最便宜,最快 |
curl -X POST https://www.jlike.com/api/v1/openapi/gemini3/generate \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-flash-preview",
"contents": [{"role":"user","parts":[{"text":"用一句话解释相对论"}]}]
}'
/api/v1/openapi/nanobanana/generateNano Banana 图片生成(Google 原生图模型)。同步返回,base64 PNG。
| 别名 | 上游模型 |
|---|---|
nano-banana | gemini-2.5-flash-image |
nano-banana-2 | gemini-3.1-flash-image-preview |
nano-banana-pro | gemini-3-pro-image-preview |
size:512 / 1K / 2K / 4K;aspect_ratio:1:1 / 16:9 / 9:16 / 4:3 / 3:4
curl -X POST https://www.jlike.com/api/v1/openapi/nanobanana/generate \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "赛博朋克风格的猫,霓虹灯招牌下",
"size": "2K",
"aspect_ratio": "16:9",
"n": 1
}'
/api/v1/openapi/wan27/generate/api/v1/openapi/wan27/task/{task_uuid}
Wan 2.7 图片生成(异步)。提交后立即返回 task_uuid,建议每 3–5 秒轮询一次。终态结果会缓存到 DB,重复查询不会二次扣费。失败自动全额退款。
# 提交
curl -X POST https://www.jlike.com/api/v1/openapi/wan27/generate \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"wan2.7-t2i-plus","prompt":"astronaut on mars","size":"2K","aspect_ratio":"16:9","n":1}'
# 轮询
curl https://www.jlike.com/api/v1/openapi/wan27/task/<task_uuid> \
-H "Authorization: Bearer sk-xxxxxxxx"
⚠ Wan 返回的图片 URL 由上游签发,有效期通常 24 小时,请尽快下载到自己的存储。
| HTTP | 场景 |
|---|---|
400 | 请求体非法(model 不支持、必填字段缺失等) |
401 | API Key 无效 / 已吊销 |
402 | 积分不足 |
429 | 速率限制 |
502 | 上游返回错误 |
503 | 服务未开放 / 上游 Key 未配置 |
504 | 上游超时 |
失败响应统一格式:
{
"success": false,
"error": "错误描述",
"error_code": "INVALID_PARAMS"
}sk- 明文保存到 服务端 安全存储,不要嵌入浏览器 JS / 客户端二进制_billing.cost / actual_cost,必要时在业务侧做二次计量