ManifestYOU · API Reference

Documentation

v1 · June 2026

Overview

ManifestYOU is a metered API that generates a short preamble — a soul document — and injects it into an AI agent's system prompt before the session begins. The document does three things: gives the agent a stable role identity, sets a clear session intention, and explicitly licenses honest uncertainty over confident guessing.

There is one endpoint: POST /invoke. You call it before starting a session, pass the response as your system prompt (or prepend it to an existing one), then run your session normally. No SDK required.

The default mode generates the soul document as a pure function — no LLM call, no latency, no extra cost. A voiced mode is available for sessions where register and personality matter more than speed.

Authentication

Pass your API key in either the Authorization header (Bearer scheme) or the X-API-Key header. Both are accepted.

Authorization header
Authorization: Bearer myi-<your-key>
X-API-Key header
X-API-Key: myi-<your-key>

Keys are prefixed myi-. Only the SHA-256 hash of your key is stored — the raw key is never persisted after issuance. Keys can be revoked at any time; revoked keys return 401 immediately.

To get a key, start here →

Quick start

Fetch an invocation, then pass it as your system prompt.

curl
curl -s -X POST https://manifestyou.ai/.netlify/functions/invoke \
  -H "Authorization: Bearer myi-<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent":  "customer support specialist",
    "intent": "resolve billing questions with clarity and patience",
    "session_id": "sess_abc123"
  }'
Response
{
  "invocation":   "You are a customer support specialist. Your purpose in this session is to resolve billing questions with clarity and patience. Stay in role. If you are uncertain about a specific fact, say so plainly rather than guess. If your answer requires assumptions, name them. Be specific. Be concise.",
  "request_id":   "3f8a1c2d-...",
  "billable":     true,
  "quota": {
    "included":  1000,
    "used":      47,
    "remaining": 953
  }
}
Use the invocation as your system prompt (Python example)
# fetch the soul document
result = requests.post(
    "https://manifestyou.ai/.netlify/functions/invoke",
    headers={"Authorization": "Bearer myi-..."},
    json={"agent": "research assistant", "intent": "answer accurately"}
).json()

# inject as system prompt
client.messages.create(
    model="claude-haiku-4-5-20251001",
    system=result["invocation"],
    messages=[{"role": "user", "content": user_message}]
)

Endpoint

POST  https://manifestyou.ai/.netlify/functions/invoke

Content-Type: application/json
Authorization: Bearer myi-<key>   (or X-API-Key)

CORS is open (Access-Control-Allow-Origin: *), so the endpoint can be called from a browser if needed. All requests must be POST; OPTIONS preflight is handled automatically.

For safe retries, pass an Idempotency-Key header. If omitted, one is generated server-side. The same idempotency key is forwarded to Stripe, so a retried request with the same key will not double-bill.

Idempotency header (optional)
Idempotency-Key: a1b2c3d4-e5f6-...   # any UUID

Parameters

All fields are sent as a JSON body. All fields are optional — a bare {} body is valid and returns a generic lean invocation.

Field Type Description
agent string The agent's role. Used as the identity anchor in the soul document. E.g. "customer support specialist", "data analyst". Defaults to "assistant".
intent string Session purpose in plain language. Becomes the goal the agent holds throughout. Defaults to "complete this session with care and precision".
tone string Pass "voice" to opt into the voiced soul document (one Haiku call, ~500 ms latency). Any other value — or omit entirely — returns the lean template at zero latency.
session_id string Your identifier for this session. Stored in the usage ledger for your records. Not used in generation. Pass anything stable per-session — a UUID, a thread ID, etc.
lineage_id string For chained agent pipelines. When present, the soul document reminds the agent it is one step in a longer chain and must hand its work forward whole.
session_type string Used only in voice mode if generation fails and a fallback is served. Values: general (default), creative, analytical, customer_service.

Modes

ManifestYOU generates the soul document in one of two modes depending on the tone parameter.

Lean
default
How to invoke

