FLAM

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-staging.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-staging.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

RouteWhat it does
GET /api/keysList the house's API keys
POST /api/keysMint an organisation API key
DELETE /api/keys/{id}Revoke an API key

MCP

RouteWhat it does
POST /api/mcpMCP server (Streamable HTTP, JSON responses)

Meta

RouteWhat it does
GET /docsSwagger UI rendered over /openapi.json
GET /healthLiveness
GET /openapi.jsonThe merged OpenAPI document this API serves

Assets

RouteWhat it does
GET /api/toolkit/assetsThe 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}/fileStream one asset's bytes (the contract serving route)
PATCH /api/toolkit/assets/batchMove or re-file many pieces at once
POST /api/toolkit/assets/batch/deleteTake many pieces out of the library
POST /api/toolkit/assets/batch/quoteWhat would this cost, for all of them
POST /api/toolkit/assets/groupStamp a fresh shared group onto a set of pieces
POST /api/toolkit/assets/packTake a whole selection as one file
POST /api/toolkit/assets/uploadHang one image in the house library (multipart)
GET /api/toolkit/backgroundsThe whole library a look can stand on
GET /api/toolkit/foldersEvery collection in the house, flat
POST /api/toolkit/foldersCreate 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}/fileStream a batch download's archive

Jobs

RouteWhat it does
GET /api/toolkit/developsThe house's develop RUNS, newest first
POST /api/toolkit/develops/{id}/cancelStop a whole run — honestly
GET /api/toolkit/jobsReconnect backfill — jobs newer than an eventSeq cursor
POST /api/toolkit/jobs/{id}/cancelStop ONE frame
POST /api/toolkit/jobs/{id}/duplicateRun the same frame again as a NEW job
POST /api/toolkit/jobs/submitSubmit an async generation job
GET /api/toolkit/jobs/wsJob event stream (WebSocket upgrade)

Lookbook

RouteWhat it does
GET /api/toolkit/lookbook/looksThe house's looks, newest first (50)
POST /api/toolkit/lookbook/looksCreate 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-lockDevelop the LOOK's lock frame
POST /api/toolkit/lookbook/looks/{id}/lockFreeze the Look Base
POST /api/toolkit/lookbook/looks/{id}/unlockThe explicit intent required before re-developing a locked look
POST /api/toolkit/lookbook/looks/{id}/variationsFan the LOOK out into its variations
GET /api/toolkit/lookbook/templatesShot 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

RouteWhat it does
POST /api/toolkit/factory/planWhat the house INTENDS, before a token moves
POST /api/toolkit/factory/runThe one confirm — create the batch of draft looks
GET /api/toolkit/presetsThe house's standing preset
POST /api/toolkit/presetsSet the house's standing preset

Pipelines

RouteWhat it does
GET /api/toolkit/pipelines/presetsSaved plans — a line with no items bound
POST /api/toolkit/pipelines/presetsSave 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/previewThe number before the click
GET /api/toolkit/pipelines/runsThe house's pipeline runs, newest first
POST /api/toolkit/pipelines/runsStart the line
GET /api/toolkit/pipelines/runs/{id}One run, its compiled steps and its plan
POST /api/toolkit/pipelines/runs/{id}/cancelStop the line

Models

RouteWhat it does
GET /api/toolkit/modelsThe 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}/checkoutOpen the hosted checkout for a face
POST /api/toolkit/models/ownBring your own — register held assets as a personal model

Brand

RouteWhat it does
GET /api/toolkit/brandThe house's extracted visual DNA
PATCH /api/toolkit/brandCorrect the extracted DNA, or switch the injection off
POST /api/toolkit/brand/dnaRead the house's visual DNA off its own imagery
GET /api/toolkit/brand/marksThe house's logo renditions, and which set rides a frame
POST /api/toolkit/brand/marksRegister 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

