Base URL
All endpoints are relative to the application origin. There is no separate API host.Type safety
The API is built with Elysia.js, which provides end-to-end type safety between the server and any TypeScript client. The includedapi-client.ts uses the Eden treaty client to consume the API with full type inference.
Request format
Send request bodies as JSON and set theContent-Type: application/json header.
Response format
All endpoints return JSON. Successful responses return the created or updated resource directly, or an array of resources for list endpoints.Authentication
All endpoints require an active Clerk session. See the Authentication page for details.HTTP status codes
| Status | Meaning |
|---|---|
200 | OK — request succeeded |
401 | Unauthorized — no valid session |
403 | Forbidden — Pro subscription required |
404 | Not Found — resource does not exist |
500 | Internal Server Error — unexpected failure |
Explore the API
Authentication
How Clerk sessions protect every endpoint, and what Pro feature flags control access.
Projects
Create a new AI-generated project or list your existing projects.
Messages
Send follow-up prompts and retrieve the conversation history for a project.
Code Fragments
Directly update files inside a live sandbox (Pro).