Use FASHN with Claude Code, Codex, and Cursor
Coding agents such as Claude Code, Codex, and Cursor can work with FASHN in two ways:
- Make images with the FASHN Agent API. Your agent finds the photos, sends the request, and saves the results, and the FASHN Agent makes the images. Your agent is the producer, and the FASHN Agent is the photographer.
- Integrate FASHN into your project with the official FASHN agent skill, which teaches your agent the FASHN single-task endpoints and SDKs.
Make images with the FASHN Agent API
The FASHN Agent API is a plain REST endpoint: one request with a prompt and up to six reference images returns every image the Agent made. A coding agent can call it with curl or a short script, so you describe the content you need and your agent runs it.
You need a FASHN API key. Generate one from API Setup. Keep it in an environment variable or a .env file, and never paste it into the chat.
Claude Code: follow a recipe
A recipe is a file of instructions your agent follows step by step. The lookbook recipe makes a four-look lookbook of one model in one location from six photos, in one call. Open Claude Code in a folder with a face photo, a location photo, and four outfit photos, and paste:
The recipe sets up your API key in a .env file, confirms which photo is which, and saves the looks in a new folder. How to make an AI lookbook with Claude Code ↗ walks through a full run, and this video shows it from start to finish:
Any agent: point it at the docs
Every page of these docs is also available as Markdown. Ask your agent to read the Agent Images reference, then describe what you need:
On-model photos from several angles:
Packshots for a folder of products:
A reusable script for your catalog:
For more prompts, see the Agent API Quickstart.
Integrate FASHN with the agent skill
FASHN publishes an agent skill that teaches coding agents how to integrate the FASHN single-task endpoints through the REST API or the official TypeScript and Python SDKs. Once installed, your agent can wire FASHN into your project, or run a one-off generation, without you pasting documentation into the chat.
It works with Claude Code, Codex, Cursor, and many others.
Install
Install the skill with skills.sh. The CLI auto-detects which coding agents you have installed and configures the skill for each:
The skill reads a FASHN_API_KEY from the environment. If it isn't set, the
skill asks for your key and helps you configure it, caching it for future
runs. Generate one from API Setup.
What the skill knows
- Every FASHN single-task endpoint (
/v1/run) and its inputs. - The prediction lifecycle:
subscribe(submit and auto-poll) versus the manualrunplusstatuspolling flow. - The response envelope, the error catalog, credit usage, and webhooks.
- Both integration paths (REST and the TypeScript or Python SDKs), plus a one-off inline run.
The skill covers the single-task endpoints. To use the FASHN Agent API from a coding agent, point your agent at the Agent Images docs as described in Make images with the FASHN Agent API.
Usage
After installing, your agent loads the skill automatically (restart the agent if a session is already open). Mention FASHN in your request so the skill activates, then describe the outcome you want and it chooses the right model and wires up the call.
Build FASHN into your app
Generate something on the spot
In Claude Code and Codex, run a one-off generation by invoking the skill directly with /fashn:
Product to model:
A one-off try-on:
With other agents, describe the same task in chat and the skill activates automatically.
Links
- Skill repository: github.com/fashn-AI/fashn-skill
- skills.sh documentation: skills.sh/docs
Next: Make your first request with the Agent API Quickstart, pick an integration path with the TypeScript or Python SDK, or browse the API Reference.