Quickstart

Send your first API request to the Chamelingo AI tutor in under 2 minutes.

2 min read

Create an API Key#

Log into your Chamelingo dashboard and navigate to Settings > API Keys, or use the API directly:

bash
curl -X POST https://api.chamelingo.com/api/v1/keys \
  -H "Cookie: better-auth.session_token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Language Agent", "scopes": ["tutor", "decks", "progress"]}'
Tip

Save the key field from the response immediately β€” it is shown only once and cannot be retrieved later.

Send Your First Message#

bash
curl -N -X POST https://api.chamelingo.com/api/v1/chat \
  -H "Authorization: Bearer ck_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"message": "How do I say hello in Korean?"}'

The cURL -N flag disables output buffering so you can see the SSE stream in real time.

Handle the SSE Response#

The response is a Server-Sent Events stream with three event types:

event: chunk
data: {"type":"chunk","content":"In Korean, "}

event: chunk
data: {"type":"chunk","content":"'hello' is "}

event: chunk
data: {"type":"chunk","content":"μ•ˆλ…•ν•˜μ„Έμš” (annyeonghaseyo)!"}

event: done
data: {"type":"done","conversation_id":"clxyz...","corrections":[],"usage":{"input_tokens":234,"output_tokens":89}}

The done event contains a conversation_id β€” save this to continue the conversation in follow-up requests.

Continue the Conversation#

bash
curl -N -X POST https://api.chamelingo.com/api/v1/chat \
  -H "Authorization: Bearer ck_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"message": "How about goodbye?", "conversation_id": "clxyz..."}'

Check Your Usage#

bash
curl https://api.chamelingo.com/api/v1/usage \
  -H "Authorization: Bearer ck_live_YOUR_KEY_HERE"
JSON
{
  "tier": "pro",
  "features": {
    "ai_text_messages": {
      "used": 2,
      "limit": 500,
      "remaining": 498,
      "resets_at": "2026-03-21T00:00:00.000Z"
    }
  }
}

Next Steps#