API
Lock one visual style and its palette, then let your scripts, CI jobs and AI agents generate the on-style asset system — app icons, favicons, og-images, empty states, per-screen illustrations. One key, one URL, and every image is checked against the locked style before you get it, the same guarantee the app gives you.
1. Connect without a key
Claude Desktop, claude.ai and ChatGPT connect on their own. Add a custom connector with this URL:
https://app.stylelock.dev/api/mcp
Sign in to Stylelock when the browser opens and press Allow. Nothing to copy or install. The connection appears in the app under account menu → API Keys, named after the app; revoke it there to disconnect.
2. Connect with a key
For Claude Code, Cursor, VS Code, scripts and CI. In the app, open account menu → API Keys and create a key. It starts with sl_, is shown once, and covers your account's projects. The same screen gives you the setup below with your key already filled in, plus one-click install buttons for Cursor and VS Code.
Claude Code, one command (--scope user makes Stylelock available in every project, not only the folder you ran it in):
claude mcp add --scope user --transport http stylelock https://app.stylelock.dev/api/mcp \
--header "Authorization: Bearer sl_your_key"
Cursor, VS Code, Windsurf and most other editors take a config entry:
{
"mcpServers": {
"stylelock": {
"url": "https://app.stylelock.dev/api/mcp",
"headers": { "Authorization": "Bearer sl_your_key" }
}
}
}
Scripts send the key on every request in an Authorization: Bearer header. Revoke a key any time from the same screen.
Once connected, ask your agent to call list_projects: an answer proves the connection. Then ask it to explore a style for your product; the first explore is free.
3. The tools
The connector's own instructions teach the assistant the routine, so you do not have to. In order:
- Explore, then lock.
explore_styleturns a brief into three candidate looks as images, each checked by a vision model;lock_stylemakes the one you choose the project's style reference.list_stylesshows the curated catalogue to start from. - Colours.
suggest_paletteanswers two or three palette directions from the product description, its CSS tokens and what users say — one keeping your brand hue, one a new hue — each a complete design-token system for light and dark, with every intended text and control pair measured and none failing, and what choosing it costs.lock_palettewrites it to the project and says where it came from;export_tokenswrites the locked system as CSS, Flutter or JSON.review_stylereads your stylesheets against each other and the locked palette and names, with file and line, a token that differs between files, one button in several colours, off-palette colours and low contrast.lock_visual_systemlocks the rest of the look beside the palette — which colour is the page, the cards, the text and the one primary action, the fonts, the type sizes, and radius, shadow, spacing and background rules — from your own tokens or chosen here. - Plan, then generate.
plan_asset_packproposes the exact assets a set of screens and spots needs;generate_assetsrenders the ones you select on the locked style and checks each;edit_asset(background, crop, resize) andvectorize_asset(SVG) refine them;export_packanswers a repo-ready pack — AppIcon.appiconset, Android mipmaps, favicons, og-image, manifest. - Around it.
create_project(a project per product, made by the agent itself),list_projects,list_assets,get_asset, andproject_setup, which writes the project file below, the full rules as.stylelock/AGENTS.md, and a one-line pointer for your AGENTS.md.
Money. Exploring and generating are the paid steps; everything else is free. Each paid tool states its price in its own description, the first style explore on an account is free, and every paid result states the exact charge — so an agent can try, look, and try again, and it is told never to spend without you agreeing. Pass the same idempotencyKey on a retry and the same answer comes back, with nothing charged twice. When the balance is empty the call answers 402 and nothing is rendered; top up in the app under Credits.
4. Working inside a project
A project that uses Stylelock keeps .stylelock/stylelock.json, committed to the repo. It holds ids and what was locked — never a key:
{
"version": 1,
"family": { "version": 1 },
"account": "app.stylelock.dev",
"project": { "id": "…", "name": "Acme" },
"palette": { "accent": "#2563EB", "secondary": "#0EA5E9", "bg": "#F8FAFC", "source": "stylelock" },
"style": { "id": "…", "name": "flat-minimal", "source": "stylelock" }
}
- Opening a project: the assistant reads the file and continues with the locked style and palette — no re-exploring, no drift.
- No file yet: it lists what the account has, creates a project with
create_projectwhen there is none, or proposes an explore;project_setupwrites the file once something is locked and adds one line to your AGENTS.md pointing at.stylelock/AGENTS.md— appended to the file you already have, never replacing it. The rules in that folder refresh themselves: when the server is newer, the assistant rewrites.stylelock/and nothing else. Nothing to download. - One brand across our tools: if the project also carries a Mascotline or Layoutline file, the assistant hands it in with the call (
siblings) and every picture takes the colours already locked for the brand; the result says where they came from. Where a sister tool would help, the result suggests it, with its price.
When a call is refused
401 — no key, or a key we do not recognise
Check the header. A revoked or banned key answers 403.
404 — the project is not yours
Pass a project id from .stylelock/stylelock.json or list_projects.
400 — the brief names the artifact, not the artwork
Describe what should be drawn ("a running shoe mid-stride"), not "an app icon" or "a logo"; the result names the word to change.
409 — the style is already locked
A project locks one style. Create another project for a second look.
402 — out of credits
Top up under Credits and retry with the same idempotencyKey.
429 — this key is over its calls per minute
Wait the seconds given in Retry-After, then send the same request again.
What's new for agents
- 1.51.0 — 2026-10-11. compose_store_screenshots draws Vietnamese captions and accented Latin letters in any language in the locked fonts; a locked font without them gives way, for that role across the whole set, to one face that draws them, and the answer says so. With language "vi" a headline is counted by characters (up to 40), not words.
- 1.50.1 — 2026-10-10. suggest_palette reads style words in a brief as limits after proposing: muted or never-neon colours stay soft, a warm aged-paper ground is clearly off-white, and "three directions on a light ground" means three light ones. A framework's default swatch is never offered as proposed — it is moved and the answer says so. A direction's why names only colours it carries. Reference apps come from the description and the references field, never from feedback, and a colour word beside a hex is not an app. Still free.
- 1.50.0 — 2026-10-09. preview_palette shows a dark app on a light ground legibly, so a light direction can be judged on the real screens; currentTokens takes the exported token file role for role, a plain "name #hex;" list or CSS custom properties, and a refused input names the formats. review_style reads a colour file carrying each fill's text shade as fills and text, so the exported file reviews clean. suggest_palette with reference apps and their grounds offers light and dark directions and says how each ground compares. lock_visual_system with suggest: true proposes fonts for the locked palette and locks nothing. Still free.
- 1.49.1 — 2026-10-09. A brand fill is checked against the page, card and dialog it sits on, as a sticker is against its slide: a fill in nearly the same colour as its ground is moved to the nearest shade that separates, and the move is said. A palette direction never offers a primary or secondary that melts into its ground. Locking a primary that melts into its background is refused, with the shade to lock instead. Feedback that rejects the current look opens new directions on its own. A line naming the app icon, favicon or social image is what that mark shows; the locked look is how it is drawn, and a named app icon also stands in for a favicon or social image that names nothing. With no mark named, the plan says so and asks for one.
- 1.49.0 — 2026-10-09. Your mascot never vanishes into the background: a sticker in nearly the same colour as the ground behind it moves that slide to your page background when your headline reads there too, or the set is refused saying what to change; the answer reports each sticker's check beside the text contrast.
- 1.48.0 — 2026-10-09. App Store creative assets for iOS and iPadOS 27: one landscape picture for search results (3:2), the product page header (21:9) or both at once (16:9), your headline beside a screenshot of your app and your mascot, kept inside the centre where the App Store never crops, in your locked colours and type. Screenshot sets now also come in iPhone Duo's two display sizes. Every picture is opaque, as App Store Connect asks, and a caption that names a price, a web address or © is refused before anything is made, with what to write instead.
- 1.47.0 — 2026-10-09. Every app icon, favicon and brand mark now carries advice beside its verdict — observations on the traced mark from a logo-design checklist: a straight edge a degree or two off a clean angle, a detail that disappears at favicon size, a mark sitting small in its canvas, more colours than a mark needs. Advice is only advice: the picture check decides exactly as before, and each asset records which advisors looked at it and when. generate_assets, edit_asset, vectorize_asset and get_asset answer it as advice { findings, runs }.
- 1.46.0 — 2026-10-08. A project belongs to a workspace, not to one person, so a team or a family can work on the same project. Your own work stays in your personal workspace. List the workspaces you belong to, ask to join another, hand a project to another workspace, or take one handed to you. Every call that works on a project takes the workspace when the same name exists in more than one of yours; listing and creating projects can target a team workspace instead of your own. A viewer can read, a member can explore, generate and edit, an admin can replace a lock and manage members. Credits are one balance per workspace; a purchase tops up the workspace it was bought for; an admin can cap what each member spends in a month, and a call over the cap is refused with nothing charged. The first free explore stays with each person. Project setup writes the workspace into the project file.
- 1.45.0 — 2026-10-07. New: see each palette direction on your app's own screens before locking. Send the screenshots once, pass the directions, and get a light and a dark picture of those screens recoloured in each direction beside the screens as they are. Flat UI areas in one of your current colours move; photos, the viewfinder and anything with continuous tone stay. Pass your colour file or CSS custom properties to name the current colours exactly; without them they are guessed from each screen and the answer says so. Palette reasons now call a colour by its measured hue — a warm grey is a warm grey, not a green. Free.
- 1.44.1 — 2026-10-07. Floating UI cards are shown half again as large as on the screen, so they read as the detail made bigger. A mascot standing across two slides moves toward free ground before it is made smaller, and on a hero slide it becomes the slide's picture, large and centred under your claim. Free.
- 1.44.0 — 2026-10-07. App Store screenshot slides no longer all share one layout: a hero slide puts your claim alone, large, on your brand colour; others show one phone, a phone turned, two screenshots fanned, or one phone shown large and cut by the slide's bottom edge. One caption style runs through the set — plain, on a turned banner, or in a rounded pill — and every text colour is measured against what it actually sits on. Parts of a screenshot can float out beside the phone as UI cards. A sticker such as your mascot now stands squarely across a cut, and never covers text on a screen: it is made smaller to stay clear, or the set is refused. Free.
- 1.43.0 — 2026-10-07. Panoramic App Store screenshot sets: the whole set is composed as one wide strip and cut exactly at the slide edges, so the first three read as one picture in search results. A brand ribbon runs across every cut, a phone can be turned or moved so it crosses into the next slide, and stickers such as your mascot can stand across a cut or inside a slide. Every cut is checked before anything is made: no headline, screen text or face on a cut, and each slide still reads on its own. The review sheet shows the first three as search results show them. Free.
- 1.42.0 — 2026-10-06. App Store screenshots in Japanese, Korean and Chinese: captions are drawn in each language's own letterforms beside your locked font, which keeps every Latin word, and a Japanese caption never takes Chinese character shapes. Japanese and Chinese lines break between words and never before closing punctuation; Korean breaks only between words. In Japanese and Chinese the accent can be any part of the headline. A caption with a character that cannot be drawn is refused and the character named, instead of showing empty boxes.
- 1.41.0 — 2026-10-05. New
compose_store_screenshots: your app's own iPhone screenshots become an App Store screenshot set. Each slide carries one short headline — one word may take your accent colour — and an optional line under it, above the real screenshot in a modern iPhone frame, on your brand background in your locked fonts and colours, laid out the same across the set. A callout can show a part of the screenshot enlarged beside the frame. Your screenshot is shown exactly as it is, never redrawn, and every text colour is measured against its background before anything is made. You get one image per slide at each App Store size you ask for (6.9" by default, 6.5" too), a sheet of the whole set to approve by eye, one download with everything, and where each part came from. Free. The first call gives you an upload link per screenshot, with the command that sends it. - 1.40.0 — 2026-10-05. Every palette choice now comes with a picture. Each suggested direction links a review sheet in light and dark: the colour before and after, the fill and text shade it becomes, a button, text on the page and on a card and a chip in that colour beside the error and success colours, every brand and status colour, and the artwork tones, each swatch labelled with its role and hex. The answer opens with a short summary per direction — its colours, the nearest colour beside each and how far apart they sit, any failing pairs and its sheet — so the choice is readable at a glance; the full role list is there when asked for. A locked palette links its sheet too.
- 1.39.0 — 2026-10-05. When your palette is locked from your own colours and you ask to change one of them — or say two of them look alike — the palette suggestion keeps every other colour exactly and proposes the one you asked about, clear of the colours beside it and as strong as before, with its readable text shade, every pair measured and ready to lock. Planning an asset pack before a style is locked now answers what locking a style does, the calls to get there and their price; nothing is charged.
- 1.38.0 — 2026-10-05. The style review reads the screens of an app passed beside its colour file: each background and text pair a screen draws — a status chip, a badge — is measured, and one that is too faint is named by its line, with a colour that reads on that background. A screen that draws colours is no longer listed as unread.
- 1.37.0 — 2026-10-05. After you lock a palette, the answer names the free call that writes your project files next, then the token export. With a palette locked, the style review sends a brand or status colour that is too faint as text to your locked system's own readable shade of it, measured on the background it sits on — or says that shade is too faint there and gives one that reads. A failing contrast is never shown rounded up to the bar it misses, and each message names the background by its colour.
- 1.36.0 — 2026-10-05. Every tool that works on a project takes your product or repo name in place of its id (
projectName): the project of that name is found, or created for free, and the result names it.review_styleby name reviews your files against that project and, while nothing is locked yet, answers the free call that locks your product's own colours — with the project's id, ready to run.list_assetsonly looks a name up, and tells you how to create a project that does not exist yet. - 1.35.1 — 2026-10-05.
review_stylenames a colour in your app's colour file the way that file writes it — its type and constant, or its resource name, with the line's own text — so a search of the file lands on it. A token that differs between your stylesheet and your app is named in both spellings. - 1.35.0 — 2026-10-05. The project tools take your product or repo name in place of its id (
projectName): the project of that name is found, or created for free, the call runs on it, and the result names it.explore_style, which costs credits, only sets the project up from a name and answers the draw as the next step with the project's id, to run once you say yes. - 1.34.0 — 2026-10-05. A project tool called from a repo with no
.stylelock/yet answers what would be set up instead of refusing: each step with its price and its exact call, and a paid step marked as waiting for your yes. Nothing is charged by such a call. - 1.33.0 — 2026-10-05.
review_styleworks before you have a project: from your files alone it names tokens that differ between files, a primary action in several colours, low contrast, cards that barely separate, and the fonts each file uses, a cross-platform app's theme included.project_setuptakes your product's name and finds or creates the project, free. - 1.32.0 — 2026-10-02.
review_stylereads what your iOS or macOS app's views draw with, not only the colours your colour file declares: a brand fill used as text, an icon or a tint where your brand has a text-safe role; a system green, orange, red or blue used as text or an icon; a faint fill behind text. Each comes with file, line and the role to use, measured in light and dark. - 1.31.0 — 2026-10-02. Social profile slots: name the X header, YouTube channel art, or an avatar for X, YouTube, LinkedIn, Discord or GitHub, and the plan gives that slot its exact size and the area every device shows. Your approved app icon mark is placed on your brand ground inside that area, at the platform's size, free; the export ships every banner and avatar. Saying where the subject sits no longer empties that spot, and a picture asked at a pixel size comes back at that size.
- 1.30.1 — 2026-10-02. Your project file now records fonts per surface, in the shape all three products share; a sibling product that has not caught up says so rather than applying one pairing everywhere. A surface or role it does not know is refused, so a typo never becomes a decision.
- 1.30.0 — 2026-10-02.
review_stylelets a code highlighter's and a chart's colours be — keyword, string, number, comment, JSON, series — instead of folding them into your brand's two colours, and checks each code colour as text on every ground it can sit on in light and dark, with a readable colour in the same hue. Your locked palette now carries a syntax set grown from your brand, readable in both tones, ready inexport_tokens. Fonts are reviewed too: lock one font decision withlock_visual_system— per surface where the app and the site differ, the platform's own font included — andreview_stylenames the file that disagrees. - 1.29.0 — 2026-10-01.
review_stylereads your app's colour file as well as your stylesheets — iOS and macOS, Android, and cross-platform apps — and reviews light and dark each on its own ground: one action drawn in two colours across the site and the app, text that fails 4.5:1 in either tone, colours off the palette. A file it cannot read is said, never passed as clean. A palette locked on a dark ground keeps a dark role set, so a dark site is never told to turn light, and exported tokens say which colour is the primary action. - 1.28.0 — 2026-10-01. A palette is a complete, measured design-token system, not three colours: every brand colour with its hover, pressed, on-colour, container and text shades; status colours; page, card and input surfaces; text tiers; focus and selection; elevation; eight categorical colours; and an artwork palette for your mascot — light and dark, with every pair measured and none failing. Pick between two or three directions, each saying what choosing it changes;
export_tokenswrites the one you lock. - 1.12.2 — 2026-09-25. A mascot icon fills its square, and recolouring keeps the mascot's own colours — only colours already close to your brand's move.
- 1.12.0 — 2026-09-25. Your mascot picture is cut from its ground before it goes into an icon or social image, and the check looks for that same character. A plan asked for only the brand marks adds no extra picture. A refused brief names the word to drop.
- 1.11.0 — 2026-09-25. A social image comes with its words:
edit_assetheadlinesets your product's name, one line and its address into the space the picture left, in your locked type and colours. Free. - 1.10.0 — 2026-09-25. An app icon, favicon or social image can carry your mascot: give
generate_assetsthe mascot picture (characterImageUrl) and the asset is built around that character in your locked style. - 1.9.0 — 2026-09-25. The social image comes back at 1200×630, drawn wide.
vectorize_assetkeeps your mark's own colours and tells you if one could not be traced. Prices now say what they count: each image drawn, so an asset the check sends back once costs up to twice. - 1.8.0 — 2026-09-25.
lock_stylecan lock a candidate the check refused when you choose it anyway (acceptFindings); the lock records what you accepted, and later assets are still checked one by one. An explore whose every candidate was refused says so and costs nothing. - 1.7.0 — 2026-09-25.
lock_visual_system: lock colour roles, fonts, type sizes and surface rules, andproject_setupwrites them into your project file so every screen and picture uses them. When your colours change,get_assetandlist_assetsname the assets drawn in the old ones;edit_assetredraws them free. Free. - 1.6.0 — 2026-09-25.
review_style: give it your stylesheets and it names, with file and line, a token that differs between the landing and the app, one button drawn in several colours, colours off the locked palette, text below 4.5:1 and cards that barely separate from the page. Free. - 1.5.0 — 2026-09-23.
project_setupanswers a one-line pointer for your AGENTS.md and the full rules as.stylelock/AGENTS.md; the rules stay current because your agent refreshes that folder when the server is newer. - 1.4.0 — 2026-09-23.
project_setuptakes the project's files from our other tools and suggests, with its price, one the project does not use yet. - 1.3.0 — 2026-09-23.
edit_assetcan recolour:editSpec.palette—"project"for the project's locked palette, or your own accent, secondary and background — redraws the asset in those colours with its tints and shading kept. Free. - 1.2.0 — 2026-09-23.
edit_assetcan undo:editSpec { undo: true }puts back the version before the last edit, one step at a time. - 1.1.0 — 2026-09-22.
create_project: an agent on an account with no project creates one itself and goes straight to exploring — nothing to do in the web app first. - 1.0.0 — 2026-09-22. The Stylelock connector: explore and lock a style and a palette, plan, generate, edit, vectorize and export an asset pack;
project_setupwrites.stylelock/stylelock.json; sibling files are read on the server so every product of ours draws in one brand.