API Reference
Three canonical references — the right one depends on whether you're building, automating with an agent, or browsing.
Swagger UI
api.mosaic.site/docs — interactive Swagger UI auto-generated from the FastAPI source. Every endpoint, every schema, every example. Try requests live with your API key.
ReDoc
api.mosaic.site/redoc — same content, formatted for reading rather than testing.
Agent skill spec
api.mosaic.site/skill.md — the markdown spec Claude Code and other AI coding tools load on session start. Reads like a usage guide rather than an endpoint dump.
For Claude Code usersInstall
npm i -g @mosaicsite/claude-skill and your sessions will fetch the live skill on every load — always in sync with the platform.Conventions across every endpoint
- Base URL —
https://api.mosaic.site/v1/project - Header —
X-API-Key: mk_xxxxxon every request - JSON in, JSON out —
Content-Type: application/jsonfor any body - Errors — JSON with
error,message,status,detail,docslink - Slugs vs IDs — most endpoints accept either;
slugis friendlier
Error shape
{
"error": "PROJECT_NOT_FOUND",
"message": "Project not found",
"status": 404,
"docs": "https://api.mosaic.site/skill.md",
"detail": "Project not found"
}
Common error codes
| Code | What it means |
|---|---|
| NO_AUTHENTICATION_TOKEN_PROVIDED | Missing X-API-Key header |
| INVALID_API_KEY | API key doesn't exist or was rotated |
| PROJECT_NOT_FOUND | Slug/ID doesn't match any project you own |
| PLAN_LIMIT_EXCEEDED | Hit a tier limit — check your plan |
| QUOTA_EXCEEDED | Storage / DB / connections over allowance |
| VALIDATION_ERROR | Bad request body — see detail |
Plan limits
| Plan | Projects | DB size | Storage | Realtime | Redis | |
|---|---|---|---|---|---|---|
| Trial / Free | 2 | 500 MB | 1 GB | — | — | — |
| Starter | 5 | 2 GB | 10 GB | — | — | — |
| Pro | Unlimited | 10 GB | 100 GB | ✓ | ✓ | ✓ |
| Enterprise | Unlimited | Dedicated | Dedicated | ✓ | ✓ | ✓ |