fashn-logo

FASHNAI

FASHN Agent API

Agentic fashion photography in one API call

Send a prompt and up to 6 photos from Claude Code, Codex, or your own app. The FASHN Agent plans every step, from try-on to model swaps, edits, and upscaling, and returns finished fashion images.

Works with Claude Code, Codex, Cursor, and any agent or app that can send an HTTP request.

Trusted by fashion and AI companies

Photo Flux AI logo
Photo AI logo
RenderNet AI logo
Buñu logo
The New Black logo
Antla logo
HANGR logo
Cheyyn logo
Photo Flux AI logo
Photo AI logo
RenderNet AI logo
Buñu logo
The New Black logo
Antla logo
HANGR logo
Cheyyn logo
Photo Flux AI logo
Photo AI logo
RenderNet AI logo
Buñu logo
The New Black logo
Antla logo
HANGR logo
Cheyyn logo
Photo Flux AI logo
Photo AI logo
RenderNet AI logo
Buñu logo
The New Black logo
Antla logo
HANGR logo
Cheyyn logo

How the FASHN Agent API works

Your agent is the producer and the FASHN Agent is the photographer. Your agent sends the brief, and the FASHN Agent makes the images and keeps the model, location, and light consistent.

  1. 01

    Get your API key

    Buy credits in the API dashboard and create a key.

  2. 02

    Send a prompt and your photos

    Describe what you want in plain language and attach up to 6 images, from any language or straight from your coding agent.

  3. 03

    Get every image back

    The FASHN Agent picks the steps and returns every image it made, in the response, by polling, or by webhook.

Follow the Agent API quickstart
api.fashn.ai
1const response = await fetch("https://api.fashn.ai/v1/agent/images", {
2 method: "POST",
3 headers: {
4 Authorization: `Bearer ${process.env.FASHN_API_KEY}`,
5 "Content-Type": "application/json",
6 },
7 body: JSON.stringify({
8 prompt: "Put the dress from image 2 on the model in image 1",
9 images: [
10 "https://example.com/model.jpg",
11 "https://example.com/dress.jpg",
12 ],
13 }),
14});
15
16const result = await response.json();
17for (const prediction of result.predictions) {
18 console.log(prediction.tool, prediction.results);
19}

One agent for every fashion image task

Ask in plain language. The FASHN Agent picks the right tools, runs them in order, and adds no steps you didn't ask for.

  • Try-on and product to model

    Dress a model in your products, or turn flat-lay and ghost mannequin shots into on-model photos.

  • AI models and model swap

    Create a fashion model from a prompt or a face photo, or change the model while the outfit stays the same.

  • Poses, angles, and backgrounds

    Change the pose, camera angle, styling, or location of any image.

  • Packshots and cutouts

    Make clean packshots, transparent images, and background removals for product pages.

  • Up to 4K, in any shape

    Choose a resolution up to 4K and an aspect ratio from 9:16 to 21:9, or upscale images you already have.

  • Several images per request

    Ask for three angles or a four-look lookbook, and get every image back from one request.

Your coding agent
  • Claude Code
  • Codex
  • Cursor
FASHNAIAgent API
> Read https://docs.fashn.ai/api-reference/agent-images.md, then make three on-model photos of ./dress.jpg

Also works with Gemini CLI, GitHub Copilot, and any agent that can call an API.

Coding agents

Use FASHN from Claude Code, Codex, and Cursor

Your coding agent finds your photos, sends the brief, and saves the finished images to your folder. Start from a recipe, a short text file of instructions, and you don't need to write any code.

Any agent can also read the Agent API docs as Markdown and make images from your prompt. To build virtual try-on into your own app, install the FASHN skill for Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, and more.

Consistent shoots

A full lookbook from one call

Send a face, a location, and your products in one request. With the lookbook recipe, the FASHN Agent makes the first look from your photos and every other look from that one, so the model, room, and light stay the same.

One call replaces a request per look, and failed operations never use credits.

Agentic ecommerce

Product content for your whole catalog

Connect the Agent API to your catalog, PIM, or store, and every new product can get on-model photos, packshots, and transparent cutouts automatically.

Run the same workflow for new colorways, product pages, or a month of social posts, and get each result by webhook when the run finishes.

Virtual try-on API

Virtual try-on for apps, stores, and shopping assistants

When shoppers need to see a product on themselves, call the try-on endpoints directly. Send a photo of a person and a product, and get a realistic try-on back in seconds, with official TypeScript and Python SDKs.

Virtual try-on results on people with different body types
  • Try-on apps

    Let people see clothes on their own photos.

  • Online stores

    Add try-on to product pages and fitting rooms.

  • Shopping assistants

    Show a product on the shopper in your AI agent.

Pricing, privacy, and reliability

Simple pricing and clear data handling, so you can launch with confidence.

  • Pay per image

    Agent images use 1 to 4 credits each, at $0.075 per credit, and failed operations are never charged.

  • No subscription

    Buy credits when you need them. Purchased credits stay valid for 12 months.

  • Private by default

    Outputs are deleted after 3 days, and your data isn't used for training unless you opt in.

  • Ready to scale

    Run async jobs with webhooks, monitor uptime on our status page, and ask us to raise your concurrency as you grow.

FASHN AI Banner

Ready to take control of your fashion content?

Join thousands of brands and creators using FASHN AI to create premium product imagery in seconds.

FASHN AI Product Showcase
FAQ

Agent API and try-on API FAQs

Still have questions? Visit our Help Center