Free tiers are underrated. Everyone wants the biggest model. Nobody wants the bill. A free quota forces you to build small and measure everything. That constraint is a feature.
This tutorial sets up MonkeyCode's free model access and free server option. You go from zero to a verified request in about 20 minutes. Every step has a check. The setup costs nothing.
Disclosure: This article was prepared as part of MonkeyCode's product outreach.
Why verify at all
Everyone debates how to measure AI output. Most people never measure their own requests. A smoke test gives you three facts. The endpoint is reachable. The key is valid. The model returns tokens. That is enough to start. It is not enough to benchmark.
What you are setting up
MonkeyCode is an open source project. You can read the source and check the docs yourself. The free tier has two parts:
- Free model access. At the time of writing, the tier advertises 10,000,000 tokens (10M).
- A free server option. You do not need a GPU or a cloud VM. The server side handles the model access.
A weak laptop is fine. The heavy work happens elsewhere. I will not invent specs here. Quotas change. Endpoints change. Check the official docs for current limits.
Prerequisites
You need three things:
- A MonkeyCode account. Signup is free.
- A terminal with
curlandjq. - Five minutes of patience.
That is the whole list.
Step 1 — Create the account and export the key
Sign in to the MonkeyCode dashboard. Open the API keys page. Create a key. Copy it now. Treat it like a password.
Then export three values:
export MONKEYCODE_KEY="paste-your-key-here"
export MONKEYCODE_ENDPOINT="https://paste-endpoint-from-dashboard"
export MONKEYCODE_MODEL="model-id-from-dashboard"
Check: echo "$MONKEYCODE_KEY" prints a non-empty string.
Never hardcode the key in a script. Use the environment variable.
Step 2 — Smoke-test the endpoint
Save this as mc-smoke.sh:
#!/usr/bin/env bash
set -euo pipefail
ENDPOINT="${MONKEYCODE_ENDPOINT:?Set MONKEYCODE_ENDPOINT}"
API_KEY="${MONKEYCODE_KEY:?Set MONKEYCODE_KEY}"
MODEL="${MONKEYCODE_MODEL:?Set MONKEYCODE_MODEL}"
PAYLOAD=$(cat <<JSON
{"model":"$MODEL","messages":[{"role":"user","content":"Reply with exactly: OK"}]}
JSON
)
curl -s -o /tmp/mc_body.json -w '%{http_code}' \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$ENDPOINT/chat/completions" > /tmp/mc_status.txt
echo "HTTP status: $(cat /tmp/mc_status.txt)"
echo "Reply: $(jq -r '.choices[0].message.content' /tmp/mc_body.json)"
echo "Usage: $(jq -c '.usage' /tmp/mc_body.json)"
Run it:
chmod +x mc-smoke.sh
./mc-smoke.sh
Check: HTTP status is 200. The reply is OK. The usage object shows real token counts.
If curl itself fails, check your network and the endpoint URL. This script assumes an OpenAI-style chat completions shape. If your endpoint differs, adjust the path and the jq fields. The dashboard shows the exact values.
Step 3 — Prove the server is doing the work
The free server option means the model access runs remotely. Prove it. Open a fresh cloud shell. That machine has no local model runtime. Run the smoke test there.
export MONKEYCODE_KEY="paste-your-key-here"
export MONKEYCODE_ENDPOINT="https://paste-endpoint-from-dashboard"
export MONKEYCODE_MODEL="model-id-from-dashboard"
./mc-smoke.sh
Check: the request succeeds on a machine with nothing installed. The model access is server-side. Your laptop is only a client.
That is the value of the free server option. No local GPU. No local setup.
Step 4 — Track the 10M token budget
Free quotas disappear quietly. Requests just start failing one day. Track the budget from day one.
Log the tokens from each request:
jq '.usage.total_tokens' /tmp/mc_body.json >> "$HOME/.mc_usage.log"
Save this as mc-track.sh:
#!/usr/bin/env bash
LOG="${HOME}/.mc_usage.log"
QUOTA=10000000
touch "$LOG"
TOTAL=$(awk '{s+=$1} END {print s+0}' "$LOG")
echo "Tokens used: $TOTAL / $QUOTA"
if [ "$TOTAL" -ge $((QUOTA * 80 / 100)) ]; then
echo "Warning: you have used 80% or more of the free quota."
fi
Run it after every session:
./mc-track.sh
Check: the number grows after each request. The warning fires at 8,000,000 tokens.
The log is plain text. You can read it, grep it, or plot it. No database required.
Step 5 — Use it on a real task
Point any client that supports custom base URLs at the endpoint. Set the base URL to $MONKEYCODE_ENDPOINT. Set the key. Pick the model.
Start small. Summarize a function. Explain a stack trace. Generate a test case. Each task costs a few hundred tokens. At that rate, 10M tokens last a long time.
Check: a real task completes. The tracker shows the exact cost.
Common failures
| Symptom | Likely cause | Fix |
|---|---|---|
| HTTP 401 | Wrong or expired key | Recreate the key and re-export it |
| HTTP 404 | Wrong endpoint path | Copy the exact path from the dashboard |
| Model error | Wrong model id | Use the exact id from the dashboard |
| Empty reply | The response contains an error | Read the error field in /tmp/mc_body.json
|
| Quota error | Free tokens exhausted | Check the docs for your options |
Who should skip this
This setup is for experiments, not production.
- Skip it if you need an SLA. Free tiers have no uptime guarantees.
- Skip it if you run heavy production traffic. 10M tokens vanish fast.
- Skip it if you benchmark for a paper. A shared free endpoint is not a controlled environment.
This is a smoke test, not a benchmark. Use it to learn your own token habits. Use it to validate a workflow. Do not use it to publish conclusions about model quality.
Try it
The setup takes 20 minutes. The verification takes five. The cost is zero. Give the free tier a shot this week. You will learn more about your own usage than about the model. That alone is worth the time.
Top comments (0)