Documentation

Getting Started

Sign up, grab your API key, install the agent skill, and ship your first project. This page is the five-minute path to a live site.

1. Create an account

Sign up at mosaic.site. Confirm your email, then open the Dashboard.

2. Get your API key

In the dashboard, go to Settings → API Key. Copy the key — it starts with mk_. Export it to your shell:

export MOSAIC_API_KEY="mk_xxxxxxxxxxxxxxxxxxxxxxx"
Keep it secretYour API key opens every primitive on the platform — database, storage, deploys, the lot. Never commit it to git or paste it into a webpage.

3. Install the agent skill (optional, recommended)

If you use Claude Code, install the Mosaic skill so your AI assistant knows every endpoint:

npm install -g @mosaicsite/claude-skill

Now sessions of Claude Code WebFetch the live skill spec from api.mosaic.site/skill.md on load. Always up to date.

4. Create your first project

API="https://api.mosaic.site/v1/project"
KEY="$MOSAIC_API_KEY"

curl -X POST $API/projects \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"name":"My First App"}'

Save the response — it contains your slug, git_repo_url, and database credentials:

{
  "id": "uuid",
  "slug": "myfirstapp-x4k2",
  "database": { /* host, port, user, password */ },
  "git_repo_url": "https://git.mosaic.site/.../myfirstapp-x4k2.git"
}

Want to choose your subdomain? Pass "slug": "my-custom-name" in the request body (3–32 chars, lowercase, no consecutive hyphens).

5. Ship your first deploy

Push an index.html via the git API. Setting "deploy": true auto-deploys after the commit lands.

curl -X POST $API/{slug}/git/files \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
    "path": "index.html",
    "content": "<h1>Hello from Mosaic</h1>",
    "message": "Initial commit",
    "deploy": true
  }'

6. Poll until live

curl $API/{slug}/deploy/status -H "X-API-Key: $KEY"

Status moves through pending → detecting → configuring → running, typically in 15–30 seconds. When it hits running, your site is live at:

https://{slug}.mosaic.site
You're shippingThat's it — you created a project, pushed code, and got a live URL with SSL. From here, explore SQL, Storage, Auth, or Realtime.