RouteWhat it does
POST /api/toolkit/ai/depthDepth map for the Lens Blur tool (1 token)
POST /api/toolkit/ai/describe-itemClassify one piece — auto-name + wardrobe bucket (1 token)
POST /api/toolkit/ai/detect-itemsFind every garment and accessory in a frame
POST /api/toolkit/ai/extract-buildRead a body out of a full-length photograph, in casting vocabulary
POST /api/toolkit/ai/extract-characterRead a person out of a reference image (or a four-view collage)
POST /api/toolkit/ai/preflightPre-flight — what will go wrong, before you spend (free)
POST /api/toolkit/ai/segmentA clean cutout of the ONE item that was tapped

Toolkit

RouteWhat it does
POST /api/toolkit/ai/remove-backgroundRemove background (sync, fal birefnet)
GET /api/toolkit/my-access
POST /api/toolkit/takesAnother take — N frames back in, her sentence on each
GET /api/toolkit/tools/{slug}/itemsCurated content items for a tool

Text tools

RouteWhat it does
POST /api/toolkit/ai/face-features20 facial-feature keywords from a portrait (vision lane)
POST /api/toolkit/ai/inspiration-keywordsCategorized keyword sets for a vibe
POST /api/toolkit/ai/midjourney-promptsGenerate N varied shot prompts from a reference description
POST /api/toolkit/ai/prompt-builderBuild one photographic prompt from a subject
POST /api/toolkit/ai/prompt-enhancerImprove a rough prompt (sync text lane)

Explore

RouteWhat it does
GET /api/toolkit/entitlementsWhat this director holds, and any checkout still open
GET /api/toolkit/exploreEvery offering this director may see, across all kinds
POST /api/toolkit/explore/{kind}/{id}/takeTake an offering — free grants now, priced opens checkout

Posts

Chat

RouteWhat it does
POST /api/chatOne turn of the loop
POST /api/chat/applyUndo, redo, and any direct edit
POST /api/chat/context/warmPrepare private chat context
GET /api/chat/sessionsList this director's recent conversations
POST /api/chat/sessionsStart a new conversation
GET /api/chat/sessions/{id}/turnsRestore one conversation
RouteWhat it does
GET /api/toolkit/searchOne field over the whole house

Billing

RouteWhat it does
GET /api/toolkit/ai/billing/autochargeThe house's auto top-up rule, ceiling, card and audit trail
PUT /api/toolkit/ai/billing/autochargeArm, retune or disarm the auto top-up rule (OWNER ONLY)
POST /api/toolkit/ai/billing/autocharge/runFire the standing order if the house is genuinely short
GET /api/toolkit/ai/billing/balanceSpendable token balance + open holds
GET /api/toolkit/ai/billing/catalogPublic pricing catalog (tiers + packs)
POST /api/toolkit/ai/billing/checkout/customHosted Dodo checkout for a pay-what-you-want top-up
POST /api/toolkit/ai/billing/checkout/subscriptionHosted Dodo checkout for a subscription tier
POST /api/toolkit/ai/billing/checkout/topupHosted Dodo checkout for a token pack
POST /api/toolkit/ai/billing/portalOpen the merchant of record's hosted portal (OWNER ONLY)
POST /api/toolkit/ai/billing/webhook/dodoDodo payment webhook (standard-webhooks signature)

Account

RouteWhat it does
GET /api/accountThe director's own account, in one read
DELETE /api/account/avatarRemove your picture
POST /api/account/avatarSet your own picture (multipart)
GET /api/account/avatar/{userId}A user's picture (bytes)
PATCH /api/account/billing-emailSet the house's invoice email
GET /api/account/memoryRead the current house and actor-scoped memory book
POST /api/account/memoryAdd or append a correction to a scoped memory
DELETE /api/account/memory/{id}Retire a scoped active memory
POST /api/account/plan/cancelStop the renewal (cancel at period end)

Me

RouteWhat it does
GET /meThe signed-in user
POST /me/deleteGDPR erasure — delete the caller's account
GET /me/exportGDPR access — export the caller's own user row

Organization

RouteWhat it does
DELETE /api/toolkit/org/seats/{userId}Empty a seat (or leave the house yourself)
POST /api/toolkit/org/seats/acceptTake an offered seat
POST /api/toolkit/org/seats/inviteInvite a teammate into this house
POST /api/toolkit/org/seats/roleChange what a seat may do
POST /api/toolkit/org/transferHand this house to somebody else

Invites

