Quickstart
You will have a working API call in five minutes. Three steps.
1. Get an API key
- Go to
app.unnma.ai/keys. - Click Create key, give it a name (e.g.
local-dev), and copy the value.
Your key looks like unnma-sk- followed by a string of random characters. Save it now. You won't see the full value again — only the prefix.
Keys are free to create — there is no payment method required to make one. You only pay when you spend balance on real calls. If you attach a payment method, we grant you a $5 trial credit to spend against /v1/messages calls; see Pricing for details.
2. Point your SDK at us
You don't need a new SDK. Use the Anthropic SDK or the OpenAI SDK you already have. Two changes to make in your existing code:
- Change
base_urltohttps://api.unnma.ai/v1. - Prefix model names with the vendor —
anthropic/claude-opus-4-7,openai/gpt-4o,groq/llama-3.1-70b-versatile, etc. A bare model name without a prefix is rejected. See themodelfield reference for the full vendor list.
Pass your unnma-sk-... key as the API key. That's the integration.
from anthropic import Anthropic
client = Anthropic(
api_key="unnma-sk-...",
base_url="https://api.unnma.ai/v1",
)
response = client.messages.create(
model="anthropic/claude-opus-4-7",
max_tokens=1024,
messages=[{"role": "user", "content": "Write a haiku about sandstone."}],
)
print(response.content[0].text)from openai import OpenAI
client = OpenAI(
api_key="unnma-sk-...",
base_url="https://api.unnma.ai/v1",
)
response = client.chat.completions.create(
model="anthropic/claude-opus-4-7",
messages=[{"role": "user", "content": "Write a haiku about sandstone."}],
)
print(response.choices[0].message.content)import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "unnma-sk-...",
baseURL: "https://api.unnma.ai/v1",
});
const response = await client.messages.create({
model: "anthropic/claude-opus-4-7",
max_tokens: 1024,
messages: [{ role: "user", content: "Write a haiku about sandstone." }],
});
console.log(response.content[0].text);import OpenAI from "openai";
const client = new OpenAI({
apiKey: "unnma-sk-...",
baseURL: "https://api.unnma.ai/v1",
});
const response = await client.chat.completions.create({
model: "anthropic/claude-opus-4-7",
messages: [{ role: "user", content: "Write a haiku about sandstone." }],
});
console.log(response.choices[0].message.content);curl https://api.unnma.ai/v1/messages \
-H "Authorization: Bearer unnma-sk-..." \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "anthropic/claude-opus-4-7",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Write a haiku about sandstone."}
]
}'Note: even when you use the OpenAI SDK, the model field still uses the anthropic/... prefix if you want to route to Anthropic. The vendor is determined by the prefix, not by the SDK.
3. Read the response
You get back exactly what the underlying vendor returns. If you called /v1/messages with an anthropic/... model, you get the Anthropic response shape. If you called /v1/chat/completions with an openai/... model, you get the OpenAI response shape.
{
"id": "msg_01abc...",
"type": "message",
"role": "assistant",
"model": "claude-opus-4-7",
"content": [
{
"type": "text",
"text": "Red rock holds the heat —\nthe river carves a slow door.\nNight remembers cold."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 18,
"output_tokens": 27
}
}That's it. Your call worked. The dashboard at app.unnma.ai/activity will show the call, what we charged you, and what the same call would have cost going direct.
What to read next
- If you want to know how billing actually works: Pricing.
- If you want the full endpoint contract:
/v1/messagesor/v1/chat/completions. - If something failed: Error codes.
- If you're hitting limits in production: Rate limits.