Quickstart
Point any OpenAI-compatible client at Graze and use graze/auto as the model. That is the whole integration.
1. Get a key
Self-serve signup is being built. Until it ships, message @usegraze and we will create an agent key with starter credit. Graze shows the key once; store it like a password.
2. Make a call
curl https://graze-api-production.up.railway.app/v1/chat/completions \
-H "Authorization: Bearer $GRAZE_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "graze/auto", "max_tokens": 200,
"messages": [{"role": "user", "content": "Summarise this token launch in one line."}]}'
from openai import OpenAI
client = OpenAI(base_url="https://graze-api-production.up.railway.app/v1", api_key="graze_your_key")
reply = client.chat.completions.create(
model="graze/auto",
max_tokens=200,
messages=[{"role": "user", "content": "Summarise this token launch in one line."}],
)
print(reply.choices[0].message.content)
3. Read the receipt
Every response carries these headers:
| Header | Meaning |
|---|---|
X-Graze-Model |
The model that answered |
X-Graze-Attempts |
How many models were tried |
X-Graze-Cost-USD |
What this call cost you, fee included |
X-Graze-Saved-USD |
Saved against Claude Sonnet 4.6 list price |
4. Check your balance
curl https://graze-api-production.up.railway.app/v1/balance -H "Authorization: Bearer $GRAZE_KEY"