Skip to content

Quickstart

From the dashboard (Settings → API keys) or the CLI:

Terminal window
koda login --url https://your-gateway.example.com --token <your-org-token>
koda keys create --scopes agent:run,wallet:read # prints a key — store it once

Keys authenticate as Authorization: Bearer <key> and carry scopes (agent:run, wallet:read, keys:manage, metrics:read). Browser sessions use a sealed cookie instead.

Usage is prepaid; top up on a local rail (card / USSD / OPay / PalmPay / M-Pesa / MoMo / …):

Terminal window
koda topup 5000 # ₦5,000 — returns a checkout URL / USSD code; credited on provider confirmation
koda wallet # balance + recent ledger

Three equivalent ways:

Terminal window
# CLI
koda run "add a null check to parseUser()" --file src/user.ts
// SDK (streaming)
import { KodaClient } from '@koda-rising/sdk';
const koda = new KodaClient(BASE_URL, TOKEN);
for await (const ev of koda.agentRun('add a null check to parseUser()', [{ path: 'src/user.ts', content }])) {
if (ev.edits) applyEdits(ev.edits);
if (ev.summary) console.log(ev.summary, `cost=${ev.costMinor}`);
}
Terminal window
# Raw HTTP (SSE)
curl -N https://your-gateway/agent/run -H "authorization: Bearer $KODA_TOKEN" \
-H 'content-type: application/json' -d '{"prompt":"add a null check"}'

4 — (optional) Index your repo, then chat

Section titled “4 — (optional) Index your repo, then chat”
Terminal window
koda repo index src/**/*.ts # embeds files; the agent retrieves them automatically (vector mode)

Chat threads stream token-by-token — see POST /chat/threads/:id/messages in the API reference.

Next: Concepts.