Skip to content
Open CastalyConsole

Images and video

Modelflare Media Skill

Install one agent skill so Claude Code, Codex or any SKILL.md-aware agent can pick a Modelflare image or video model, price the call, submit it and save the result.

The Modelflare Media Skill is an installable agent skill: a folder with a SKILL.md, a generated model reference and one helper script. Once it is in your agent’s skills directory, Claude Code, Codex or any agent that reads SKILL.md knows how to choose a Modelflare image or video model, quote its price, send the right request, wait for videos and save the result.

The package is generated from the live model catalog every few minutes, so the model list and prices in it never go stale. Text models are intentionally out of scope: your agent already has one. The helper script needs only Node.js 18 or newer, which Claude Code and Codex already require, and behaves the same on macOS, Windows and Linux.

You do not need to know where your agent keeps skills; the agent does. Send it this message, the same one for every agent:

Text
Install this skill: https://modelflare.dev/skills/modelflare-media/modelflare-media.zip (or use the attached zip), then read its SKILL.md. If you do not support skills, extract it anywhere and follow SKILL.md. My key is in the environment variable MODELFLARE_API_KEY.

If the agent cannot download files, download the zip yourself and attach it to the message. Agents that support skills (Claude Code, Codex and others) install it in their own skills location; an agent without a skills mechanism can still read SKILL.md from wherever it extracted the package.

Only needed if you prefer to place the files yourself, for example on a shared machine or in CI.

Terminal windowbash
curl -fsSL https://modelflare.dev/skills/modelflare-media/install.sh | sh

You can also read SKILL.md directly to see what the agent will follow.

Create an API key in the console and set it in the environment your agent runs in. On macOS and Linux add the export to your shell profile to keep it; on Windows the second line makes it persistent.

Terminal windowbash
export MODELFLARE_API_KEY="sk-..."

If you are not comfortable setting environment variables yourself, you can send the key to your own trusted agent in a private session and ask it to configure the environment for you. Treat the key like a password: confirm what the agent will write and where, never send it to an untrusted service or a public/shared chat, issue, repository, or ticket. Ask the agent not to repeat the key, save a copy, put it in source code, prompts, logs, or shell history, or commit it. Revoke the key and create a new one immediately if you think it may have been exposed.

The skill never writes the key into files or prompts and never prints it. Accounts created through Castaly already have a key named Castaly that routes across every unlocked group; any other key with image or video groups works too.

Talk to your agent as usual:

  • “Generate a 16:9 poster of a coastal observatory at dusk with gpt-image-2.”
  • “Turn this start frame into a 5 second 1080p video with Seedance.”
  • “Which video models under 0.10 USD per second can do image-to-video?”

The agent reads SKILL.md, fetches the live catalog from https://modelflare.dev/api/pricing to see which models the key can use and what they cost, then opens that model’s own page on the docs site for the exact request body, parameter table and limits, and calls the API with its own HTTP client. Every call carries the header X-Modelflare-Skill: modelflare-media/1.0, so the usage logs show which requests came from the skill.

Every generation in the Castaly workbench has a “Reproduce this in your own agent” panel with the install message, the zip and a task brief. Send the install message once, then paste the brief, and the agent reproduces the same model and parameters against your own key.

  • It does not tell your agent how to work. Retries, batching and what to report back are between you and your agent; the skill only documents the API.
  • It carries no model list of its own. The catalog and every request contract are read live, so a model published today is usable today.
  • It does not upload files to any storage: local reference images are embedded in the request as data URLs, so keep them small (a few MB).
  • It cannot unlock model groups. If the API answers model_unavailable, that model is not available to this account.
Text
modelflare-media/
SKILL.md authentication, where the live catalog is, how to find each model's
request contract on the docs site, and what the error codes mean

The package carries no model data, so it does not go stale; reinstall only to pick up a new skill version.