API-dokumentation
Auth
Skicka Authorization: Bearer nak_<din-key> eller X-API-Key: nak_<din-key>. Skapa keys på /admin.
POST /api/v1/chat
Synchronous — returnerar full text + token-usage.
curl -X POST https://agent.noackhosting.net/api/v1/chat \
-H "Authorization: Bearer nak_xxx" \
-H "Content-Type: application/json" \
-d '{"model":"architect","message":"vad är AS30893?","history":[]}'
# {"reply":"...", "usage":{"prompt_tokens":12,"completion_tokens":24,"total_tokens":36}}
POST /api/v1/chat/stream
SSE. Events: delta (text-chunk JSON-string), usage (final), done.
GET /api/v1/usage
{"tier":"standard","used_tokens":12450,"quota_tokens":500000,"remaining":487550,"period_resets":"..."}
CLI
export NOACK_AGENT_URL=https://agent.noackhosting.net export NOACK_API_KEY=nak_xxx noack-agent-cli # You: hej # AI: ... streamar ... # /reset /usage /model X /exit