RouteWhat it does
GET /api/toolkit/invite/acceptLook up an invitation token before signing in
POST /api/toolkit/invite/acceptAccept an invitation as the signed-in user
POST /api/toolkit/invite/previewRead what her links say about her
POST /api/toolkit/invite/redeemRedeem an invitation code
POST /api/toolkit/invite/requestRequest an invitation to the house
GET /api/toolkit/invites/mineThis house's invitation link and who has used it

Onboarding

RouteWhat it does
GET /api/toolkit/onboardingFirst-workflow checklist progress
POST /api/toolkit/onboardingComplete a checklist step (idempotent)

Auth

RouteWhat it does
POST /api/toolkit/check-emailRoute an entered email to the right sign-in step

Admin

RouteWhat it does
POST /api/toolkit/admin/accessGrant / revoke toolkit or tool access (admin)
GET /api/toolkit/admin/ai-costsToken/cost usage summary from the ledger (admin)
GET /api/toolkit/admin/analystThe platform analyst's latest 12-hour digest (admin only)
PATCH /api/toolkit/admin/analyst/cadenceSet the analyst's window (admin only)
POST /api/toolkit/admin/analyst/runRun the analyst now (admin only)
GET /api/toolkit/admin/developsDevelop runs across the house, newest first
POST /api/toolkit/admin/develops/actionRetry or cancel a develop
GET /api/toolkit/admin/emailsEvery letter the house sent (email_log)
GET /api/toolkit/admin/entitlementsReal-money purchases across the house
POST /api/toolkit/admin/entitlements/revokeRevoke a granted entitlement (a refund's other half)
GET /api/toolkit/admin/failuresFailures grouped by what the provider actually said
GET /api/toolkit/admin/framesEvery house's outputs, browsable
GET /api/toolkit/admin/frames/{id}/fileThe bytes of any house's frame (admin only)
POST /api/toolkit/admin/grant-tokensComp a token grant to a user (admin)
POST /api/toolkit/admin/inviteOpen the door for one email (admin)
GET /api/toolkit/admin/invite-codesList invitation codes (admin)
POST /api/toolkit/admin/invite-codesMint a shareable invitation code (admin)
POST /api/toolkit/admin/invite-codes/revokeKill an invitation code (admin)
GET /api/toolkit/admin/invite-requestsList invitation requests (admin)
GET /api/toolkit/admin/judge/rollupThe judge's verdicts, counted (admin only)
GET /api/toolkit/admin/judge/verdictsEvery 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-costCost per KEPT frame, per house and per tool, over a window
GET /api/toolkit/admin/longstory/autonomyRead Longstory's delegated authority
POST /api/toolkit/admin/longstory/autonomyCreate a new Longstory authority revision
GET /api/toolkit/admin/memoryObserve living memory across every house
POST /api/toolkit/admin/memory/{id}/reviewApprove or reject one learned memory
POST /api/toolkit/admin/memory/reflection-findings/{id}/decisionAccept 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}/rendersRequest 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/offeringsThe catalogue, as the house sees it
POST /api/toolkit/admin/offeringsCreate or update an offering (price, tier, previews)
POST /api/toolkit/admin/offerings/retireRetire an offering from the board
GET /api/toolkit/admin/onboardingWho is setting up, and how far they got (admin)
GET /api/toolkit/admin/overviewThe house at a glance — the first screen
GET /api/toolkit/admin/paymentsReal transactions — subscriptions, top-ups, offerings, comps
GET /api/toolkit/admin/supportTickets and feedback, with the screenshots directors sent
GET /api/toolkit/admin/tokenomicsWhat a token costs against what we charge, and the funnel
DELETE /api/toolkit/admin/tool-itemsDelete a curated item by id (admin)
GET /api/toolkit/admin/tool-itemsCurated items for one tool (admin)
POST /api/toolkit/admin/tool-itemsAppend a curated item (admin)
GET /api/toolkit/admin/usersAll users with balance + access (admin)

Email

RouteWhat it does
POST /api/toolkit/email/dripPostHog triggers a drip, FLAM sends it
POST /api/toolkit/email/webhook/resendResend delivery webhook (standard-webhooks signature)

Intake

