Loading...
Loading...
Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects — whether high-level ("design an app that does X") or specific ("list my projects", "create a new project", "screenshot that screen").
npx skill4agent add sleekdotdesign/agent-skills sleek-design-mobile-apps/api/v1/*https://sleek.designAuthorization: Bearer <API_KEY>/api/v1/*application/json/api/v1/*| Scope | What it unlocks |
|---|---|
| List / get projects |
| Create / delete projects |
| List components in a project |
| Get chat run status |
| Send chat messages |
| Render component screenshots |
message.textscreen_createdscreen_updatedscreen_createdcomponentIds: [screenId]componentIds: [all screen ids]background: "transparent"| Method | Path | Scope | Description |
|---|---|---|---|
| | | List projects |
| | | Create project |
| | | Get project |
| | | Delete project |
| | | List components |
| | | Send chat message |
| | | Poll run status |
| | | Render screenshot |
GET /api/v1/projects?limit=50&offset=0
Authorization: Bearer <key>200{
"data": [
{
"id": "proj_abc",
"name": "My App",
"slug": "my-app",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "..."
}
],
"pagination": { "total": 12, "limit": 50, "offset": 0 }
}POST /api/v1/projects
Authorization: Bearer <key>
Content-Type: application/json
{ "name": "My New App" }201GET /api/v1/projects/:projectId
DELETE /api/v1/projects/:projectId → 204 No ContentGET /api/v1/projects/:projectId/components?limit=50&offset=0
Authorization: Bearer <key>200{
"data": [
{
"id": "cmp_xyz",
"name": "Hero Section",
"activeVersion": 3,
"versions": [{ "id": "ver_001", "version": 1, "createdAt": "..." }],
"createdAt": "...",
"updatedAt": "..."
}
],
"pagination": { "total": 5, "limit": 50, "offset": 0 }
}message.textPOST /api/v1/projects/:projectId/chat/messages?wait=false
Authorization: Bearer <key>
Content-Type: application/json
idempotency-key: <optional, max 255 chars>
{
"message": { "text": "Add a pricing section with three tiers" },
"imageUrls": ["https://example.com/ref.png"],
"target": { "screenId": "scr_abc" }
}| Field | Required | Notes |
|---|---|---|
| Yes | 1+ chars, trimmed |
| No | HTTPS URLs only; included as visual context |
| No | Edit a specific screen; omit to let AI decide |
| No | Sync wait mode (default: false) |
| No | Replay-safe re-sends |
wait=false202 Acceptedresulterror{
"data": {
"runId": "run_111",
"status": "queued",
"statusUrl": "/api/v1/projects/proj_abc/chat/runs/run_111"
}
}wait=true200202{
"data": {
"runId": "run_111",
"status": "completed",
"statusUrl": "...",
"result": {
"assistantText": "I added a pricing section with...",
"operations": [
{ "type": "screen_created", "screenId": "scr_xyz", "screenName": "Pricing" },
{ "type": "screen_updated", "screenId": "scr_abc" },
{ "type": "theme_updated" }
]
}
}
}GET /api/v1/projects/:projectId/chat/runs/:runId
Authorization: Bearer <key>data{
"data": {
"runId": "run_111",
"status": "queued",
"statusUrl": "..."
}
}result{
"data": {
"runId": "run_111",
"status": "completed",
"statusUrl": "...",
"result": {
"assistantText": "...",
"operations": [...]
}
}
}error{
"data": {
"runId": "run_111",
"status": "failed",
"statusUrl": "...",
"error": { "code": "execution_failed", "message": "..." }
}
}queuedrunningcompleted | failedPOST /api/screenshots
Authorization: Bearer <key>
Content-Type: application/json
{
"componentIds": ["cmp_xyz", "cmp_abc"],
"projectId": "proj_abc",
"format": "png",
"scale": 2,
"gap": 40,
"padding": 40,
"background": "transparent"
}| Field | Default | Notes |
|---|---|---|
| | |
| | 1–3 (device pixel ratio) |
| | Pixels between components |
| | Canvas padding |
| | Any CSS color |
"background": "transparent"image/pngimage/webpContent-Disposition: attachment{ "code": "UNAUTHORIZED", "message": "..." }| HTTP | Code | When |
|---|---|---|
| 401 | | Missing/invalid/expired API key |
| 403 | | Valid key, wrong scope or plan |
| 404 | | Resource doesn't exist |
| 400 | | Validation failure |
| 409 | | Another run is active for this project |
| 500 | | Server error |
data.error| Code | Meaning |
|---|---|
| Organization has no credits left |
| AI execution error |
1. POST /api/v1/projects → get projectId
2. POST /api/v1/projects/:id/chat/messages → get runId (202)
3. Poll GET /api/v1/projects/:id/chat/runs/:runId
until status == "completed" or "failed"
4. Collect screenIds from result.operations
(screen_created and screen_updated entries)
5. Screenshot each affected screen individually
6. If any screen_created: also screenshot all project screens combined
7. Show all screenshots to the user1. POST /api/v1/projects/:id/chat/messages?wait=true
→ blocks up to 300s
→ 200 if completed, 202 if timed out
2. If 202, fall back to Flow 1 polling with the returned runId
3. On completion, screenshot and show affected screens (see screenshot delivery rule)1. GET /api/v1/projects/:id/components → find screenId
2. POST /api/v1/projects/:id/chat/messages
body: { message: { text: "..." }, target: { screenId: "scr_xyz" } }
3. Poll or wait as above
4. Screenshot the updated screen and show it to the useridempotency-keyPOST /api/v1/projects/:id/chat/messages
idempotency-key: my-unique-request-id-abc123409 CONFLICT409 response → poll existing run → completed → send next messagelimitoffsetpagination.totalGET /api/v1/projects?limit=10&offset=20| Mistake | Fix |
|---|---|
Sending to | Add |
| Using wrong scope | Check key's scopes match the endpoint (e.g. |
| Sending next message before run completes | Poll until |
Using | It blocks 300s max; have a fallback to polling for |
HTTP URLs in | Only HTTPS URLs are accepted |
Assuming | |