Checking API
Overview
Build with Noah

One gateway for
Claude Code.

Use the official Claude Code client on your local device with a Noah base URL and API key. Noah privately understands the request, asks Claude to create and format the answer, stores response artifacts, and returns the standard Messages response.

Live connection

Base URL & API health

Detecting domain
Base URL
https://your-noah-host
Health
https://your-noah-host/api/health
AccountNot connectedAccount token controls credits.
Device historyReadyStable browser device ID detected.
API healthCheckingLive read from `/api/health`.
GET/api/health

Use the health endpoint to verify the server, chat store, and available capabilities before your client starts work.

curl -s https://your-noah-host/api/health
01

Create an account

Register once, then create an API key in Dashboard → API management.

02

Configure official CLI

Set the Noah base URL and API key in the local Claude Code environment.

03

Ask and receive

The gateway runs its private analysis and Claude stages, then returns the final formatted answer.

Authentication

One key for your device.

Application accounts secure Noah workspace access. Create a managed API key in the dashboard and keep it only in the local official Claude Code environment.

POST/api/account/register

Create an account. Passwords are stored as salted one-way hashes. The response sets a durable session cookie and also returns an application token for the X-Noah-App-Token header.

curl -X POST https://your-noah-host/api/account/register \
  -H "Content-Type: application/json" \
  -d '{"name":"Asha Patel","email":"asha@example.com","password":"at-least-8-chars"}'
POST/api/account/login

Sign in with an existing account. The secure session cookie keeps the browser signed in across refreshes; tokens should only travel over HTTPS.

curl -X POST https://your-noah-host/api/account/login \
  -H "Content-Type: application/json" \
  -d '{"email":"asha@example.com","password":"at-least-8-chars"}'
GET/api/account/me

Resolve the signed-in account and its current Credit snapshot.

curl https://your-noah-host/api/account/me \
  -H "X-Noah-App-Token: app_your_token"
POST/api/account/api-keys

Create a managed key from Dashboard → API management. The raw key is shown once and authorizes the official Claude Code gateway.

curl -X POST https://your-noah-host/api/account/api-keys \
  -H "Content-Type: application/json" \
  -H "X-Noah-App-Token: app_your_token" \
  -d '{"name":"production worker"}'
Plans

Rolling 5h and 7d guardrails.

Each successful agent stream reserves one Credit in both windows. The server calculates reset times from the account's active window start.

5 hour windowStarter: 25 Credits

Resets five hours after the first generation in the current window.

7 day windowStarter: 100 Credits

Resets seven days after the first generation in the current weekly window.

GET/api/credits

Read the active plan, remaining Credits, reset timestamps, and plan catalog. Use this endpoint to render a usage UI; do not calculate windows only in the browser.

curl https://your-noah-host/api/credits \
  -H "X-Noah-App-Token: app_your_token"
Important:The agent stream makes the final credit decision. Client-side remaining values are useful for display, not authorization.
Persistence

Chats belong to a browser device.

Use a stable X-Device-Id for chat list, create, read, update, and message routes. Noah's frontend generates one automatically and keeps it in local storage.

POST/api/chats

Create a saved conversation when the first real prompt is ready. The browser keeps a new-chat draft local, so repeated empty clicks do not create blank records. The returned chat_id is passed to the agent stream.

curl -X POST https://your-noah-host/api/chats \
  -H "Content-Type: application/json" \
  -H "X-Device-Id: dev_browser_id" \
  -d '{"title":"Product launch outline","model":"noah-opus-4-6","thinking":false}'
POST/api/chats/:chat_id/messages

Append user or assistant content. Persisting both sides lets the dashboard and chat page reopen the same thread.

curl -X POST https://your-noah-host/api/chats/chat_example/messages \
  -H "Content-Type: application/json" \
  -H "X-Device-Id: dev_browser_id" \
  -d '{"message":{"role":"user","content":"Help me draft a launch plan."}}'
POST/api/chats/:chat_id/share

Create a revocable, read-only link for a chat owned by the current device. The public route exposes only the title, messages, and safe attachment labels.

curl -X POST https://your-noah-host/api/chats/chat_example/share \
  -H "X-Device-Id: dev_browser_id"

# Open the returned token at:
# /api/chats/shared/<share_token>
Official Claude Code gateway

Configure once.
Ask locally.

Set Noah as the Anthropic-compatible base URL in the official Claude Code client. The server privately classifies the request, then returns standard Anthropic tool calls. The installed Claude Code client executes Read, Search, Bash, Edit, and Write in the user's own workdir; Noah never opens a remote shell.

Cloud Code installation

Copy, paste, and connect

Complete these steps on the device where Claude Code runs. Replace only the marked API value; never commit it.

Frontend guide
01

Requirements

Node.js 18+, a Noah account, and an API key from Dashboard → API management.

node --version
npm --version
# expected: Node.js 18 or newer
02

Install the official client

Install Claude Code globally, then verify that the command is available.

npm install -g @anthropic-ai/claude-code
claude --version
03

Create cloud.json

Save this local profile. The placeholder is intentionally explicit: Your API paste here.

mkdir -p ~/.noah
cat > ~/.noah/cloud.json <<'JSON'
{
  "baseUrl": "https://your-noah-host",
  "apiKey": "Your API paste here",
  "model": "noah-opus-4-6"
}
JSON
04

Edit and launch

Use the same file to rotate a key or change the model, then launch a local prompt.

$EDITOR ~/.noah/cloud.json
claude "Summarize the repository changes"
# health check: https://your-noah-host/api/health
GET/v1/models

Model discovery for official Claude Code. The stable public profile is noah-opus-4-6.

curl https://noah.2bd.net/v1/models \
  -H "Authorization: Bearer noah_sk_your_key"
POST/v1/messages

This is the standard Messages route used by official Claude Code. Noah accepts the request only with a valid API key and the Anthropic version header.

curl -X POST https://noah.2bd.net/v1/messages \
  -H "Authorization: Bearer noah_sk_your_key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"noah-opus-4-6","max_tokens":1024,"stream":true,"messages":[{"role":"user","content":"hi"}]}'
LOCAL~/.claude/settings.json

Configure the official Claude Code client on the user's device. Never commit the API key or put it in Noah's server settings.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://noah.2bd.net",
    "ANTHROPIC_AUTH_TOKEN": "noah_sk_your_key",
    "ANTHROPIC_MODEL": "noah-opus-4-6"
  }
}

claude "hi"
FILESPOST /v1/messages

Official Claude Code sends its declared tools with the request. Noah returns real Anthropic tool_use blocks; the installed CLI runs Read/Search/Edit/Write in the user's local workdir and sends standard tool_result blocks back.

{
  "model": "noah-opus-4-6",
  "tools": [
    {"name": "Read", "description": "Read a local file", "input_schema": {"type": "object"}},
    {"name": "Edit", "description": "Edit a local file", "input_schema": {"type": "object"}}
  ],
  "messages": [{"role": "user", "content": [
    {"type": "text", "text": "Find duplicate links in src/links.txt."}
  ]}]
}
Local tool pipeline
DeepSeekPrivate intent planner chooses the next safe phase without reading source.
Opus 4.8Returns a real Anthropic tool_use for Read, Glob, Grep, or an explicit test command.
Claude CodeThe installed local CLI executes the tool in the user's selected workdir and sends back tool_result.
Claude formatterWrites the final answer and, only for file changes, returns exact Edit or Write input for the local client to apply.