Skip to content

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

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.)

  1. Go to Lyvica → Settings (/dashboard/settings).
  2. Name the key and click Create key.
  3. 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.

MethodPathPurpose
POST/projectsCreate a project and queue its first build
GET/projectsList your projects (?limit= up to 100)
GET/projects/{id}Get one project by id or slug
POST/projects/{id}/messagesSend a follow-up instruction (an iteration)
Terminal window
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": "" }
}
}

Builds are asynchronous (~1–2 min). Poll until status is READY and previewUrl is set:

Terminal window
curl https://lyvica.com/api/v1/projects/brewhaus \
-H "Authorization: Bearer lyv_live_…"
Terminal window
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.

CodeMeaning
200 / 201Success (201 on create)
202Accepted — build queued (messages)
400Body wasn’t valid JSON
401Missing or invalid API key
404No project with that id or slug
422Validation error (e.g. the brief is too short)
429Daily prompt limit reached

Errors share one shape:

{ "error": { "code": "quota_exceeded", "message": "You've used all 5 prompts for today on the Free plan." } }

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.

Prefer tools over raw HTTP? The Lyvica MCP server wraps these endpoints as tools for Claude Desktop, Cline, Cursor, and any MCP client.