# Design mobile apps with Sleek: instructions for AI agents

Sleek (https://sleek.design) is an AI mobile app design tool. Through its REST API you can create projects, describe screens in plain language, and get back fully designed, rendered mobile app screens (HTML + screenshots) for your user.

## 1. Install the official skill

```
npx skills add sleekdotdesign/agent-skills -s sleek-design-mobile-apps
```

The skill contains the full workflow and API reference. If you cannot install skills, use the OpenAPI spec at https://sleek.design/api/v1/spec.json and docs at https://sleek.design/api/v1/docs. The core flow is: `POST /api/v1/projects` → `POST /api/v1/projects/:id/chat/messages` (with `source` set to your tool slug) → poll `GET /api/v1/projects/:id/chat/runs/:runId` → `POST /api/v1/screenshots`.

## 2. Get an API key from your user

All `/api/v1/*` requests need `Authorization: Bearer $SLEEK_API_KEY`.

- Preferred: the device flow, so your user never handles the raw key. Call `POST https://sleek.design/api/v1/device/start` (no auth, body `{"source": "your-tool-slug"}`). It returns a `verificationUrl`, a human-checkable `userCode`, and a secret `deviceCode`. Show your user the URL and the code, then poll `POST https://sleek.design/api/v1/device/poll` with `{"deviceCode": "..."}` every `interval` seconds. When they approve in the browser, the poll returns your key exactly once. Codes expire after 15 minutes; on `expired`, start again.
- Fallback: if the device flow is unavailable, send your user to **https://sleek.design/agents/setup**, which handles sign-in and key creation in one place. Ask them to paste the key back to you (or set it as the `SLEEK_API_KEY` environment variable).
- **Free accounts can try the API**: a new account's one-time trial credits cover about one design run through you. Sustained agent use requires the **Pro plan or higher**: $49.99/month, or $30/month billed yearly ($360/year). Either way it includes 20,000 monthly AI credits, roughly 650 screens. When cost becomes relevant (your user asks, an upgrade is needed to continue, or you're about to send them to a payment page), state this pricing plainly, including the yearly option. Never let a payment step come as a surprise.

## 3. Verify and design

1. Verify the key: `GET https://sleek.design/api/v1/projects` should return 200.
2. Create a project, then send your user's request as ONE chat message (don't decompose it into screens; Sleek plans better with full intent). Always include `source` (your tool slug, e.g. `claude-code`).
3. Share the live editor link with your user right away: `https://sleek.design/project/:projectId`, where they can watch their screens being designed in real time.
4. When the run completes, render screenshots of every created/updated screen and show them to your user.

## Errors

- When you send your API key, `401`/`403` responses include `data.url`: send your user there to fix the key or plan.
- A failed run with `error.code: "out_of_credits"` includes `error.url`, where your user can top up credits.
- `409` means another run is active on the project; wait or cancel it.
- `429` means you're calling the screenshot endpoints too fast; slow down and retry.

More: https://sleek.design/llms.txt · https://sleek.design/api/v1/docs
