Use Cases / generative-ui
Generative UI component pick
Asking a model to stream a JSON UI tree burns tokens on braces and still needs a validator when a key is wrong.
Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.
Why Jev
Generative UI projects that use a decision model ask it to pick a component id and whether the user must submit something. The catalog, the props, and the pixels stay in your renderer. One Choice is enough for a first gate before any markup model runs.
How to define the decision
State is the operator brief. Choice criteria are component ids your renderer actually mounts. A Noul asks whether the component needs a submit. If the pick is confirm_form, your code still owns the approval.
When to use Jev
- Selecting among a fixed component catalog from a one-line brief
- Deciding that a human confirm form is required before money moves
- Skipping a generation call when the right component is empty
When not to use Jev
- Inventing new components outside the catalog
- Writing CSS, copy, or a full screen spec
- Trusting the pick as authorization to charge a card
Failure modes and human fallback
- Upstream or network errors: retry with backoff; do not invent a decision.
- Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
- Schema drift: keep a golden fixture set in CI so label changes fail the build before production.
- This host does not return HTML or a design file.
- Component names in the sample are illustrative. Use your catalog.
- A pick is not permission to take a payment or send a message.
API example
Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.
curl https://jevtypesafe.org/api/v1/decide \
-H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"state":"Brief: let an operator approve or reject a refund over $50 and show the order id.","questions":{"component":{"type":"choice","instructions":"Which component should the renderer mount?","criteria":{"data_table":"rows of records","metric":"one number","confirm_form":"a person must approve or reject","empty":"nothing to show"}},"needs_submit":{"type":"noul","instructions":"Does this component need the user to submit something?"}}}'FAQ
- Do you host a JSON UI renderer?
- No. The decide API returns the component id. Your app renders it. Packs are on /pricing/.
- Is this Vercel json-render?
- No. That is a separate project. This page only shows the judgment call you can make with a jv_live_ key.
Related use cases
Ready to build?
Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.