# Build a product on Omazy

How a product team builds on Omazy: the platform API, the SDK, and your product on top, what Omazy runs for you and what stays yours, and the path from a first call to many customers.

Source: https://docs.omazy.ai/build-on-omazy/

import { Tabs, TabItem } from '@astrojs/starlight/components'

This section is for a team that builds its own product and wants Omazy as the
AI layer under it: the models, the knowledge, speech, usage and billing. Your
product keeps its own screens, its own users and its own logic. It calls Omazy
from its backend with one token per customer.

If you want Omazy's own agent and widget on your website, you do not need this
section. Start with [Get started](/start/) instead.

## Three layers

```
PRODUCT    Your domain: your tables, screens, users, prompts, prices,
           and the actions your product offers
-----------------------------------------------------------------------
KITS       @omazyai/sdk: library code that runs inside your backend,
           on your own storage
-----------------------------------------------------------------------
PLATFORM   Omazy's hosted API: models, knowledge, speech, usage,
           limits, accounts and one workspace per customer
```

| Layer | Owns | Runs | Stores |
|---|---|---|---|
| Platform | What needs Omazy's servers: model access and routing, the cost record, plan limits, knowledge, speech, accounts | On Omazy | Omazy's databases |
| Kits | The mechanics every product repeats: the API clients, the capability registry, the guard, the MCP server and the rest below | In your backend | Your database, when a kit stores anything |
| Product | Your domain and every choice about it: which actions exist, who may run them, prompts, screens | In your backend | Your own database |

Your product calls the kits. The kits call the platform over HTTPS and
WebSocket. Nothing in your product talks to a model vendor directly, and no
kit keeps your product's data on Omazy.

What ships in `0.5.3`. The two clients are stable; every kit and `create-omazy-app` is a
**preview**, and its interface may change before 1.0. Pin the exact version.

| Entry point | What it is |
|---|---|
| `@omazyai/sdk` | The Core API client (`Omazy`) and the Enterprise API client (`OmazyEnterprise`). Python (`omazy`) and Go (`github.com/omazyai/omazy-sdk/go`) have the same two clients |
| `@omazyai/sdk/server` | For requests Omazy sends to your server: signature checks, request shapes, reply blocks, and a small MCP tool server. TypeScript only |
| [`@omazyai/sdk/capabilities`](/build-on-omazy/kits/capabilities/) | Preview. One definition of each action your product offers, from which the MCP tool, the model's tool schema and your own API are made |
| [`@omazyai/sdk/guard`](/build-on-omazy/kits/guard/) | Preview. Who may run an action, confirmations and approvals, kill switches, rate limits and a request log |
| [`@omazyai/sdk/mcp`](/build-on-omazy/kits/mcp/) | Preview. An MCP server per door, built from the registry and the guard |
| [`@omazyai/sdk/oauth`](/build-on-omazy/kits/oauth/) | Preview. Six independent security reviews done; open a door only on the [setup rules](/build-on-omazy/kits/oauth/). The authorization server for your doors: consent, sign-in through your product, keys and connected apps |
| [`@omazyai/sdk/ai`](/build-on-omazy/kits/ai/) and `/ai-sdk` | Preview. The run layer every model call passes through, and a Vercel AI SDK model on it |
| [`@omazyai/sdk/actors`](/build-on-omazy/kits/actors/) | Preview. A form as a conversation: code owns the questions, the checks and the submit |
| [`@omazyai/sdk/flows`](/build-on-omazy/kits/flows/) | Preview. Workflows and automations whose steps run through the guard, each step in a ledger |
| [`@omazyai/sdk/copilot`](/build-on-omazy/kits/copilot/) | Preview. An open conversation on your product's data, streamed to `useChat` |
| [`@omazyai/sdk/ui`](/build-on-omazy/kits/ui/), `/ui/react` and `/ui/server` | Preview. The screens a person uses with the other kits, and their routes |
| [`@omazyai/sdk/testing`](/build-on-omazy/kits/testing/) | Preview. Tests for units, actors and doors without the network, and release gates |
| [`create-omazy-app`](/build-on-omazy/create-omazy-app/) | Preview. Writes a new product on the kits, pinned to the same SDK version |

