Getting started

Quickstart

Go from zero to your first authenticated response in three steps.

1. Create an app

An app owns your API keys and webhook endpoints. Open the Developer console at /ops/dev and create one on the Apps tab.

2. Mint an API key

On your app, select Mint key and grant only the scopes you need (for chat, that is ai:invoke). Copy the krallo_live_… secret immediately — it is shown exactly once and only its hash is stored.

Treat the key like a password. Never embed it in client-side or public code. If it leaks, rotate it in the console.

3. Call the API

Send the key as a bearer token. Here is the authenticated identity check:

curl -H "Authorization: Bearer krallo_live_..." \
  https://exe.krallo.com/api/v1/me

On Windows PowerShell, curl is an alias for Invoke-WebRequest — so -H "Authorization: ..." fails with “Cannot bind parameter 'Headers'” and the bash \ line-continuation isn’t understood. Use the real curl.exe on one line:

curl.exe -H "Authorization: Bearer krallo_live_..." https://exe.krallo.com/api/v1/me

…or the native cmdlet with a real header table:

Invoke-RestMethod -Uri https://exe.krallo.com/api/v1/me -Headers @{ Authorization = "Bearer krallo_live_..." }

Make your first completion

Now the real thing — an OpenAI-compatible chat request:

curl https://exe.krallo.com/api/v1/chat/completions \
  -H "Authorization: Bearer krallo_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "krallo-code",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

The response is a standard OpenAI chat.completion object. See Chat completions for models, streaming and tools, or wire it straight into your editor with Use with opencode.

Response & error shapes

Native endpoints wrap success in a stable envelope with a correlation id:

{ "data": { ... }, "meta": { "request_id": "..." } }

The OpenAI-compatible /chat/completions endpoint returns raw OpenAI objects instead. Both use predictable error shapes — see Errors.

Next steps