Developers · REST · OpenAPI 3.1 · MCP
Develop a photograph in four calls.
The pipeline behind the Flashlook studio, as a REST API. Add a garment, put it on a model, and watch the task develop into an on-model photograph. Included on every paid plan, from $19/mo.
Simulated timing. Real endpoints, fields and stages. Click a line to jump.
Playground
The call sheet.
Compose a shoot the way a photographer briefs one. Every option is read live from GET /options, the cost from the public GET /price-quote, and the request writes itself in your language.
On this page
How tasks develop
- POST
202 Accepted
taskIds[] · one task per image. Credits are reserved now.
- queued
Queued
Waiting for a render slot. stage: "Queued".
- running
Developing
progress 0-100, stage, etaSeconds. Poll every 1-2s.
- succeeded
Developed
result.image is a permanent https URL.
Any task can end here instead, with an error string. Each image is its own task, so one failure refunds that image only, never the batch.
# Start the shoot, keep the first task id
TASK=$(curl -sS -X POST https://flashlook.ai/api/json/v1/shoots \
-H "Authorization: Bearer $FLASHLOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"productId":"…","modelIds":["…"],"count":1}' | jq -r '.taskIds[0]')
# Poll every 2s until it develops (or fails, and is refunded)
while :; do
T=$(curl -sS https://flashlook.ai/api/json/v1/tasks/$TASK -H "Authorization: Bearer $FLASHLOOK_API_KEY")
STATUS=$(echo "$T" | jq -r .status)
echo "$STATUS $(echo "$T" | jq -r '.progress // 0')%"
[ "$STATUS" = succeeded ] && echo "$T" | jq -r .result.image && break
[ "$STATUS" = failed ] && echo "$T" | jq -r .error && break
sleep 2
doneRecipes
Your first shoot
One product, one model, two frames. The shape of every integration.
API keys
Authentication
Send your key as a bearer token on every request. There are no other credentials, and no cookie is involved.
curl -sS https://flashlook.ai/api/json/v1/account \
-H "Authorization: Bearer fl_live_…"- A key acts as its owner: your products, your models, your credits.
- The base URL is
https://flashlook.ai/api/json/v1./api/v1is a permanent alias with identical behaviour. - Missing, unknown, revoked and expired keys all return the same
401 INVALID_API_KEY, deliberately, so a probe learns nothing. - Requests are rate limited per key. The
RateLimitheaders tell you where you stand; a429carriesRetry-After.
Endpoints
Render tiers, limits & credits
Valid values
Errors
- 400
(no code)Invalid body.
detailscarries the field-level issues.Fix: Read
details: each issue names the field and what was wrong. Values for enum fields come from GET /options. - 400
TOO_MANY_MODELSMore than 2 library models in one shoot.
Fix: Send at most 2 ids in
modelIds. For more faces, run separate shoots. - 400
INVALID_JSONThe request body was not parseable JSON.
Fix: Send
Content-Type: application/jsonand a JSON body. In shells, wrap the body in single quotes. - 401
INVALID_API_KEYMissing, unknown, revoked or expired key. Deliberately indistinguishable.
Fix: Send
Authorization: Bearer fl_live_…. If that's already right, the key was revoked: create a new one under API keys. - 402
INSUFFICIENT_CREDITSNot enough credits for the whole batch. Nothing was charged.
Fix: Check GET /account, then top up or lower
count. Quote first with GET /price-quote to avoid this. - 403
PLAN_REQUIREDThe REST API needs a paid plan. The key is valid; the account is on Free. (The same key works on MCP on every plan.)
Fix: Upgrade to any paid plan at /pricing. The same key starts working on REST within a minute - no new key needed.
- 403
PRODUCT_LIMITActive product cap reached.
Fix: Archive products you're done with (DELETE /products/{id}) to free slots.
- 403
SMART_PICK_DENIEDPlan does not include Smart Pick.
Fix: Pick a model yourself from GET /models, or upgrade the plan.
- 404
(no code)Not found, or not owned by this key's user.
Fix: Ids are per account: a product from another account is a 404, by design. List yours to get valid ids.
- 409
DUPLICATE_NAMEYou already have a preset with that name.
Fix: Pick another name, or PATCH the existing preset.
- 429
RATE_LIMITEDToo many requests.
Retry-Aftersays when to resume.Fix: Wait
Retry-Afterseconds. When polling tasks, every 1-2s is plenty. - 503
(no code)Generation is not configured on the server.
Fix: Temporary on our side. Retry with backoff; nothing was charged.
FAQ
Do I need a paid plan to use the API or MCP?
Do I need a paid plan to use the API or MCP?
MCP for ChatGPT, Claude and Cursor works on every plan, Free included. The REST API is included on every paid plan, from Starter at $19/mo. Keys are self-serve and spend the same credits as the studio. Rate limits grow with the plan (Starter 300 requests/min per key, up to 2,400 on Flex). The free plan covers the studio and MCP: 600 signup credits to try the workflow.
Does generating through the API cost more?
Does generating through the API cost more?
No. A shoot costs the same credits whether it comes from the studio, a script, or an agent. Reading options, listing your library and quoting a price are all free; only generation spends. Call the price-quote endpoint before a batch and you will know the exact cost first.
What can someone do with my API key?
What can someone do with my API key?
A key acts as you: your products, your models, your credits. Treat it like a password. You can create a separate key per machine or per CI job and revoke any of them independently, and a revoked key stops working on its very next request.
Why does a shoot return a task id instead of an image?
Why does a shoot return a task id instead of an image?
Generation takes 60 to 150 seconds depending on the render tier, which is far longer than a sensible HTTP request. So every generating endpoint answers immediately with one task id per image, and you poll the task endpoint every second or two until it reports succeeded or failed. Each image bills and refunds independently, so one failure in a batch of ten only costs you that one.
Can my agent shoot a whole collection at once?
Can my agent shoot a whole collection at once?
Yes. The Collection Autopilot tools take every photo of a drop and group them into products and colorways. They style each one into a full look and run the shoot two products at a time. The agent checks progress and hands you the image URLs. Starting a run requires the quoted credit total, so an agent can't spend before you've seen the price. The same flow is available over the REST API under /collections.
Which agents can connect?
Which agents can connect?
Anything that speaks MCP over HTTP and lets you set a request header: Claude Code, Cursor, Codex, VS Code, OpenClaw, Hermes. Add the connector URL with an Authorization header carrying your API key and the tools appear in that session.
What can an agent actually do?
What can an agent actually do?
Everything the API can. It can add products from local files, cast and render a fashion model, run a shoot and hand back image URLs, animate a still into a clip, browse what you generated last week, and check your credit balance before it spends anything.
How does an agent know the valid poses and scenes?
How does an agent know the valid poses and scenes?
It asks. The options endpoint returns every render tier, limit and taxonomy value with no key required, so an agent discovers what is valid instead of guessing. Unrecognised values are ignored by the pipeline rather than rejected, so responses also echo any body fields that were dropped - a typo shows up instead of quietly producing the wrong photo.
Are there rate limits?
Are there rate limits?
Yes, per key, and generous enough that a normal integration never notices. Credits are the real quota; the request limits exist so a runaway loop cannot saturate the render queue for everyone else. Responses carry standard RateLimit headers, and a 429 tells you when to retry.
Is there an OpenAPI spec or an SDK?
Is there an OpenAPI spec or an SDK?
There is a full OpenAPI 3.1 document you can point a generator or an agent at, linked from the API page. There is no official SDK yet - the API is plain JSON over HTTPS with a bearer token, so a few lines of fetch or requests is genuinely all it takes.
Agents & MCP
A hosted MCP server exposes the same capabilities as tools. ChatGPT and Claude.ai connect by signing in; Claude Code, Cursor, Codex and VS Code use a key.
claude mcp add --transport http flashlook https://flashlook.ai/api/mcp \
--header "Authorization: Bearer $FLASHLOOK_API_KEY"
