Get started
First API call
Chat completions in the OpenAI format. If your code already talks to OpenAI, changing the base URL and the API key is the whole migration.
Your first call
Create a key
Under API keys, in the dashboard. Keep it in a terminal variable; the key starts with
qg-sk-.export QUEBRAGALHO_API_KEY=qg-sk-YOUR_KEYChange the base URL
Point the official OpenAI SDK at our base URL. No other line changes.
https://api.quebragalho.dev/v1Run it
curl https://api.quebragalho.dev/v1/chat/completions \ -H "Authorization: Bearer $QUEBRAGALHO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-6.2-astra", "messages": [{"role": "user", "content": "explain RAG in 3 lines"}] }'Your balance is charged per token, when the response ends. No account yet? Create one and get your key right away.
One key per project
The key goes in the Authorization: Bearer header. Create one per project: if one leaks, you revoke just that one.
- Shown once. We only store the hash. Lost it? Create another.
- To rotate, create the new one, switch it in the project and revoke the old one.
- Never in git or in the front end. Use an environment variable.