RouteWhat it does
POST /api/toolkit/intakeRecord the answers given at the door

Internal

RouteWhat it does
POST /api/internal/analyst/actions/invitations/{id}/approveApprove one invitation applicant after human confirmation
POST /api/internal/analyst/actions/invitations/{id}/researchResearch one applicant's safe public storefront
POST /api/internal/analyst/actions/recordings/{id}/summarizeAsk PostHog to analyze one session replay
GET /api/internal/analyst/assets/{id}/previewRead one bounded asset thumbnail for visual analysis
GET /api/internal/analyst/chat-qualityHow the chat is doing — self-found lapses, and what it wished it could do
GET /api/internal/analyst/deliverabilityRead email delivery outcomes for the FLAM analyst
GET /api/internal/analyst/experimentsRead bounded PostHog experiment state and aggregate results
GET /api/internal/analyst/failuresRead grouped recent failures for the FLAM analyst
GET /api/internal/analyst/feature-flagsRead bounded PostHog feature flag state
GET /api/internal/analyst/funnelRead FLAM's fixed acquisition and activation funnel
GET /api/internal/analyst/invitationsRead the bounded invitation applicant queue
GET /api/internal/analyst/learningsRead recent cross-house learnings for the FLAM analyst
GET /api/internal/analyst/longstoryRead Longstory lessons, interventions, evidence, and cost
GET /api/internal/analyst/product-usageRead bounded PostHog product usage for the FLAM analyst
GET /api/internal/analyst/recordingsRead bounded PostHog session replay metadata
GET /api/internal/analyst/recordings/{id}/analysisRead PostHog's stored AI analysis of one session replay
GET /api/internal/analyst/rejectionsRead explicit generation rejection evidence
GET /api/internal/analyst/snapshotRead a bounded platform snapshot for the FLAM analyst
GET /api/internal/analyst/supportRead bounded PostHog support tickets
POST /api/internal/replay-renders/{id}/completeStore a completed replay video render
POST /api/internal/replay-renders/{id}/failRecord a failed replay video render
POST /api/internal/replay-renders/claimClaim one replay render job

Judge

RouteWhat it does
POST /api/toolkit/judge/redrawDraw it again, with the fix carried
GET /api/toolkit/judge/verdictsThe judge's verdicts for a batch of frames
GET /api/toolkit/judge/verdicts/{jobId}One frame's verdict
POST /api/toolkit/judge/verdicts/{jobId}/labelShe tells us the judge was wrong (L2)

Notifications

RouteWhat it does
GET /api/notificationsThe board — what happened while she was gone
GET /api/notifications/{id}/opinionThe facts behind the house's opinion of one board row
POST /api/notifications/readShe saw it

Postures

RouteWhat it does
GET /api/toolkit/posturesThe posture library, the control axes, and this house's preferences
PUT /api/toolkit/postures/prefsStar, default, add to Explore, and save her own variations

Share

RouteWhat it does
GET /api/shareWhat this house has sent
POST /api/shareMint a link a brand can open with no account
POST /api/share/{id}/revokeClose 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}/finishSay you are done
POST /api/share/{token}/markSay keep or pass on one frame
GET /api/toolkit/folders/{id}/coverageWhat is done in this collection, and what is still missing
GET /api/toolkit/share-marksWhat came back, on these frames

Support

RouteWhat it does
POST /api/support/escalationsRecord a support chat that needed a human
POST /api/toolkit/support/screenshotsAttach a screenshot to a support ticket
GET /api/toolkit/support/screenshots/{id}Open a screenshot from a support ticket
GET /api/toolkit/support/ticketsThe tickets this director has raised
POST /api/toolkit/support/ticketsRaise a support ticket, or reply on one
GET /api/toolkit/support/tickets/{id}The messages on one ticket

Takes

RouteWhat it does
GET /api/toolkit/standing-notesEvery standing note this house holds, in force and retired
POST /api/toolkit/standing-notesPromote 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

RouteWhat it does
GET /api/toolkit/webhooksList the house's endpoints
POST /api/toolkit/webhooksRegister an endpoint FLAM should call
DELETE /api/toolkit/webhooks/{id}Remove an endpoint