Base URL & API health
https://your-noah-hosthttps://your-noah-host/api/healthUse 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.
https://your-noah-hosthttps://your-noah-host/api/health/api/healthUse the health endpoint to verify the server, chat store, and available capabilities before your client starts work.
curl -s https://your-noah-host/api/healthRegister once, then create an API key in Dashboard → API management.
Set the Noah base URL and API key in the local Claude Code environment.
The gateway runs its private analysis and Claude stages, then returns the final formatted answer.
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.
/api/account/registerCreate 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"}'/api/account/loginSign 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"}'/api/account/meResolve 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"/api/account/api-keysCreate 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"}'Each successful agent stream reserves one Credit in both windows. The server calculates reset times from the account's active window start.
Resets five hours after the first generation in the current window.
Resets seven days after the first generation in the current weekly window.
/api/creditsRead 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"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.
/api/chatsCreate 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}'/api/chats/:chat_id/messagesAppend 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."}}'/api/chats/:chat_id/shareCreate 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>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.
Complete these steps on the device where Claude Code runs. Replace only the marked API value; never commit it.
Node.js 18+, a Noah account, and an API key from Dashboard → API management.
node --version
npm --version
# expected: Node.js 18 or newerInstall Claude Code globally, then verify that the command is available.
npm install -g @anthropic-ai/claude-code
claude --versioncloud.jsonSave 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"
}
JSONUse 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/v1/modelsModel 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"/v1/messagesThis 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"}]}'~/.claude/settings.jsonConfigure 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"POST /v1/messagesOfficial 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."}
]}]
}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.