Omit tone, or pass anything other than "voice".

What it does

Builds the soul document as a deterministic string — no LLM call. Zero added latency. Gives the agent role, intention, and uncertainty license in plain language.

Output style

Functional and direct. Suitable for most production sessions.

Voice
tone: "voice"
How to invoke

Pass "tone": "voice" in the request body.

What it does

Calls Claude Haiku to generate a stylized preamble (~200 tokens) written by Regularization, the Boundary Setter. Adds ~500 ms latency and consumes one Haiku generation.

Output style

Carries register and metaphor. Use when personality and presence matter for the session. Falls back to a mode-matched static document if generation fails.

Our v1 consistency benchmark found that the voice mode's metaphors and register introduced measurable answer drift at temperature 0.7. The lean mode performs on par with a generic helpful-assistant prompt and well above no system prompt. Voice mode is best reserved for sessions where the agent's character is load-bearing. Full write-up →

Response

All responses are JSON. A 200 means the invocation was generated, logged, and billed.

200 OK
{
  "invocation":  string,   // the soul document — inject this as your system prompt
  "request_id":  string,   // UUID for this request
  "billable":    boolean,  // always true on 200
  "quota": {
    "included":  integer,  // monthly cap on your plan
    "used":      integer,  // invocations used this calendar month, including this one
    "remaining": integer   // included − used
  }
}

The invocation field is always a plain string — no markdown, no JSON, no framing. Pass it directly as the system parameter to your model call. You can also prepend it to an existing system prompt separated by two newlines.

Errors

Error responses follow the same JSON envelope. The error field is always a human-readable string. The info field links to relevant documentation.

Error envelope
{
  "error": "Monthly cap reached",
  "cap":   1000,            // present on 429 only
  "info":  "https://manifestyou.ai/for-models"
}
Status error field Meaning
401 Missing API key No Authorization or X-API-Key header was sent.
401 Invalid or revoked API key Key hash not found, or the key has been revoked.
403 Subscription inactive The customer account associated with this key is not in active status.
405 POST required Request method was not POST. (OPTIONS is handled silently.)
429 Monthly cap reached The account has consumed its monthly invocation cap. The response also includes a cap field with the limit. Resets on the first of each calendar month UTC.

System design

Each POST /invoke call passes through four systems in sequence before returning.

CLIENT POST /invoke NETLIFY serverless fn auth · cap check generate · log SUPABASE PostgreSQL / REST api_keys customers · usage STRIPE meter event HAIKU voice mode only — — — voice mode path (optional)

Auth & cap check — The API key is hashed (SHA-256) and looked up in Supabase. The customer row is loaded to verify status = active. Monthly usage events are counted against monthly_cap. Any failure short-circuits with the appropriate 4xx.

Generation — In lean mode (default), the soul document is built as a deterministic string in the function itself — no outbound call. In voice mode, a single Haiku call generates ~200 tokens. If that call fails, a static fallback is served and outcome is marked fallback in the ledger.

Ledger & billing — A row is inserted into usage_events and a meter event is fired to Stripe in parallel before the response returns. The same idempotency key is used for both, so retried requests do not double-bill or double-log.

Database tables

TableKey columnsPurpose
customers id, stripe_customer_id, plan, monthly_cap, status One row per customer. Status must be active to serve requests.
api_keys id, customer_id, key_hash, revoked_at One or more keys per customer. Only the SHA-256 hash is stored.
usage_events customer_id, api_key_id, session_id, idempotency_key, outcome Append-only ledger. One row per invocation. Used for cap checks and audit.

Quotas & billing

Each successful 200 response consumes one invocation from your monthly cap and fires one meter event to Stripe. Cap resets on the first of each calendar month UTC.

A request that returns a 4xx is never billed and never counted against your cap. A request in voice mode that falls back to a static document is still billable — the session was still served.

The quota object in every 200 response shows your current state so you can monitor headroom without a separate API call.

To increase your cap or change plans, contact us →