Skip to main content
Nuabase is an LLM runtime designed for the front-end. It allows you to turn natural language prompts into type-safe functions that you can call directly from your browser or client-side application.

Why Nuabase?

Building LLM-powered features usually requires a significant amount of glue code:
  1. Backend API: You can’t expose LLM keys on the client, so you build a backend proxy.
  2. Validation: You need to validate inputs and enforce structured outputs from the LLM.
  3. Infrastructure: You need to handle queuing, retries, timeouts, and streaming.
Additionally, LLM prompts and responses are large, and shouldn’t go in your operational database. But you still need to maintain a store of records where you can inspect the logs for development and debugging. Nuabase solves all this with an LLM runtime that lets you run prompts directly from the front-end.

Type-Safe Functions

Define a prompt and a Zod schema, and get a fully typed async function in return. 100% type guarantee.

Front-end Native

Call directly from React, Vue, or vanilla JS. Secure access via short-lived tokens.

Granular Caching

Row-level caching means identical inputs return instantly and cost nothing.

Abuse Prevention

Built-in rate limiting, user budgets, and quotas per end-user.

How it works

// 1. Define
const classify = nua.createFn({
  prompt: "Is this comment positive or negative?",
  output: { schema: z.enum(["POSITIVE", "NEGATIVE"]) }
});

// 2. Call
const result = await classify("I love this product!");

// 3. Receive
console.log(result.data); // "POSITIVE"
  1. Define: You describe what you want (the prompt) and the shape of the data you expect (the schema).
  2. Call: You invoke the function with data, just like a normal API call.
  3. Receive: Nuabase processes the request (handling the LLM complexity) and returns validated JSON.

Next Steps