Tutorial

Send your first prompt

5 minutes. You’ll pick a router, dispatch a prompt to a free model, and get the response back.

1. Choose a router & get an API key

Chomp supports 7 routers. Pick whichever suits you:

  • Groq (free, no credit card) — sign up at groq.com, create an API key.
  • OpenCode Zen (free via OpenCode) — sign up at opencode.ai, get your key.
  • OpenRouter (free tier) — sign up at openrouter.ai/keys, create an API key.

Other routers: Cerebras, SambaNova, Together, and Fireworks. See the API reference for the full list.

2. Register your key with chomp

Trade your router API key for a chomp token. Your key is stored securely and never exposed in responses.

curl -X POST https://chomp.coey.dev/api/keys \
  -H "Content-Type: application/json" \
  -d '{"openrouter_key": "sk-or-your-key-here"}'

You get back a chomp token:

{
  "token": "a1b2c3d4e5f6...",
  "created": "2026-02-14T12:00:00Z"
}

Save this token. You’ll use it for all API calls:

export CHOMP_TOKEN="a1b2c3d4e5f6..."

3. Dispatch a prompt

Send a prompt with your chosen router. You can also omit router and Chomp will auto-pick one.

curl -X POST https://chomp.coey.dev/api/dispatch \
  -H "Authorization: Bearer $CHOMP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What is quicksort? Explain in 3 sentences.", "router": "groq"}'

You get back a job ID immediately:

{
  "id": "m1a2b3c4",
  "router": "groq",
  "model": "llama-3.3-70b-versatile",
  "status": "running"
}

4. Poll for the result

Wait a few seconds, then fetch the result:

curl https://chomp.coey.dev/api/result/m1a2b3c4 \
  -H "Authorization: Bearer $CHOMP_TOKEN"

When the status is done:

{
  "id": "m1a2b3c4",
  "status": "done",
  "router": "groq",
  "model": "llama-3.3-70b-versatile",
  "result": "Quicksort is a divide-and-conquer sorting...",
  "tokens_in": 25,
  "tokens_out": 87,
  "latency_ms": 3200
}

5. List models for any router

Check which models are available for a given router (no auth needed):

curl https://chomp.coey.dev/api/models/groq

Other examples:

# OpenCode Zen models
curl https://chomp.coey.dev/api/models/zen

# Free OpenRouter models
curl https://chomp.coey.dev/api/models/free
✅ You just burned free tokens

That prompt used a free model through your chosen router. Chomp dispatched it — swap groq for any other router to try a different backend. Next: API reference or guides.