Quickstart
Makahai works with the official OpenAI and Anthropic SDKs. Point the SDK at https://api.makahai.com and use a Makahai API key.
1. Create an API key
Sign in to the console, open a project and choose Create key. Set a spend limit for the key if you want one. The key is shown once, so store it in your secret manager right away.
export MAKAHAI_API_KEY="mk_live_..."
2. Send a request
OpenAI SDK (Python)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.makahai.com/v1",
api_key=os.environ["MAKAHAI_API_KEY"],
)
r = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)
Anthropic SDK (Python)
Anthropic models also accept the Anthropic Messages format.
import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.makahai.com",
api_key=os.environ["MAKAHAI_API_KEY"],
)
msg = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)
curl
curl https://api.makahai.com/v1/chat/completions \
-H "Authorization: Bearer $MAKAHAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6-sol", "messages": [{"role": "user", "content": "Hello"}]}'
3. Switch models
Change the model string. To see the models your key can use:
curl https://api.makahai.com/v1/models \
-H "Authorization: Bearer $MAKAHAI_API_KEY"
The model catalog lists every model with its context length, output limit and data retention policy.
Endpoints
| Endpoint | Format |
|---|---|
POST /v1/chat/completions |
OpenAI Chat Completions |
POST /v1/messages |
Anthropic Messages (Anthropic models) |
GET /v1/models |
List of models available to your key |
Next
- Authentication: key formats and headers.
- Chat Completions and Messages: request formats and streaming.
- Models: listing models and model-specific behavior.
- Billing: how usage is reserved and settled.