npx skills add https://github.com/antbald/kie-ai-skill --skill kie-ai如果未配置 API 密钥,请在生成任何内容前运行设置:
bash scripts/setup_api_key.sh
将密钥安全地存储在 macOS 钥匙串中(或在 Linux 上存储在 ~/.config/kie-ai/config 中)。请在此处获取您的密钥:https://kie.ai/api-key
检查剩余积分:
bash scripts/kie_api.sh credits
scripts/kie_api.sh(处理认证、创建、轮询、下载)https://api.kie.aiAuthorization: Bearer <KEY>(密钥由脚本自动获取)If no API key is configured, run setup before any generation:
bash scripts/setup_api_key.sh
Stores key securely in macOS Keychain (or ~/.config/kie-ai/config on Linux). Get your key at: https://kie.ai/api-key
Check remaining credits:
bash scripts/kie_api.sh credits
scripts/kie_api.sh (handles auth, create, poll, download)https://api.kie.ai广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
所有 Kie.ai API 都是异步的:
taskIdsuccess 或 failPOST /api/v1/jobs/createTask,附带 {"model":"<model-id>","input":{...}}GET /api/v1/jobs/recordInfo?taskId=<id>waiting → queuing → generating → success / failsuccessFlag:0=生成中,1=成功,2/3=失败根据任务呈现模型选项:
对于图像,按顺序推荐:
nano-banana-2) — 最佳全能型,4K,支持 Google 搜索基础,14 张参考图像google/imagen4) — Google 最新模型,支持负面提示词对于视频,按顺序推荐:
kling-3.0/video) — 多镜头,支持音频,3-15秒,包含元素sora-2-text-to-video) — OpenAI,角色,故事板wan/2-6-*) — 阿里巴巴,Flash 变体,支持音频对于音频:Suno V4(音乐),ElevenLabs(TTS,音效,对话) 对于超分辨率:Topaz(图像/视频),Recraft(背景移除,超分辨率)
用户选择模型后,询问模型特定的设置。请阅读 references/models-catalog.md 了解所选模型的确切参数。
各模型间的通用参数:
prompt(生成时始终必需)aspect_ratio / size(因模型而异)callBackUrl(可选,轮询时可省略)使用辅助脚本:
# 市场模型(大多数模型)
bash scripts/kie_api.sh create-market '{
"model": "nano-banana-2",
"input": {
"prompt": "A futuristic cityscape at sunset",
"aspect_ratio": "16:9",
"resolution": "2K"
}
}'
# 专用模型(Runway, Veo3, 4o Image, Flux Kontext)
bash scripts/kie_api.sh create "/api/v1/veo/generate" '{
"prompt": "A cat exploring a magical forest",
"model": "veo3_fast",
"aspect_ratio": "16:9"
}'
# 市场模型
bash scripts/kie_api.sh poll-market "task_12345" 60 10
# 专用模型
bash scripts/kie_api.sh poll "/api/v1/veo/record-info" "veo_task_abc" 60 10
# 下载结果
bash scripts/kie_api.sh download "https://tempfile..." "./output.png"
向用户显示下载 URL 或本地文件路径。如果有多个 URL,请全部列出。
| 代码 | 含义 | 操作 |
|---|---|---|
| 200 | 任务已创建(未完成) | 轮询结果 |
| 401 | API 密钥无效 | 重新运行设置 |
| 402 | 积分不足 | 在 kie.ai 充值 |
| 422 | 参数无效 | 检查模型文档 |
| 429 | 速率受限 | 等待后重试 |
| 451 | 图像获取失败 | 检查图像 URL |
| 455 | 服务维护中 | 等待 |
| 500 | 服务器错误 | 重试 |
| 501 | 生成失败 | 使用不同参数重试 |
# 上传本地文件
bash scripts/kie_api.sh upload-stream "/path/to/image.png"
# 从 URL 上传
bash scripts/kie_api.sh upload-url "https://example.com/image.png"
上传响应包含 fileUrl,可用作输入。文件在 3 天后过期。
| 类别 | 范围 | 示例 |
|---|---|---|
| 图像 | 5-18 积分 | Seedream 5.5积分,Nano Banana 8-18积分 |
| 视频 | 20-500 积分/秒 | Kling 20-40积分/秒,Sora 30-35积分 |
| 音频 | 视模型而定 | 按模型计费 |
| LLM | 按令牌计费 | 100积分/1M 输入令牌 |
检查积分:bash scripts/kie_api.sh credits
每周安装数
1
代码仓库
首次出现
1 天前
安全审计
安装于
mcpjam1
claude-code1
junie1
windsurf1
zencoder1
crush1
Authorization: Bearer <KEY>All Kie.ai APIs are asynchronous :
taskIdsuccess or failPOST /api/v1/jobs/createTask with {"model":"<model-id>","input":{...}}GET /api/v1/jobs/recordInfo?taskId=<id>waiting → queuing → generating → success / failsuccessFlag: 0=generating, 1=success, 2/3=failedPresent model options based on the task:
For images , recommend in order:
nano-banana-2) — Best all-round, 4K, Google Search grounding, 14 ref imagesgoogle/imagen4) — Google's latest, negative promptsFor videos , recommend in order:
kling-3.0/video) — Multi-shot, audio, 3-15s, elementssora-2-text-to-video) — OpenAI, characters, storyboardwan/2-6-*) — Alibaba, Flash variants, audioFor audio : Suno V4 (music), ElevenLabs (TTS, SFX, dialogue) For upscale : Topaz (image/video), Recraft (background removal, upscale)
After user picks a model, ask for model-specific settings. Read references/models-catalog.md for the exact parameters of the chosen model.
Common parameters across models:
prompt (always required for generation)aspect_ratio / size (varies per model)callBackUrl (optional, omit for polling)Use the helper script:
# Market models (most models)
bash scripts/kie_api.sh create-market '{
"model": "nano-banana-2",
"input": {
"prompt": "A futuristic cityscape at sunset",
"aspect_ratio": "16:9",
"resolution": "2K"
}
}'
# Dedicated models (Runway, Veo3, 4o Image, Flux Kontext)
bash scripts/kie_api.sh create "/api/v1/veo/generate" '{
"prompt": "A cat exploring a magical forest",
"model": "veo3_fast",
"aspect_ratio": "16:9"
}'
# Market models
bash scripts/kie_api.sh poll-market "task_12345" 60 10
# Dedicated models
bash scripts/kie_api.sh poll "/api/v1/veo/record-info" "veo_task_abc" 60 10
# Download result
bash scripts/kie_api.sh download "https://tempfile..." "./output.png"
Show the user the download URL or local file path. If multiple URLs, list them all.
| Code | Meaning | Action |
|---|---|---|
| 200 | Task created (NOT completed) | Poll for result |
| 401 | Invalid API key | Re-run setup |
| 402 | Insufficient credits | Top up at kie.ai |
| 422 | Invalid parameters | Check model docs |
| 429 | Rate limited | Wait and retry |
| 451 | Image fetch failed | Check image URL |
| 455 | Service maintenance | Wait |
| 500 | Server error | Retry |
| 501 | Generation failed | Retry with different params |
# Upload local file
bash scripts/kie_api.sh upload-stream "/path/to/image.png"
# Upload from URL
bash scripts/kie_api.sh upload-url "https://example.com/image.png"
Upload response contains fileUrl to use as input. Files expire in 3 days.
| Category | Range | Examples |
|---|---|---|
| Image | 5-18 cr | Seedream 5.5cr, Nano Banana 8-18cr |
| Video | 20-500 cr/s | Kling 20-40cr/s, Sora 30-35cr |
| Audio | Varies | Per model |
| LLM | Per token | 100cr/1M input tokens |
Check credits: bash scripts/kie_api.sh credits
Weekly Installs
1
Repository
First Seen
1 day ago
Security Audits
Installed on
mcpjam1
claude-code1
junie1
windsurf1
zencoder1
crush1
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
45,700 周安装
agent-skill-creator:AI智能体技能自动化生成工厂,无需代码创建跨平台技能
340 周安装
MCP Hub:连接1200+ MCP服务器,扩展Claude AI的文件、数据库和API集成能力
356 周安装
实用程序员框架:DRY、正交性等七大元原则提升软件质量与架构设计
360 周安装
Claude Code Skills搜索技能:从官方和社区精选可信技能库,按需求智能推荐
347 周安装
TanStack Router:完全类型安全的 React/Solid 文件路由与数据加载解决方案
362 周安装
Notion知识捕获工具 - 将对话笔记自动转化为结构化Notion页面 | 知识管理自动化
358 周安装