Start
Quickstart
Make your first request to a NotHoly model in about two minutes.
1. Get an API key
- Create an account at notholy.com/signup and confirm your e-mail.
- Add credits in Billing. The minimum deposit is shown on that page.
- Open API keys and create a key. It starts with
nh_live_and is shown once.
Export it in your shell. It goes in the Authorization header as a bearer token.
export NOTHOLY_API_KEY="nh_live_..."2. List the models
curl https://api.notholy.com/v1/models -H "Authorization: Bearer $NOTHOLY_API_KEY"The list is public and shows each model's limits and prices. See Models.
3. Send a chat completion
curl https://api.notholy.com/v1/chat/completions \
-H "Authorization: Bearer $NOTHOLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "notholy-specter", "messages": [{"role": "user", "content": "Explain IDOR in two sentences."}]}'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.notholy.com/v1", api_key=os.environ["NOTHOLY_API_KEY"])
r = client.chat.completions.create(
model="notholy-specter",
messages=[{"role": "user", "content": "Explain IDOR in two sentences."}],
)
print(r.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://api.notholy.com/v1', apiKey: process.env.NOTHOLY_API_KEY });
const r = await client.chat.completions.create({
model: 'notholy-specter',
messages: [{ role: 'user', content: 'Explain IDOR in two sentences.' }],
});
console.log(r.choices[0].message.content);4. Stream it
Add "stream": true and read server-sent events. Each event is data: {...}, and the stream ends with data: [DONE]. See Streaming.
From the terminal
The CLI uses the same account and signs in from the browser, so you do not need to export a key.
# macOS and Linux
curl -fsSL https://notholy.com/install.sh | sh# Windows (PowerShell)
irm https://notholy.com/install.ps1 | iexnotholy --version
notholy login
notholy "explain IDOR in two sentences"Each step is explained in Install the CLI.
Common errors
| Status | Code | Fix |
|---|---|---|
| 401 | invalid_api_key | Check the key and the Authorization: Bearer header |
| 402 | insufficient_credits | Add credits in Billing |
| 404 | model_not_found | Use an ID from GET /v1/models |
Next steps
- Authentication: headers, keys and auth errors
- Models: the current models, limits and prices
- Chat completions: the full request and response
- SDKs: the OpenAI and Anthropic SDKs