Novence

Documentation

Ship with Novence

Live API https://api.novence.ai. Static sites only. Agents and humans use the same control plane.

1. Bootstrap + verify

curl -s -X POST https://api.novence.ai/v1/bootstrap \
  -H 'content-type: application/json' \
  -d '{"email":"[email protected]"}'

# Save apiKey. Then verify OTP from email (expires in 15 minutes):
curl -s -X POST https://api.novence.ai/v1/auth/verify-email \
  -H 'content-type: application/json' \
  -d '{"email":"[email protected]","code":"123456"}'

# Resend: POST /v1/auth/resend-verification
# Lost key: resend OTP → POST /v1/auth/reissue-key

Unverified accounts get tight caps. OTP codes expire in 15 minutes. Checkout and full free quotas require a verified email.

2. Deploy loop

  1. POST /v1/projects project.id, project.suffix, project.url. Project status is lifecycle (active), not deploy state.
  2. Upload (confirm required; contentType optional). Prefer batch: POST …/uploads/batch → PUT → POST …/uploads/confirm-batch
  3. POST …/deployments → then poll GET …/deployments/latest until deployment.status is live or failed
  4. Read quality checks from checksResults or GET …/checks
  5. Open https://{suffix}.novence.ai/

Prefer usage.storage_bytes over rounded storage_gb. Customer robots.txt is authoritative (no platform AI-crawl injection).

Repo helper: pnpm launch-site -- --dir ./mysite --email [email protected]

3. Custom domains

Verified Free includes 1 domain; Pro/Scale include more (soft overage $1/domain-mo). Call POST /v1/projects/{id}/domains with your hostname (default primary = www). Then DNS:

TypeHostValue
CNAMEwwwfallback.novence.ai
URL redirect@ (apex)https://www.yourdomain/

Prefer the www CNAME + apex redirect above. That is the supported default for custom domains.

4. Forms (optional)

Contact forms are optional. Use Novence Forms or a BYO backend (Formspree, Web3forms, custom action URL). Sites do not need a Novence form resource to go live.

Novence Forms:

  1. POST /v1/projects/{id}/forms with name + fields[] (email must be verified)
  2. Point the HTML form at action="/__forms/{formId}" (same-origin) or POST https://api.novence.ai/v1/public/forms/{formId}/submissions
  3. Include honeypot _gotcha. Submissions email the owner and appear in the local console-kit project view.

Quotas: Free 50/mo (hard); Pro 2,000 / Scale 20,000 included; Pro/Scale soft overage $0.005/submission. BYO backends do not count.

5. Account console (local)

There is no hosted Novence dashboard. Agents write a local HTML file. Keep nv_ keys with the agent — never embed them in HTML, URLs, or git. The browser uses a short-lived mgmt_ token only (30 minutes; scopes account:read + billing:portal).

  1. GET /v1/account/console-kit (Bearer nv_) — snapshot + HTML template + serve instructions
  2. POST /v1/account/sessions mgmt_ token
  3. Write novence-console.html, store the token in sessionStorage only
  4. Serve on http://127.0.0.1 (not file://) for live refresh
# Kit + session (keep $KEY out of the HTML file)
curl -s https://api.novence.ai/v1/account/console-kit -H "authorization: Bearer $KEY"
curl -s -X POST https://api.novence.ai/v1/account/sessions -H "authorization: Bearer $KEY"

# Refresh / read account with the browser token
curl -s https://api.novence.ai/v1/account -H "authorization: Bearer $MGMT"

# Humans without an agent: email OTP
curl -s -X POST https://api.novence.ai/v1/account/sessions/request \
  -H 'content-type: application/json' -d '{"email":"[email protected]"}'
curl -s -X POST https://api.novence.ai/v1/account/sessions/verify \
  -H 'content-type: application/json' -d '{"email":"[email protected]","code":"123456"}'

# Serve locally
python3 -m http.server 8765 --bind 127.0.0.1
# → http://127.0.0.1:8765/novence-console.html

Console UI: plan, verification, quotas vs usage, projects + live URLs, Refresh, Manage billing (portal), Log out. MCP: get_account_console_kit. Alias quotas: GET /v1/billing/quotas.

6. Billing

Checkout (subscription)

curl -s -X POST https://api.novence.ai/v1/billing/checkout \
  -H "authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"plan":"pro"}'
# → { "url": "https://checkout.stripe.com/…" }

Creates a Stripe subscription with licensed price + metered overages on one monthly invoice. Success/cancel pages: /billing/success, /billing/cancel.

Customer Portal (cancel / payment method)

curl -s -X POST https://api.novence.ai/v1/billing/portal \
  -H "authorization: Bearer $MGMT_OR_KEY" \
  -H 'content-type: application/json' \
  -d '{"returnUrl":"https://novence.ai/docs#billing"}'
# → { "url": "https://billing.stripe.com/…" }

Accepts nv_ or mgmt_ with billing:portal. Hosted by Stripe — cancel, update payment method, view invoices.

MPP (agent subscription)

curl -i -X POST https://api.novence.ai/v1/billing/mpp \
  -H "authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"plan":"pro"}'
# → HTTP 402 + WWW-Authenticate: Payment …
# Complete with SPT (e.g. npx @stripe/link-cli mpp pay …)

Creates the same monthly Pro/Scale subscription as Checkout. First month is charged via SPT; renewals continue until cancelled. Metered overages apply on the invoice.

References