API
Every model, one base URL.
Norce speaks the OpenAI chat completions format. Create a key in the Console, set the base URL, and pay from the same USDC balance as Norce Chat, or per message from your wallet once you turn that on.
Basics
- Base URL
https://norceagent.com/api/v1- Auth
Authorization: Bearer norce_…- Chat and images
POST /chat/completions- Models and prices
GET /models- Model ids
- As in the catalog, e.g.
anthropic/claude-sonnet-5.5 - Limits
- Up to 8,192 output tokens per call; request body up to about 400 KB
Examples
from openai import OpenAI
client = OpenAI(base_url="https://norceagent.com/api/v1", api_key="norce_…")
stream = client.chat.completions.create(
model="anthropic/claude-sonnet-5.5",
messages=[{"role": "user", "content": "Write a haiku about block times"}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://norceagent.com/api/v1", apiKey: process.env.NORCE_API_KEY });
const reply = await client.chat.completions.create({
model: "openai/gpt-6.1-terra",
messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content, reply.usage.cost);curl https://norceagent.com/api/v1/chat/completions \
-H "Authorization: Bearer $NORCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "google/gemini-3.1-flash-image",
"messages": [{"role": "user", "content": "A paper boat on a mirror-still lake"}]}'
# → choices[0].message.images[0].image_url.url is a data: URL (PNG)Billing
Before a call runs, Norce holds its worst case: your prompt plus max_tokens of output, at list price. When it finishes, you are charged what it used and the rest of the hold returns at once. A call that fails before any output is not charged. The response’s usage.cost is the amount charged in USD, and every call appears in your Console receipts.
What reaches the model
Only the model id, the messages and the generation settings (max_tokens, temperature, top_p, stop). Fields that could identify you, such as user or metadata, are dropped. Calls go out under Norce’s pooled key, without your IP address or user agent, and only to providers that do not collect prompts. Norce keeps no copy of prompts or replies.
In Norce Chat, links in your message are opened by Norce’s server, not your browser, and their text is added for the model; the linked site sees Norce, not you. In the General mode the model may run up to three web searches a reply (OpenRouter’s Exa engine, $0.007 each at list price); the search sees Norce, not you, and the reply lists its sources.
Errors
| 401 | authentication_error | Missing, unknown or revoked key. |
| 402 | insufficient_balance | The worst case of this call is more than your balance and your pay-per-message room. Top up, or turn on pay per message, in the Console. |
| 404 | invalid_request_error | The model id is not on Norce. GET /models lists them. |
| 413 | invalid_request_error | The request body is too large. |
| 502 | upstream_error | The model failed. A call that returned nothing is not charged. |
| 503 | upstream_error | Models are not switched on, or the provider is unavailable. |