BetaMirror for Developers

MIRROR FOR DEVELOPERS

API reference

iKawn REST API endpoints for sessions, authentication, usage and connection management.

Read as Markdown

All paths are relative to https://api.ikawn.com/v1. Send Authorization: Bearer …. Session credentials are scoped to one session.

MethodPathCredentialBehavior
POST/sessions/{id}/queueAPI key or session tokenBody: {}. Keep a queued session alive and admit it when its account has capacity.
POST/sessionsAPI keyCreate a connection. Body: capability and optional queue (default true). Requires Idempotency-Key.
GET/usageAPI keyAccount granted, used, available and overage seconds.
GET/sessionsAPI keyLatest 50 sessions. Pass next_before as ?before= to paginate.
GET/sessions/{id}API key or session tokenRefresh the session state and provisional usage.
POST/sessions/{id}/heartbeatAPI key or session tokenBody: {}. Maintain liveness and update usage.
POST/sessions/{id}/connectionAPI key or session tokenBody: {}. Renew credentials for the same session.
POST/sessions/{id}/endAPI key or session tokenBody: {}. Request shutdown; 200 terminal, 202 ending.
Creation results and limits

A new allocation returns 201. An occupied account returns 202 with status queued, a scoped session token, queue position and expiry, and billable false. A replay can return 200 with the existing connection or a terminal session receipt. An allocation still pending returns 409; retry the same queue endpoint or idempotency key. Check the response state before connecting.

Current service limits: 10 creates per minute per key, 30 usage reads per minute per key, 30 session-list reads per minute per key and 60 operations per minute per session. The account concurrency limit is enforced separately; the default is one active session.