# What Is OpenUI? The Generative UI Framework Explained

> OpenUI is the MIT-licensed generative UI framework from Thesys. Its OpenUI Lang streams 2.1x fewer tokens than JSON, not 3x. The hype, use cases, and rivals.

Source: https://capitalandcompute.net/blog/what-is-openui/
Published: 2026-10-08
Updated: 2026-10-12

The short answer

* OpenUI is an open-source (MIT) framework from Thesys that lets an AI model answer with real interface components, such as charts, forms and tables, instead of plain text.
* The model writes OpenUI Lang, a compact line-by-line language, and your app renders it from components you registered. The model cannot invent components or run code.
* The token claim reproduces: 4,800 tokens against 10,180 for json-render across 7 sample screens, about 2.1x fewer. "67%" and "3x" are the best single case, a contact form.
* The hype is real but small next to Vercel json-render, which drew about 11x more npm downloads in September 2026.
* Best fit: dashboards, dynamic forms and data answers inside chat, where shorter output means a screen that renders seconds sooner.

OpenUI is a generative UI framework, which means the model decides at runtime which piece of interface best answers a request, then streams it. Ask “which products lost revenue this quarter?” and a plain chatbot returns a paragraph; an OpenUI app can return a ranked table and a trend chart built from your own design system.

The project’s own numbers are mostly honest, but the headline is the best case, and the bigger story is the competition it is chasing.

## What is OpenUI?

