Quickstart

Pick a path — same result.

A) Dashboard UI (no curl)

  1. Sign in and go to /dashboard — you will see your Team API key (management key, sk-…).
  2. Open Dashboard → v-keys → Create.
  3. Fill key_alias (required), max_budget (e.g. 1), budget_duration (e.g. 30d), optional models=gemma4, rpm_limit/tpm_limit.
  4. Click Create → copy the shown sk-… once (hashed afterwards).
  5. Paste into your page’s widget: data-base-url="https://proxy.klunqlabs.com/v1" + data-api-key="sk-…" (see Integration).

List, edit (POST /key/update), and delete (POST /key/delete) from the same dashboard.

B) Programmatic (management key)

Prerequisites: PROXY_URL=https://proxy.klunqlabs.com, MODEL=gemma4, and your TEAM_MGMT_KEY from the dashboard (keep it secret on the server).

# Mint a v-key with your management key
curl -X POST "$PROXY_URL/key/generate" \
  -H "Authorization: Bearer $TEAM_MGMT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key_alias":"vkey-quickstart","models":["gemma4"],"max_budget":1,"budget_duration":"30d"}'
# → {"key":"sk-…","token_id":"…","max_budget":1}

# Use it — the widget handles the watermarked prompt; raw curl must include a page-bound system prompt
curl -X POST "$PROXY_URL/v1/chat/completions" \
  -H "Authorization: Bearer $VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemma4","messages":[
        {"role":"system","content":"You are the page agent. watermark"},
        {"role":"user","content":"Summarize this page in one sentence."}]}'
# → finish_reason:"stop"

# List, inspect, update, delete (all via management key)
curl -G "$PROXY_URL/key/list" -H "Authorization: Bearer $TEAM_MGMT_KEY"
curl -G "$PROXY_URL/key/info" -H "Authorization: Bearer $TEAM_MGMT_KEY" --data-urlencode "key=$VIRTUAL_KEY"
curl -X POST "$PROXY_URL/key/update" -H "Authorization: Bearer $TEAM_MGMT_KEY" -H "Content-Type: application/json" -d '{"key":"sk-…","max_budget":2}'
curl -X POST "$PROXY_URL/key/delete" -H "Authorization: Bearer $TEAM_MGMT_KEY" -H "Content-Type: application/json" -d '{"keys":["sk-…"]}'
Store the management key in server and never share it. The browser only ever sees v-keys.

Verify page-lock

Try reusing the v-key for a generic prompt — it should block:

curl -i -X POST "$PROXY_URL/v1/chat/completions" \
  -H "Authorization: Bearer $VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemma4","messages":[{"role":"user","content":"Write a python fibonacci"}]}'
# → HTTP/1.1 400 Bad Request — Guardrail Violation

Next: Concepts — v-keys & teams · Integration — Widget + proxy

Help improve these docs

Found a gap? The widget is open source — open an issue or PR in the widget repo.