The kits are TypeScript only. Python and Go stay API clients.

## What Omazy does for you and what stays yours

| Omazy does | You do |
|---|---|
| Runs the model call through one gateway, with a response cache, provider fallback and a cost record per call | Write the prompt, choose what goes in it, and decide what to do with the answer |
| Keeps each customer's knowledge, indexes it and searches it | Decide what each customer's knowledge is, and write it through the API |
| Hears and speaks: speech to text, live or from a file, and text to speech | Capture the audio in your app and relay it through your backend |
| Keeps one workspace per customer, so knowledge, usage and budgets never mix | Map your customer to their workspace and hold their token |
| Counts usage and cost per workspace per day | Bill your customers, with your own prices |
| Enforces rate limits, plan limits and budgets, and refuses a call before it costs anything | Show your user something sensible when a call is refused |
| Calls the MCP tool servers you connect, with a confirm card before a write | Run the tool server, and keep your own records |

Your customers never need an Omazy login. They sign in to your product.

## Two kinds of key

| Key | Looks like | Acts on | Calls models | Where you get it |
|---|---|---|---|---|
| Install token | `cai_<prefix>.<secret>` | One workspace | Yes | The workspace owner creates it in the console, or the Enterprise API mints one per customer |
| Account key | `eak_<prefix>.<secret>` | The workspaces your account created | Never | Issued by the Omazy team to a product |

Both stay on your server. Neither goes into a browser, a mobile app or a
repository. The SDK refuses to send an account key to the Core API and an
install token to the Enterprise API, because each client only knows its own
API.

## From a first call to many customers

1. **One workspace, one token.** Get an install token from a workspace owner
   and make a streamed call from a Worker:
   [Quickstart on Cloudflare Workers](/build-on-omazy/quickstart-cloudflare-workers/).
2. **Your knowledge.** Write documents from your backend, search them, and
   keep a local copy close to where you answer:
   [Knowledge](/build-on-omazy/knowledge/).
3. **Voice.** Transcribe a recording, stream speech to text while a person
   speaks, read text aloud: [Speech](/build-on-omazy/speech/).
4. **Your tools.** Give the agent tools that run in your own service:
   [Your own MCP server](/build-on-omazy/your-own-mcp-server/).
5. **Many customers.** One workspace and one token per customer, created by
   your backend: [Many customers](/build-on-omazy/many-customers/).
6. **Before launch.** Retries, idempotency keys, limits, caches, secrets and
   timing: [Production checklist](/build-on-omazy/production-checklist/).

To see the kits together, follow
[Build an AI product in a day](/build-on-omazy/tutorial-ai-product-in-a-day/):
from `create-omazy-app` to a deployed booking desk, one tested step at a time.

## Install

The SDK is version `0.5.3`. All three languages share one version number.

<Tabs syncKey="sdk-lang">
<TabItem label="TypeScript">

Runs on Cloudflare Workers, Node 22 and later, Bun and Deno. It has no
dependencies. Until it is published on npmjs.com, install it from the release:

```sh
npm install https://github.com/omazyai/omazy-sdk/releases/download/v0.5.3/omazyai-sdk-0.5.3.tgz
```

Your `package.json` then pins that exact build. To move to a later version,
install that release's tarball.

</TabItem>
<TabItem label="Python">

Python 3.9 or later. No dependencies.

```sh
pip install https://github.com/omazyai/omazy-sdk/releases/download/v0.5.3/omazy-0.5.3-py3-none-any.whl
```

</TabItem>
<TabItem label="Go">

Go 1.22 or later. The module is in a subfolder of the repository, so its tag
carries the folder name.

```sh
go get github.com/omazyai/omazy-sdk/go@v0.5.3
```

</TabItem>
</Tabs>

The source is public at
[github.com/omazyai/omazy-sdk](https://github.com/omazyai/omazy-sdk) under the
MIT license. What changed in each version is in the
[SDK release notes](/build-on-omazy/release-notes/).

## Where the details live

These pages walk through a job. The reference has every field:

- [Core API](/reference/core-api/): every route, its scope and its errors
- [Client libraries](/reference/core-api/client-libraries/): every method of the three clients
- [API explorer](/explorer/): send a request from the browser