OpenUI is the [open-source generative UI framework on GitHub (thesysdev/openui)](https://github.com/thesysdev/openui), maintained by Thesys, a US company that also runs a managed generative UI service (its earlier API was called C1; the [Thesys pricing page](https://www.thesys.dev/pricing) now sells it as OpenUI Cloud). The repository is MIT-licensed and had 10,221 stars and 706 forks on October 8, 2026, [according to the GitHub API](https://api.github.com/repos/thesysdev/openui).

It has three parts, described in the project README:

1. **A component library.** You define (or reuse) the components the model may use, with typed props written as Zod schemas. OpenUI generates the model’s system prompt from that library.
2. **OpenUI Lang.** The model replies in this compact language instead of JSON or HTML. Each line declares one component.
3. **A streaming renderer.** The client parses each line as it arrives and paints the interface progressively, in React, Vue, Svelte or Angular.

The safety model follows from the design. The model can only compose components you registered, and no generated code is executed, so a prompt-injected model cannot draw an arbitrary login form or run a script.

Two other things share the name. **OpenUI5** is [SAP’s Apache 2.0 JavaScript framework](https://en.wikipedia.org/wiki/OpenUI5) for enterprise web apps, unrelated to AI. **[wandb/openui](https://github.com/wandb/openui)** is a separate Weights & Biases project from March 2024 that renders UI you describe in plain language. This post is about thesysdev/openui. The README also warns that OpenUI has no official cryptocurrency or token.

## How does OpenUI Lang work?

Here is the contact form from the project’s [benchmark samples](https://github.com/thesysdev/openui/tree/main/benchmarks), shortened to its first lines:

```
root = Stack([title, form], "column", "l")
title = TextContent("Contact Us", "large-heavy")
form = Form("contact", [nameField, emailField, phoneField, subjectField, messageField], formButtons)
nameField = FormControl("Name", Input("name", "Your full name", "text", ["required", "minLength:2"]))
emailField = FormControl("Email", Input("email", "you@example.com", "email", ["required", "email"]))
```

Three choices make it short. Arguments are positional, so prop names never repeat. Children are referenced by name rather than nested, so deep trees stay flat. And every line is a complete statement, so the renderer can draw `title` before `form` has finished streaming.

JSON formats spell out every key on every element. Vercel’s json-render streams the same form as [JSON Patch (RFC 6902)](https://jsonpatch.com/) operations, one line per element, each carrying `"op"`, `"path"`, `"type"` and `"props"`. That is more robust to parse but costs tokens, and output tokens are the slowest and most expensive part of a model call.

## Why is OpenUI getting so much hype?

The repository dates to December 2024, but the current product is younger. The `@openuidev/react-lang` package [first appeared on npm on March 10, 2026](https://registry.npmjs.org/@openuidev/react-lang), and OpenUI [ranked #4 of the day on Product Hunt on March 11, 2026](https://www.producthunt.com/products/thesys/launches/openui-2) under the tagline “The open standard for Generative UI”.

Since then:

* **Downloads grew 13x in five months.** `@openuidev/react-lang` went from 46,761 npm downloads in April 2026 to 607,938 in September, per the [npm downloads API](https://api.npmjs.org/downloads/range/2026-03-10:2026-10-07/@openuidev/react-lang). The framework-agnostic core, `@openuidev/lang-core`, logged 686,415 in September.
* **A dedicated model shipped.** On September 7, 2026 Thesys published [OUI-1 on Hugging Face](https://huggingface.co/thesysdev/OUI-1), a fine-tune of Google’s DiffusionGemma 26B-A4B (26 billion parameters, 4 billion active) that writes OpenUI Lang. The model card reports 71.7% (132 of 184 runs) on Thesys’s own Generative UI Benchmark against 13.0% for the base model. That benchmark checks that screens are structurally valid, not that people can use them.
* **Named adopters.** The repo’s [ADOPTERS.md](https://github.com/thesysdev/openui/blob/main/ADOPTERS.md) lists Productboard, Standard Metrics, Oodle, GAIA, prox and others, plus official integrations with LangChain, Mastra, assistant-ui and the Lynx cross-platform framework. Listing is self-submitted, so read it as “using it somewhere”, not as a case study.
* **A business around it.** Thesys sells OpenUI Gateway (output validation and repair, provider fallback, an OpenAI-compatible API) and an early-access observability product, per [openui.com](https://www.openui.com).

__OpenUI vs json-render npm downloads per month, April to September 2026__
| Date       | json-render core | OpenUI react-lang |
| ---------- | ---------------- | ----------------- |
| 2026-04-01 | 1.4M             | 46.8K             |
| 2026-05-01 | 2M               | 126.3K            |
| 2026-06-01 | 2.7M             | 163.6K            |
| 2026-07-01 | 3.6M             | 261.9K            |
| 2026-08-01 | 5.2M             | 449.5K            |
| 2026-09-01 | 6.8M             | 607.9K            |

Monthly npm downloads, April to September 2026: @openuidev/react-lang (OpenUI's React runtime) against @json-render/core (Vercel's competing framework). Log scale. npm counts include CI installs and mirrors, so read them as relative momentum, not users. Pulled October 8, 2026.Source: [npm downloads API](https://api.npmjs.org/downloads/range/2026-03-10:2026-10-07/@openuidev/react-lang)

The chart is the honest frame for the hype. OpenUI is growing faster in percentage terms, but [Vercel’s json-render](https://github.com/vercel-labs/json-render), which launched in January 2026, still pulled about 11x more downloads in September and has more GitHub stars (18,570). Google’s [A2UI](https://github.com/a2ui-project/a2ui) protocol sits between them at 16,630 stars. OpenUI is a fast-rising challenger, not the default.

## Does the “67% fewer tokens” claim hold up?

Mostly, yes. The [benchmark folder](https://github.com/thesysdev/openui/tree/main/benchmarks) commits its sample outputs, so the counts can be checked. Re-tokenizing them with the same GPT-5 encoding (o200k\_base) on October 8, 2026 reproduced the OpenUI Lang and json-render totals exactly: 4,800 against 10,180 tokens across seven screens.

__Tokens per screen: OpenUI Lang vs json-render (OpenUI benchmark samples)__
| Item               | json-render (JSON Patch) | OpenUI Lang |
| ------------------ | ------------------------ | ----------- |
| Simple table       | 340                      | 148         |
| Chart with data    | 520                      | 231         |
| Contact form       | 893                      | 294         |
| Settings panel     | 1,244                    | 540         |
| E-commerce product | 2,449                    | 1,166       |
| Pricing page       | 2,487                    | 1,195       |
| Dashboard          | 2,247                    | 1,226       |

Output tokens per screen in the OpenUI benchmark samples, recounted with the o200k\_base (GPT-5) tokenizer on October 8, 2026\. Gold is OpenUI Lang, slate is the same screen as a json-render JSON Patch stream. Seven-screen total: 4,800 vs 10,180.Source: [Capital & Compute recount of thesysdev/openui benchmark samples](https://github.com/thesysdev/openui/tree/main/benchmarks/samples)

Three caveats change how far to trust the headline:

1. **“67%” and “3x” are the best case.** Only the contact form hits 67%. The dashboard saves 45%, and the seven-screen total is 52.8%, which is 2.1x fewer tokens, not 3x. The [comparison page](https://www.openui.com/docs/openui-lang/comparison) still prints “1x vs 3x” and “4.9s vs 14.2s”, which matches the contact form alone.
2. **The JSON was never written by a model.** Per the benchmark README, GPT-5.2 generated OpenUI Lang once per screen, and the JSON versions were converted from that parsed output. That isolates format verbosity fairly, but a model prompted to write json-render natively could produce a different (larger or smaller) screen.
3. **The system prompt is not counted.** The benchmark’s component-library prompt is 3,281 tokens and rides along on every request. Competing formats need a catalog prompt too, so this is not a hidden penalty, but it is the bigger number on the bill unless it is cached.

One smaller discrepancy: the Thesys C1 JSON sample files in the repo now total 9,650 tokens, not the 9,948 in the README, so the table appears to predate a regeneration. The direction is unchanged.

How the recount was done

The repo was shallow-cloned on October 8, 2026 and every file in `benchmarks/samples/` was tokenized with js-tiktoken 1.0.21 using the o200k\_base encoding, the same encoding the project’s `tiktoken` call uses for GPT-5\. Token counts are the project’s sample outputs, not new model runs.

## What does the token saving actually save?

Across the seven screens, an OpenUI screen averages 686 output tokens against 1,454 for json-render. Priced at list rates checked October 8, 2026 from this site’s [AI model price tracker](/ai-models/):

| Model (output price per million tokens) | 1,000 screens in OpenUI Lang | 1,000 screens in json-render | Saved per 1,000 screens |
| --------------------------------------- | ---------------------------- | ---------------------------- | ----------------------- |
| Claude Haiku 5.5 ($0.50)                | $0.34                        | $0.73                        | $0.38                   |
| Claude Sonnet 5.5 ($10)                 | $6.86                        | $14.54                       | $7.69                   |
| GPT-5.6 Sol ($20)                       | $13.71                       | $29.09                       | $15.37                  |

The dollar saving is small. The 3,281-token prompt costs $6.56 per 1,000 uncached calls on Sonnet 5.5 at $2 per million input tokens, about the same as the whole output saving, and $0.33 once it is a cache read. So the real cost lever is prompt caching, not the output format.

**Latency is where the format pays.** At the 60 tokens per second the project assumes, the average screen finishes in about 11 seconds instead of 24, and the dashboard in about 20 instead of 37\. In the project’s own [GPT-5.2 run log](https://github.com/thesysdev/openui/blob/main/benchmarks/samples/metrics.json), the dashboard took 16.5 seconds end to end. For a user watching a chart assemble, halving that wait matters far more than a few dollars. That is the same lesson this site found checking [WebMCP’s token-savings claims](/blog/webmcp-token-savings/): token numbers matter when they turn into time or money a reader can feel.

## What are the best use cases for OpenUI?

The common thread in the adopter list and the project’s own guidance is structured data that a person wants to scan or act on, inside a conversation:

* **Analytics and observability answers.** Oodle, per ADOPTERS.md, uses it to stream metrics, logs, traces and incident timelines as interactive UI. A question about a spike returns the chart, not a description of one.
* **Dashboards built on request.** KPI cards plus a table plus a trend line, composed from your design system for the question asked. This is the dashboard scenario in the benchmark, and the one where the latency gain is largest in absolute seconds.
* **Dynamic forms.** The model picks the fields a situation needs (a support ticket, a booking, an intake form) and the form posts through actions you define, such as `submit:contact`.
* **Product support and selectors.** prox lists troubleshooters, selectors and calculators built from product manuals: the “which one should I buy” answer as a comparison card rather than a paragraph.
* **Copilots inside existing apps.** Through the LangChain, Mastra and assistant-ui integrations, an agent you already run can emit OpenUI over the AG-UI event stream (the same protocol covered in [whether you need Inngest with the Vercel AI SDK](/blog/do-you-need-inngest-with-vercel-ai-sdk/)).

**When not to use it.** If the answer is a sentence, a short list or a code block, markdown is cheaper and clearer. If you need arbitrary, never-seen-before layouts or creative visuals, a fixed component registry is the wrong tool by design. And if your team already standardized on json-render or A2UI, the token saving alone rarely justifies a migration.

## How does OpenUI compare with json-render, A2UI and C1?

Pick OpenUI when streaming speed in chat is the priority and you are fine with a Thesys-specific language. Pick json-render when you want the most-used option and plain JSON. Pick A2UI when agents from different vendors must render on web and native mobile clients.

| Option                                                    | Cost and licence                                        | Who maintains it                 | Output format             | Best at                                          |
| --------------------------------------------------------- | ------------------------------------------------------- | -------------------------------- | ------------------------- | ------------------------------------------------ |
| OpenUI                                                    | Free, MIT (paid Gateway optional)                       | Thesys                           | OpenUI Lang (line DSL)    | Fastest streaming, chat UI included              |
| [json-render](https://github.com/vercel-labs/json-render) | Free, Apache 2.0                                        | Vercel Labs                      | JSON / JSON Patch stream  | Adoption, web plus PDF, email and video targets  |
| [A2UI](https://a2ui.org/)                                 | Free, Apache 2.0                                        | a2ui-project (Google-originated) | Declarative JSON protocol | Cross-agent, native iOS and Android rendering    |
| Thesys managed cloud (C1 API)                             | Free tier of 3,000 calls a month, then from $49 a month | Thesys                           | C1 JSON                   | Teams that want generative UI without hosting it |

OpenUI hedges the format war itself: its `@openuidev/a2ui` package carries OpenUI Lang payloads over the A2UI protocol, so choosing OpenUI does not lock you out of A2UI clients.

## How do you get started with OpenUI?

1. **Scaffold an app.** Run `npx @openuidev/cli@latest create --name genui-chat-app`, add an `OPENAI_API_KEY` to `.env`, and `npm run dev`. This gives a working streaming chat with the built-in components.
2. **Try the playground first** if you only want to see output: the [OpenUI playground](https://www.openui.com/playground) generates UI live from the default library.
3. **Register your own components.** Define props with Zod, then generate the system prompt from that library, so the model only uses your design system.
4. **Cache the system prompt.** At about 3,300 tokens for the default library it is the largest per-call cost; turn on your provider’s prompt caching.
5. **Pick the model on latency.** Output speed sets how fast a screen appears. A cheap, fast model is often the better fit than a frontier one, and OUI-1 is an option if you want to self-host on one GPU (25.8 GiB at FP8, per its model card).

## Frequently asked questions

## Frequently asked questions

What is OpenUI?

OpenUI is an open-source, MIT-licensed generative UI framework from Thesys. An AI model writes OpenUI Lang, a compact streaming language, and the app renders it as charts, forms, tables and layouts from components the developer registered. It supports React, Vue, Svelte and Angular.

What is generative UI?

Generative UI is interface that an AI model assembles at runtime for each request, choosing and configuring components such as tables, charts or forms instead of replying only with text. Most frameworks, including OpenUI, restrict the model to a fixed set of approved components.

Does OpenUI really use 67% fewer tokens than JSON?

Only in its best case. In the project benchmark, recounted on October 8, 2026, OpenUI Lang used 4,800 tokens against 10,180 for json-render across seven screens, 52.8% fewer or about 2.1x. The 67% figure is the contact form alone.

Is OpenUI the same as OpenUI5?

No. OpenUI5 is an SAP JavaScript framework for enterprise web apps. OpenUI (thesysdev/openui) is an AI generative UI framework from Thesys. They are unrelated.

Do I need the OUI-1 model to use OpenUI?

No. OpenUI works with any chat model that follows its generated system prompt, such as OpenAI, Anthropic or Google models. OUI-1 is an optional open-weight model from Thesys for self-hosting.

Which is better, OpenUI or json-render?

OpenUI streams about half the tokens, so screens render faster. json-render is far more widely used, with about 11x more npm downloads in September 2026, and uses plain JSON. Choose OpenUI for latency-sensitive chat, json-render for ecosystem and familiarity.

## Sources

* Thesys (2026). _thesysdev/openui_. GitHub repository and README. <https://github.com/thesysdev/openui>
* Thesys (2026). _OpenUI Lang benchmark_ (methodology, samples, metrics.json). GitHub. <https://github.com/thesysdev/openui/tree/main/benchmarks>
* Thesys (2026). _OpenUI Lang comparison_. OpenUI documentation. <https://www.openui.com/docs/openui-lang/comparison>
* Thesys (2026). _OpenUI_. Product site. <https://www.openui.com>
* Thesys (2026). _ADOPTERS.md_. GitHub. <https://github.com/thesysdev/openui/blob/main/ADOPTERS.md>
* Thesys (2026). _Pricing_ (OpenUI Cloud plans). <https://www.thesys.dev/pricing>
* Thesys (2026). _OUI-1_ model card. Hugging Face. <https://huggingface.co/thesysdev/OUI-1>
* GitHub (2026). _Repository API: thesysdev/openui, vercel-labs/json-render, a2ui-project/a2ui_. <https://api.github.com/repos/thesysdev/openui>
* npm (2026). _Downloads API: @openuidev/react-lang, @openuidev/lang-core, @json-render/core_. <https://api.npmjs.org/downloads/range/2026-03-10:2026-10-07/@openuidev/react-lang>
* Product Hunt (2026). _OpenUI: The open standard for Generative UI_. <https://www.producthunt.com/products/thesys/launches/openui-2>
* Vercel Labs (2026). _json-render_. GitHub. <https://github.com/vercel-labs/json-render>
* A2UI project (2026). _A2UI_. <https://a2ui.org/>
* Wikipedia (2026). _OpenUI5_. <https://en.wikipedia.org/wiki/OpenUI5>
