Moamao

Quickstart: your first run

Zero to one mixture run: an API key and one curl call (plus a preview of the TypeScript SDK surface that lands later in the beta). No provider keys required — the default compute mode runs on Moamao Cloud. Prefer your own Anthropic, OpenAI, or Google keys instead? See BYOK in step 5, below.

1. Get an API key

Moamao is in open beta — no invite needed. Create a free account, then generate a key in the dashboard. Keep it server-side; it authenticates every request as a Bearer token.

export MOAMAO_KEY="mm_live_..."

2. First run with curl

Create a run by POSTing to /api/v1/runs. With "compute": "moamao-cloud" (the default) the mixture runs on our managed capacity — no provider setup, metered per token.

curl https://moamao.com/api/v1/runs \
  -H "Authorization: Bearer $MOAMAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Review this migration plan for failure modes: ...",
    "compute": "moamao-cloud"
  }'
Beta host: the API is served from the app origin (moamao.com/api/v1/runs). A dedicated api.moamao.com host arrives at GA.

The call blocks until the judge finishes — expect roughly the wall time of two to three sequential model calls, since calls within each layer run in parallel. Streaming isn't available in the beta; send "stream": false (the default).

Every beta run uses balanced-4: up to four proposers from different provider families, cross-critiquing before a judge synthesizes the answer. Choosing other presets per run (via the reserved panel field) arrives through the beta — see Concepts for the vocabulary.

3. The same run in TypeScript

The TypeScript SDK lands later in the open beta. Until it does, the snippet below shows the intended surface; the raw REST call above works today.

npm install moamao
import { Moamao } from "moamao";

const client = new Moamao({ apiKey: process.env.MOAMAO_KEY });

const run = await client.runs.create({
  input: "Review this migration plan for failure modes: ...",
  compute: "moamao-cloud",
});

console.log(run.answer);

4. Reading the response

A completed run has three parts you'll use most:

{
  "id": "rn_ahcA-Y86aCc1XWkd",
  "object": "run",
  "model": "Moamao Cloud",
  "compute": "moamao-cloud",
  "answer": "The plan has two likely failure modes: ...",
  "trace": [
    { "stage": "propose",   "provider": "Moamao Cloud", "ms": 2197 },
    { "stage": "critique",  "provider": "Moamao Cloud", "ms": 1804 },
    { "stage": "aggregate", "provider": "Moamao Cloud", "ms": 1521 }
  ],
  "usage": {
    "prompt_tokens": 536,
    "completion_tokens": 125,
    "total_tokens": 661
  }
}
  • answer — the synthesized final answer. This is what you show your users.
  • trace[]— the propose, critique, and aggregate stages in order, each with its wall-clock time. Traces are stored for replay; a zero-retention option is available if you don't want them kept.
  • usage.total_tokens — what the run metered. Moamao Cloud bills per token across the whole mixture. (BYOK runs, in Build, meter per run instead.)

5. Using your own provider keys (BYOK)

Moamao is BYOK by design: bring your own Anthropic, OpenAI, Google, or OpenAI-compatible keys and the mixture runs on your accounts, at your rates, billed per run instead of per token. In the open beta, BYOK mixtures run from Build; passing "compute": "byok" to the REST API isn't wired up yet and returns a clear error until account-level provider keys land at GA.


Next: learn the vocabulary in Concepts, see when a mixture beats a single model on the docs overview, or go straight to the API reference.