Skip to content
Appmake
Kalle API docs

Quickstart

Make your first request to the Kalle API. You need an Appmake account and a terminal, nothing else.

1. Create an API key

Open Kalle API in the Appmake console and choose Create key. Give the key a name you will recognise later, such as the app or server that will use it.

The full key is shown once. Copy it straight away: it starts with kalle_sk_. Appmake only stores a hash of it and its last four characters.

2. Save the key as an environment variable

Every example in these docs reads the key from KALLE_API_KEY:

Shell
export KALLE_API_KEY="kalle_sk_..."

3. Send your first message

Pick your language. The examples use each language's standard HTTP client, so there is nothing else to install.

curl https://api.kalle.build/v1/messages \
  -H "Authorization: Bearer $KALLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kalle-turbo",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Write a tagline for a bakery that opens at 5am."
      }
    ]
  }'

4. Read the answer

Kalle answers with a message object. The text is in content, and usage tells you how many tokens you paid for:

JSON
{
  "id": "msg_01J8Z3",
  "type": "message",
  "role": "assistant",
  "model": "kalle-turbo",
  "content": [{ "type": "text", "text": "Fresh bread before the city wakes up." }],
  "stop_reason": "end_turn",
  "usage": { "input_tokens": 21, "output_tokens": 11 }
}

Next steps