API reference
The Lyvica API lets you create and iterate on apps from anywhere — a script, a backend, a CI job, or an agent. It’s the same engine as the web app, so projects you create show up in your dashboard and count against your plan.
Base URL: https://lyvica.com/api/v1
Authentication
Section titled “Authentication”Every request needs a personal API key, passed as a bearer token:
Authorization: Bearer lyv_live_…(You can also use the x-api-key: lyv_live_… header.)
Creating a key
Section titled “Creating a key”- Go to Lyvica → Settings (
/dashboard/settings). - Name the key and click Create key.
- Copy it now — the full key is shown only once.
Keys are per-user; create as many as you like (one per integration) and revoke any of them from the same page. Lyvica stores only a hash of the key, never the plaintext.
Endpoints
Section titled “Endpoints”| Method | Path | Purpose |
|---|---|---|
POST | /projects | Create a project and queue its first build |
GET | /projects | List your projects (?limit= up to 100) |
GET | /projects/{id} | Get one project by id or slug |
POST | /projects/{id}/messages | Send a follow-up instruction (an iteration) |
Create a project
Section titled “Create a project”curl -X POST https://lyvica.com/api/v1/projects \ -H "Authorization: Bearer lyv_live_…" \ -H "Content-Type: application/json" \ -d '{"brief":"a landing page for a coffee shop with a menu","name":"Brewhaus"}'name is optional — it’s derived from the brief if you omit it. Returns 201:
{ "project": { "id": "cmq4q…", "slug": "brewhaus", "name": "Brewhaus", "brief": "a landing page for a coffee shop with a menu", "status": "DRAFT", "previewUrl": null, "repoUrl": null, "createdAt": "2026-06-08T04:54:53.108Z", "latestRun": { "id": "…", "status": "QUEUED", "prompt": "…" } }}Poll status
Section titled “Poll status”Builds are asynchronous (~1–2 min). Poll until status is READY and
previewUrl is set:
curl https://lyvica.com/api/v1/projects/brewhaus \ -H "Authorization: Bearer lyv_live_…"Iterate
Section titled “Iterate”curl -X POST https://lyvica.com/api/v1/projects/brewhaus/messages \ -H "Authorization: Bearer lyv_live_…" \ -H "Content-Type: application/json" \ -d '{"message":"make the hero section dark"}'Returns 202 with the new runId and the updated project.
Status codes
Section titled “Status codes”| Code | Meaning |
|---|---|
200 / 201 | Success (201 on create) |
202 | Accepted — build queued (messages) |
400 | Body wasn’t valid JSON |
401 | Missing or invalid API key |
404 | No project with that id or slug |
422 | Validation error (e.g. the brief is too short) |
429 | Daily prompt limit reached |
Errors share one shape:
{ "error": { "code": "quota_exceeded", "message": "You've used all 5 prompts for today on the Free plan." } }Limits
Section titled “Limits”API usage counts toward the same daily prompt limit as the web app (see
Plans & limits). A 429 means you’re out for the day — it
resets at 00:00 UTC.
Using it from an agent
Section titled “Using it from an agent”Prefer tools over raw HTTP? The Lyvica MCP server wraps these endpoints as tools for Claude Desktop, Cline, Cursor, and any MCP client.