Skip to main content
A Site is an AI-built, fully-hosted website that Crevio creates from a one-paragraph brief — you describe the brand and what you sell, and an engineering agent writes the code, deploys it, and gives you back a live URL. You don’t pick a template or wire up hosting. You POST /sites with a prompt, Crevio kicks off an AI build, and you poll a Task until the site is live at a *.crevio.app subdomain. From there the API exposes the whole platform surface around the site: visitor analytics, the site’s own database, encrypted secrets (env vars), custom domains, and deployment history. Sites use the site_ prefix and have the object type site.

Build a site from a prompt

The prompt is a build brief — describe the brand, what you sell, and the look and feel. Crevio’s engineering agent turns it into a real codebase and deploys it. The response comes back immediately with a build_task_id you poll to watch the build.
The response includes the build task to poll plus the addressable URLs:
The site is created instantly, but is_live is false until the AI build finishes. The build runs as a Task — that’s what build_task_id is for.

Poll the build task

A build is an engineering agent Task. Poll it until its status settles, then check the site’s is_live.
Prefer not to poll? Subscribe to the task_run.completed webhook and react when the build finishes. See Webhooks.

Start from an existing GitHub repo

Already have a codebase? Pass repository (an owner/repo you’ve connected) instead of a prompt. Crevio mounts that repo as the site’s workspace, so the engineering agent — and your build/deploy pipeline — work directly against your code.
prompt is required unless you provide repository. One or the other must be present.

Access modes and visibility

access_mode controls who can reach the deployed site. Gating is enforced at the edge, not just in the app. The show_referral_badge flag toggles the “Powered by Crevio” badge. It defaults to on for all plans, and turning it off requires the Business plan — on any other plan, PATCH /sites/{id} with show_referral_badge: false returns 402 with code plan_required and param: "show_referral_badge", and nothing in the request is applied. Turning it back on is always allowed.

Member sessions

When a viewer signs in to a deployed site, the edge sets a host-only session cookie on that site’s own hostname and forwards a signed token to your app on every request as x-crevio-user-token. Verify it with verifyUserToken() from @crevio/sdk; it returns the viewer’s id and kind: A site’s signed-in viewer is identified as your customer, not as a Crevio account — so the same person who bought from your store is the same cus_… id you see in orders, grants and the customer list. A development preview (<site>--preview-<id>.crevio.app) opens only to your Crevio team, and forwards the same header for the team member viewing it: kind is platform and userId is their user_… id. The token is bound to the preview host, so verify it without audience: passing the deployed site’s worker name rejects it. Sign-out is a hosted URL on the site’s own host, so a members area can link to it without owning any session code:
It clears the site’s session cookie and redirects to return_to (a same-origin path; anything else falls back to /). It ends the session on that site only — it never signs the viewer out of Crevio itself. Sessions cannot be ended from inside your app’s code: the cookie is HttpOnly and set by the edge, which is what makes it impossible for a page to leak or forge one. Link to the URL above instead. Billing is a hosted URL too. It opens your store’s billing page on billing.crevio.co for the signed-in customer:
The customer can update their payment method and billing address, download invoices, and cancel or renew subscriptions (payment plans run to their final payment). The page’s Return link goes back to return_to (a same-origin path). A signed-out visitor is sent to sign in first. Link to it with a full navigation (a plain <a href>), not a fetch.

Custom domains

A new site lives at https://<subdomain>.crevio.app. To put it on your own domain, attach one — either bought through Crevio or one you already own — then verify it. The full purchase-and-attach flow lives in Domains; the short version:
Once verified, the site’s domain and domain_verified fields update.

The platform surface around a site

Beyond the website itself, each site exposes the operational tooling Crevio runs on its behalf.

Site analytics

Pull visitor and traffic analytics for a site.

Site database

Sites get a real database. Inspect the schema and run read queries through the API — handy for letting an agent answer “how many signups this week?” without leaving Crevio.

Site secrets (encrypted env vars)

Sites need API keys and config — Stripe keys, a third-party token, a feature flag. Store them as encrypted secrets that are injected into the deployed worker as environment variables. Values are write-once-readable: list shows masked values, and you reveal a single secret explicitly. A secret takes a name (required), a value (required), and an optional description. The name must be uppercase letters, digits, and underscores, and cannot start with a digit.
The names Crevio sets on every site (CREVIO_API_KEY, CREVIO_APP_URL, CREVIO_API_BASE_URL, CREVIO_AI_GATEWAY_URL, CREVIO_ACCOUNT_ID, CREVIO_SITE_AUDIENCE, CREVIO_JWKS_URL, CREVIO_SIGN_IN_URL) can’t be set by hand; any other name, including other CREVIO_ ones, is yours. Removing a secret also removes it from the live worker.

Deployments

Every build and redeploy is recorded. List deployment history to see what’s live, building, or failed.
Deploys run asynchronously. Triggering a deploy returns immediately and the build continues in the background — a single deploy can take several minutes. Poll the deployments list (or watch for the deploy to finish) rather than expecting a synchronous result. You’ll see statuses like building, live, and failed with the live URL once it’s up.

Next steps

Domains

Buy a domain and attach it to your site.

Tasks

Understand the Task you poll while a site builds.

Webhooks

Get notified when a build completes instead of polling.

Usage & credits

See how AI builds and deploys draw down credits.