Documentation

Build with Morphis

Everything you need to embed AI-generated, sandboxed UI components inside your product. Start with the quickstart, then explore the concepts and the full API.

Two-minute mental model

Morphis is a single API: you send a natural-language intent plus a JSON blob of context data; we return sanitized, scoped HTML+CSS ready to drop into a sandboxed iframe. Your app ships new UI without a redeploy, and hostile model output never touches your DOM.

  1. Describe the component — e.g. "show a churn-risk table".
  2. Send data — { customers: 12, churn: 2.4 }.
  3. Render the returned markup inside the SDK iframe — sanitized and isolated.

Request sketch

POST /api/generate-ui
{
  "apiKey": "mph_live_...",
  "intent": "show a churn-risk table",
  "contextData": { "customers": 12, "churn": 2.4 },
  "theme": "light"
}

The response includes an html payload plus metadata (tokens, model, source).

Where to go next