KIE.AI
All Model
  • All Model
  • Old Model
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
All Model
  • All Model
  • Old Model
All Model
  • All Model
  • Old Model
MarketFile Upload APICommon APIAI Agents
MarketFile Upload APICommon APIAI Agents
  1. Build with KIE models
  • Overview
  • Build with KIE models
    • Install kie-models
    • What your agent can do
  • Run coding agents on KIE
    • Install kie-chat-agents
    • Claude Code
    • Codex CLI
    • Grok Build
  • Help
    • Troubleshooting
    • Changelog
  1. Build with KIE models

Install kie-models

Let your coding agent build with 200+ image, video, music and speech models on KIE.
kie-models teaches your agent how to use the KIE model market: find a model, read its parameters, upload input files, submit the task, poll until it finishes and save the result.

Prerequisites#

A coding agent that supports skills, such as Claude Code, Codex or Grok Build.
Node.js, so that npx is available.
A KIE API key. Create one at kie.ai/api-key.

Step 1: Install the skills#

Run once per machine:
This installs both kie-models and kie-chat-agents. Run the same command again later to update to the latest version.

Step 2: Set your API key#

The skill reads your key from the KIE_API_KEY environment variable. It never needs the key written into your project.

macOS and Linux#

Export it in the shell that starts your agent, or add it to your shell profile (~/.zshrc, ~/.bashrc):

Windows (PowerShell)#

$env:KIE_API_KEY = "your_key"
setx KIE_API_KEY "your_key"
setx only applies to windows opened afterwards. Set $env: as well if you want to use it right away.

Step 3: Try it#

Restart your agent from a shell where KIE_API_KEY is set, then ask in plain words:
Use the kie-models skill to run gpt-image-2-text-to-image on KIE. Prompt: "a white ceramic mug on a light oak table, soft daylight, product photo". Aspect ratio 1:1, resolution 1K. Save the image to ./output.
The agent searches the live model list, reads the model's parameters, submits the task, waits for it and saves the file to ./output.

Security#

Keep your API key in an environment variable. Do not paste it into chat, screenshots or files that go into a repository.
If your key leaks, reset it from kie.ai/api-key.
Previous
Overview
Next
What your agent can do
Built with