Install modelfold-models
Let your coding agent use ModelFold's image, video, speech and chat models directly.
modelfold-models teaches the agent how to use ModelFold: read the model list, pick the endpoint for the model type, send the request, wait for the result and save the file.
Prerequisites
- A skill-aware coding agent such as Claude Code, Codex, Cursor or Grok Build.
- Node.js 22.20 or later (required by
npx skills). - A ModelFold API key from Console → API Keys, and credits in your wallet.
Step 1: Install the skill
Run this in a terminal. The whole command can be copied as-is and does not prompt:
npx skills add https://modelfold.ai --skill modelfold-models -g -a claude-code -a codex -a grok -y--skill modelfold-modelsinstalls only this skill. Without it, every skill on the site is installed (there is alsomodelfold-chat-agents).-ginstalls for the current user, available in every project. Without-g, the skill is installed only in the current project.-achooses the agents. The three names above are Claude Code, Codex and Grok Build.-yskips the picker. Without-yand-a, a terminal stops and waits for a choice; with no interactive terminal the command fails and installs nothing.- Do not run the command in a project without these flags. Inside an agent, the CLI writes every skill into dozens of agent folders in the current directory.
Where it is installed:
| Agent | Path |
|---|---|
| Claude Code | ~/.claude/skills/modelfold-models |
| Codex | ~/.agents/skills/modelfold-models |
| Grok Build | ~/.grok/skills/modelfold-models |
Claude Code and Grok Build are symlinks to the Codex copy.
Cursor
The skills CLI treats Cursor as a universal agent. With -g it does not write Cursor's global directory ~/.cursor/skills. Run this inside the project:
npx skills add https://modelfold.ai --skill modelfold-models -a cursor -yThe skill lands in that project's .agents/skills/modelfold-models.
To use it from every project in Cursor, add a symlink after the global install:
mkdir -p ~/.cursor/skills
ln -sfn ~/.agents/skills/modelfold-models ~/.cursor/skills/modelfold-modelsTo update later, run the same install command again.
Step 2: Set your API key
The skill reads the key from the MODELFOLD_API_KEY environment variable, so it never goes into your project.
macOS and Linux
Export it in the shell you start the agent from, or add it to your shell profile (~/.zshrc, ~/.bashrc):
export MODELFOLD_API_KEY=your_keyWindows (PowerShell)
$env:MODELFOLD_API_KEY = "your_key"
setx MODELFOLD_API_KEY "your_key"setx only affects windows opened afterwards. To use it right away, set $env: as well.
Step 3: Try it
Restart the agent from a shell where MODELFOLD_API_KEY is set, then ask in plain language:
Use the modelfold-models skill to list the image models on ModelFold, then generate a 1:1 product photo of a white ceramic mug on a light oak table with one of them. Save the image to ./output.The agent reads the live model list, calls the image generation endpoint, waits for the result and saves the file to ./output. Each successful call uses credits; failed jobs are refunded automatically.
Have the agent pick a text-to-image model. The cheapest rows are usually image-to-image, upscale or background removal, and they fail without an image URL.
Security
- Keep the API key in an environment variable. Don't paste it into chats, screenshots or files that get committed.
- If a key leaks, revoke it in Console → API Keys and create a new one.
