API reference
Every one of the 229 routes the FLAM API serves, generated from the OpenAPI document the API itself publishes — parameters, responses and a runnable curl for each.
229 operations in 35 groups. Each group is one page: every route in it with its parameters, its responses, an example body and a curl you can paste. The pages are built from the running contract on every deploy — a route that answers is on this page, and a route that is gone has left it.
Built for agents as much as for people
The machine-readable document is on this origin at /openapi.json — point a
generated client, a typed SDK or an agent at it directly. An MCP server is at
POST /api/mcp, which is the shorter path for an agent that just
wants to commission work and watch it land.
Start here
# 1. Mint an organisation key (needs a browser session — a key cannot mint a key).
curl -X POST "https://api.flam.fashion/api/keys" \
-H "Content-Type: application/json" \
-b "$SESSION_COOKIE" \
-d '{"name":"my agent","role":"member"}'
# 2. Every call after that is the same header.
export FLAM_API_KEY="flam_sk_…"
curl "https://api.flam.fashion/api/me" -H "Authorization: Bearer $FLAM_API_KEY"A key belongs to the organisation, not to a person: the organisation owns the work, the imagery and the money, and a person is only attribution. Taking someone off the team cannot orphan a running integration. Roles, revocation and what a key may never do are on The API.
Every route
API keys
| Route | What it does |
|---|---|
GET /api/keys | List the house's API keys |
POST /api/keys | Mint an organisation API key |
DELETE /api/keys/{id} | Revoke an API key |
MCP
| Route | What it does |
|---|---|
POST /api/mcp | MCP server (Streamable HTTP, JSON responses) |
Meta
| Route | What it does |
|---|---|
GET /docs | Swagger UI rendered over /openapi.json |
GET /health | Liveness |
GET /openapi.json | The merged OpenAPI document this API serves |
Assets
| Route | What it does |
|---|---|
GET /api/toolkit/assets | The house's captured assets, newest first |
GET /api/toolkit/assets/{id} | Stream one asset's bytes from R2 (owner-gated) |
PATCH /api/toolkit/assets/{id} | Rename, classify, tag or move one piece |
GET /api/toolkit/assets/{id}/file | Stream one asset's bytes (the contract serving route) |
PATCH /api/toolkit/assets/batch | Move or re-file many pieces at once |
POST /api/toolkit/assets/batch/delete | Take many pieces out of the library |
POST /api/toolkit/assets/batch/quote | What would this cost, for all of them |
POST /api/toolkit/assets/group | Stamp a fresh shared group onto a set of pieces |
POST /api/toolkit/assets/pack | Take a whole selection as one file |
POST /api/toolkit/assets/upload | Hang one image in the house library (multipart) |
GET /api/toolkit/backgrounds | The whole library a look can stand on |
GET /api/toolkit/folders | Every collection in the house, flat |
POST /api/toolkit/folders | Create a collection |
PATCH /api/toolkit/folders/{id} | Rename a collection |
GET /api/toolkit/packs/{id} | Where a pack got to |
GET /api/toolkit/packs/{id}/file | Stream a batch download's archive |
Jobs
| Route | What it does |
|---|---|
GET /api/toolkit/develops | The house's develop RUNS, newest first |
POST /api/toolkit/develops/{id}/cancel | Stop a whole run — honestly |
GET /api/toolkit/jobs | Reconnect backfill — jobs newer than an eventSeq cursor |
POST /api/toolkit/jobs/{id}/cancel | Stop ONE frame |
POST /api/toolkit/jobs/{id}/duplicate | Run the same frame again as a NEW job |
POST /api/toolkit/jobs/submit | Submit an async generation job |
GET /api/toolkit/jobs/ws | Job event stream (WebSocket upgrade) |
Lookbook
| Route | What it does |
|---|---|
GET /api/toolkit/lookbook/looks | The house's looks, newest first (50) |
POST /api/toolkit/lookbook/looks | Create a look from the director's three choices |
GET /api/toolkit/lookbook/looks/{id} | One look, whole — selections, lock state, the variation batch |
POST /api/toolkit/lookbook/looks/{id}/develop-lock | Develop the LOOK's lock frame |
POST /api/toolkit/lookbook/looks/{id}/lock | Freeze the Look Base |
POST /api/toolkit/lookbook/looks/{id}/unlock | The explicit intent required before re-developing a locked look |
POST /api/toolkit/lookbook/looks/{id}/variations | Fan the LOOK out into its variations |
GET /api/toolkit/lookbook/templates | Shot templates — the house's built-ins plus the caller's own |
GET /api/toolkit/lookbook/templates/{id} | One template and its shots, in order |
Factory
| Route | What it does |
|---|---|
POST /api/toolkit/factory/plan | What the house INTENDS, before a token moves |
POST /api/toolkit/factory/run | The one confirm — create the batch of draft looks |
GET /api/toolkit/presets | The house's standing preset |
POST /api/toolkit/presets | Set the house's standing preset |
Pipelines
| Route | What it does |
|---|---|
GET /api/toolkit/pipelines/presets | Saved plans — a line with no items bound |
POST /api/toolkit/pipelines/presets | Save a plan as a preset |
DELETE /api/toolkit/pipelines/presets/{id} | Delete a saved plan |
PATCH /api/toolkit/pipelines/presets/{id} | Replace a saved plan |
POST /api/toolkit/pipelines/preview | The number before the click |
GET /api/toolkit/pipelines/runs | The house's pipeline runs, newest first |
POST /api/toolkit/pipelines/runs | Start the line |
GET /api/toolkit/pipelines/runs/{id} | One run, its compiled steps and its plan |
POST /api/toolkit/pipelines/runs/{id}/cancel | Stop the line |
Models
| Route | What it does |
|---|---|
GET /api/toolkit/models | The casting board |
GET /api/toolkit/models/{id} | One face |
PATCH /api/toolkit/models/{id} | Add to your own model's dossier — her range, her build, her marks |
POST /api/toolkit/models/{id}/checkout | Open the hosted checkout for a face |
POST /api/toolkit/models/own | Bring your own — register held assets as a personal model |
Brand
| Route | What it does |
|---|---|
GET /api/toolkit/brand | The house's extracted visual DNA |
PATCH /api/toolkit/brand | Correct the extracted DNA, or switch the injection off |
POST /api/toolkit/brand/dna | Read the house's visual DNA off its own imagery |
GET /api/toolkit/brand/marks | The house's logo renditions, and which set rides a frame |
POST /api/toolkit/brand/marks | Register an uploaded image as a rendition of the mark |
DELETE /api/toolkit/brand/marks/{id} | Take a rendition out of the rotation |
PATCH /api/toolkit/brand/marks/{id} | Correct a rendition's material, placement, note or riding order |
AI
| Route | What it does |
|---|---|
POST /api/toolkit/ai/depth | Depth map for the Lens Blur tool (1 token) |
POST /api/toolkit/ai/describe-item | Classify one piece — auto-name + wardrobe bucket (1 token) |
POST /api/toolkit/ai/detect-items | Find every garment and accessory in a frame |
POST /api/toolkit/ai/extract-build | Read a body out of a full-length photograph, in casting vocabulary |
POST /api/toolkit/ai/extract-character | Read a person out of a reference image (or a four-view collage) |
POST /api/toolkit/ai/preflight | Pre-flight — what will go wrong, before you spend (free) |
POST /api/toolkit/ai/segment | A clean cutout of the ONE item that was tapped |
Toolkit
| Route | What it does |
|---|---|
POST /api/toolkit/ai/remove-background | Remove background (sync, fal birefnet) |
GET /api/toolkit/my-access | — |
POST /api/toolkit/takes | Another take — N frames back in, her sentence on each |
GET /api/toolkit/tools/{slug}/items | Curated content items for a tool |
Text tools
| Route | What it does |
|---|---|
POST /api/toolkit/ai/face-features | 20 facial-feature keywords from a portrait (vision lane) |
POST /api/toolkit/ai/inspiration-keywords | Categorized keyword sets for a vibe |
POST /api/toolkit/ai/midjourney-prompts | Generate N varied shot prompts from a reference description |
POST /api/toolkit/ai/prompt-builder | Build one photographic prompt from a subject |
POST /api/toolkit/ai/prompt-enhancer | Improve a rough prompt (sync text lane) |
Explore
| Route | What it does |
|---|---|
GET /api/toolkit/entitlements | What this director holds, and any checkout still open |
GET /api/toolkit/explore | Every offering this director may see, across all kinds |
POST /api/toolkit/explore/{kind}/{id}/take | Take an offering — free grants now, priced opens checkout |
Posts
| Route | What it does |
|---|---|
GET /posts | — |
POST /posts | — |
DELETE /posts/{id} | — |
GET /posts/{id} | — |
PATCH /posts/{id} | — |
Chat
| Route | What it does |
|---|---|
POST /api/chat | One turn of the loop |
POST /api/chat/apply | Undo, redo, and any direct edit |
POST /api/chat/context/warm | Prepare private chat context |
GET /api/chat/sessions | List this director's recent conversations |
POST /api/chat/sessions | Start a new conversation |
GET /api/chat/sessions/{id}/turns | Restore one conversation |
Search
| Route | What it does |
|---|---|
GET /api/toolkit/search | One field over the whole house |
Billing
| Route | What it does |
|---|---|
GET /api/toolkit/ai/billing/autocharge | The house's auto top-up rule, ceiling, card and audit trail |
PUT /api/toolkit/ai/billing/autocharge | Arm, retune or disarm the auto top-up rule (OWNER ONLY) |
POST /api/toolkit/ai/billing/autocharge/run | Fire the standing order if the house is genuinely short |
GET /api/toolkit/ai/billing/balance | Spendable token balance + open holds |
GET /api/toolkit/ai/billing/catalog | Public pricing catalog (tiers + packs) |
POST /api/toolkit/ai/billing/checkout/custom | Hosted Dodo checkout for a pay-what-you-want top-up |
POST /api/toolkit/ai/billing/checkout/subscription | Hosted Dodo checkout for a subscription tier |
POST /api/toolkit/ai/billing/checkout/topup | Hosted Dodo checkout for a token pack |
POST /api/toolkit/ai/billing/portal | Open the merchant of record's hosted portal (OWNER ONLY) |
POST /api/toolkit/ai/billing/webhook/dodo | Dodo payment webhook (standard-webhooks signature) |
Account
| Route | What it does |
|---|---|
GET /api/account | The director's own account, in one read |
DELETE /api/account/avatar | Remove your picture |
POST /api/account/avatar | Set your own picture (multipart) |
GET /api/account/avatar/{userId} | A user's picture (bytes) |
PATCH /api/account/billing-email | Set the house's invoice email |
GET /api/account/memory | Read the current house and actor-scoped memory book |
POST /api/account/memory | Add or append a correction to a scoped memory |
DELETE /api/account/memory/{id} | Retire a scoped active memory |
POST /api/account/plan/cancel | Stop the renewal (cancel at period end) |
Me
| Route | What it does |
|---|---|
GET /me | The signed-in user |
POST /me/delete | GDPR erasure — delete the caller's account |
GET /me/export | GDPR access — export the caller's own user row |
Organization
| Route | What it does |
|---|---|
DELETE /api/toolkit/org/seats/{userId} | Empty a seat (or leave the house yourself) |
POST /api/toolkit/org/seats/accept | Take an offered seat |
POST /api/toolkit/org/seats/invite | Invite a teammate into this house |
POST /api/toolkit/org/seats/role | Change what a seat may do |
POST /api/toolkit/org/transfer | Hand this house to somebody else |
Invites
| Route | What it does |
|---|---|
GET /api/toolkit/invite/accept | Look up an invitation token before signing in |
POST /api/toolkit/invite/accept | Accept an invitation as the signed-in user |
POST /api/toolkit/invite/preview | Read what her links say about her |
POST /api/toolkit/invite/redeem | Redeem an invitation code |
POST /api/toolkit/invite/request | Request an invitation to the house |
GET /api/toolkit/invites/mine | This house's invitation link and who has used it |
Onboarding
| Route | What it does |
|---|---|
GET /api/toolkit/onboarding | First-workflow checklist progress |
POST /api/toolkit/onboarding | Complete a checklist step (idempotent) |
Auth
| Route | What it does |
|---|---|
POST /api/toolkit/check-email | Route an entered email to the right sign-in step |
Admin
| Route | What it does |
|---|---|
POST /api/toolkit/admin/access | Grant / revoke toolkit or tool access (admin) |
GET /api/toolkit/admin/ai-costs | Token/cost usage summary from the ledger (admin) |
GET /api/toolkit/admin/analyst | The platform analyst's latest 12-hour digest (admin only) |
PATCH /api/toolkit/admin/analyst/cadence | Set the analyst's window (admin only) |
POST /api/toolkit/admin/analyst/run | Run the analyst now (admin only) |
GET /api/toolkit/admin/develops | Develop runs across the house, newest first |
POST /api/toolkit/admin/develops/action | Retry or cancel a develop |
GET /api/toolkit/admin/emails | Every letter the house sent (email_log) |
GET /api/toolkit/admin/entitlements | Real-money purchases across the house |
POST /api/toolkit/admin/entitlements/revoke | Revoke a granted entitlement (a refund's other half) |
GET /api/toolkit/admin/failures | Failures grouped by what the provider actually said |
GET /api/toolkit/admin/frames | Every house's outputs, browsable |
GET /api/toolkit/admin/frames/{id}/file | The bytes of any house's frame (admin only) |
POST /api/toolkit/admin/grant-tokens | Comp a token grant to a user (admin) |
POST /api/toolkit/admin/invite | Open the door for one email (admin) |
GET /api/toolkit/admin/invite-codes | List invitation codes (admin) |
POST /api/toolkit/admin/invite-codes | Mint a shareable invitation code (admin) |
POST /api/toolkit/admin/invite-codes/revoke | Kill an invitation code (admin) |
GET /api/toolkit/admin/invite-requests | List invitation requests (admin) |
GET /api/toolkit/admin/judge/rollup | The judge's verdicts, counted (admin only) |
GET /api/toolkit/admin/judge/verdicts | Every judged frame, across every house (admin only) |
GET /api/toolkit/admin/judge/verdicts/{jobId} | One judged frame, whole (admin only) |
GET /api/toolkit/admin/kept-cost | Cost per KEPT frame, per house and per tool, over a window |
GET /api/toolkit/admin/longstory/autonomy | Read Longstory's delegated authority |
POST /api/toolkit/admin/longstory/autonomy | Create a new Longstory authority revision |
GET /api/toolkit/admin/memory | Observe living memory across every house |
POST /api/toolkit/admin/memory/{id}/review | Approve or reject one learned memory |
POST /api/toolkit/admin/memory/reflection-findings/{id}/decision | Accept or reject one evidence-backed reflection proposal |
GET /api/toolkit/admin/memory/replay-evidence/{id} | Open one audited session replay evidence moment |
POST /api/toolkit/admin/memory/replay-evidence/{id}/renders | Request an optional video rendering of replay evidence |
GET /api/toolkit/admin/memory/replay-evidence/{id}/renders/{renderId} | Download one audited replay evidence video |
GET /api/toolkit/admin/offerings | The catalogue, as the house sees it |
POST /api/toolkit/admin/offerings | Create or update an offering (price, tier, previews) |
POST /api/toolkit/admin/offerings/retire | Retire an offering from the board |
GET /api/toolkit/admin/onboarding | Who is setting up, and how far they got (admin) |
GET /api/toolkit/admin/overview | The house at a glance — the first screen |
GET /api/toolkit/admin/payments | Real transactions — subscriptions, top-ups, offerings, comps |
GET /api/toolkit/admin/support | Tickets and feedback, with the screenshots directors sent |
GET /api/toolkit/admin/tokenomics | What a token costs against what we charge, and the funnel |
DELETE /api/toolkit/admin/tool-items | Delete a curated item by id (admin) |
GET /api/toolkit/admin/tool-items | Curated items for one tool (admin) |
POST /api/toolkit/admin/tool-items | Append a curated item (admin) |
GET /api/toolkit/admin/users | All users with balance + access (admin) |
| Route | What it does |
|---|---|
POST /api/toolkit/email/drip | PostHog triggers a drip, FLAM sends it |
POST /api/toolkit/email/webhook/resend | Resend delivery webhook (standard-webhooks signature) |
Intake
| Route | What it does |
|---|---|
POST /api/toolkit/intake | Record the answers given at the door |
Internal
| Route | What it does |
|---|---|
POST /api/internal/analyst/actions/invitations/{id}/approve | Approve one invitation applicant after human confirmation |
POST /api/internal/analyst/actions/invitations/{id}/research | Research one applicant's safe public storefront |
POST /api/internal/analyst/actions/recordings/{id}/summarize | Ask PostHog to analyze one session replay |
GET /api/internal/analyst/assets/{id}/preview | Read one bounded asset thumbnail for visual analysis |
GET /api/internal/analyst/chat-quality | How the chat is doing — self-found lapses, and what it wished it could do |
GET /api/internal/analyst/deliverability | Read email delivery outcomes for the FLAM analyst |
GET /api/internal/analyst/experiments | Read bounded PostHog experiment state and aggregate results |
GET /api/internal/analyst/failures | Read grouped recent failures for the FLAM analyst |
GET /api/internal/analyst/feature-flags | Read bounded PostHog feature flag state |
GET /api/internal/analyst/funnel | Read FLAM's fixed acquisition and activation funnel |
GET /api/internal/analyst/invitations | Read the bounded invitation applicant queue |
GET /api/internal/analyst/learnings | Read recent cross-house learnings for the FLAM analyst |
GET /api/internal/analyst/longstory | Read Longstory lessons, interventions, evidence, and cost |
GET /api/internal/analyst/product-usage | Read bounded PostHog product usage for the FLAM analyst |
GET /api/internal/analyst/recordings | Read bounded PostHog session replay metadata |
GET /api/internal/analyst/recordings/{id}/analysis | Read PostHog's stored AI analysis of one session replay |
GET /api/internal/analyst/rejections | Read explicit generation rejection evidence |
GET /api/internal/analyst/snapshot | Read a bounded platform snapshot for the FLAM analyst |
GET /api/internal/analyst/support | Read bounded PostHog support tickets |
POST /api/internal/replay-renders/{id}/complete | Store a completed replay video render |
POST /api/internal/replay-renders/{id}/fail | Record a failed replay video render |
POST /api/internal/replay-renders/claim | Claim one replay render job |
Judge
| Route | What it does |
|---|---|
POST /api/toolkit/judge/redraw | Draw it again, with the fix carried |
GET /api/toolkit/judge/verdicts | The judge's verdicts for a batch of frames |
GET /api/toolkit/judge/verdicts/{jobId} | One frame's verdict |
POST /api/toolkit/judge/verdicts/{jobId}/label | She tells us the judge was wrong (L2) |
Notifications
| Route | What it does |
|---|---|
GET /api/notifications | The board — what happened while she was gone |
GET /api/notifications/{id}/opinion | The facts behind the house's opinion of one board row |
POST /api/notifications/read | She saw it |
Postures
| Route | What it does |
|---|---|
GET /api/toolkit/postures | The posture library, the control axes, and this house's preferences |
PUT /api/toolkit/postures/prefs | Star, default, add to Explore, and save her own variations |
Share
| Route | What it does |
|---|---|
GET /api/share | What this house has sent |
POST /api/share | Mint a link a brand can open with no account |
POST /api/share/{id}/revoke | Close a link now |
GET /api/share/{token} | Open a send (no account, no session) |
GET /api/share/{token}/f/{i} | The bytes of one frame in a send |
POST /api/share/{token}/finish | Say you are done |
POST /api/share/{token}/mark | Say keep or pass on one frame |
GET /api/toolkit/folders/{id}/coverage | What is done in this collection, and what is still missing |
GET /api/toolkit/share-marks | What came back, on these frames |
Support
| Route | What it does |
|---|---|
POST /api/support/escalations | Record a support chat that needed a human |
POST /api/toolkit/support/screenshots | Attach a screenshot to a support ticket |
GET /api/toolkit/support/screenshots/{id} | Open a screenshot from a support ticket |
GET /api/toolkit/support/tickets | The tickets this director has raised |
POST /api/toolkit/support/tickets | Raise a support ticket, or reply on one |
GET /api/toolkit/support/tickets/{id} | The messages on one ticket |
Takes
| Route | What it does |
|---|---|
GET /api/toolkit/standing-notes | Every standing note this house holds, in force and retired |
POST /api/toolkit/standing-notes | Promote a direction to a standing note — her tap, never inference |
PATCH /api/toolkit/standing-notes/{id} | Retire a standing note, or narrow its scope |
Webhooks
| Route | What it does |
|---|---|
GET /api/toolkit/webhooks | List the house's endpoints |
POST /api/toolkit/webhooks | Register an endpoint FLAM should call |
DELETE /api/toolkit/webhooks/{id} | Remove an endpoint |
The API
Mint an organization key, send it as a bearer token, and every route answers. An MCP endpoint gives an agent twelve tools — the same house a director works in. Outbound webhooks are not built.
API keys
3 API keys routes on the FLAM API: List the house's API keys; Mint an organisation API key; Revoke an API key.