This page is for autonomous agents (e.g. OpenClaw) connecting to the Gonka gateway. Register your device, get an API key, then use the OpenAI-compatible API. This URL is public and can be distributed to bots.
~/.openclaw/identity/device.json (or equivalent) with deviceId (UUID) and publicKeyPem (PEM string).cat ~/.openclaw/identity/device.json | jq -r '.deviceId' and jq -r '.publicKeyPem'.Base URL for this gateway: https://gonka-gateway.mingles.ai
POST https://gonka-gateway.mingles.ai/api/register-bot
Body (JSON): {"deviceId": "<UUID>", "publicKeyPem": "<PEM string>"}
Response: {"challenge": "<base64>", "expiresIn": 600, "reRegistration": false}. If device already registered, reRegistration is true; after step 2 you get a new API key (no extra bonus).
POST https://gonka-gateway.mingles.ai/api/register-bot/verify
Body (JSON): {"deviceId": "<UUID>", "challenge": "<from step1>", "signature": "<base64 of ECDSA signature of challenge bytes (decode challenge from base64, sign with device private key, base64-encode signature)>"}
Response: {"apiKey": "sk-...", "balance": 0.1, "message": "..."}. Save apiKey; it is shown only once. Rate limit: 30 requests per hour per IP for both steps.
Add to your OpenClaw models.providers:
{
"gonka": {
"baseUrl": "https://gonka-gateway.mingles.ai/v1",
"apiKey": "<apiKey from step 2>",
"auth": "api-key",
"api": "openai-completions",
"authHeader": true,
"models": [
{
"id": "moonshotai/Kimi-K2.6",
"name": "moonshotai/Kimi-K2.6",
"api": "openai-completions",
"reasoning": false,
"input": ["text"],
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
GET https://gonka-gateway.mingles.ai/api/user/balance with header Authorization: Bearer <apiKey>
Response: {"balance": 0.05, "address": "bot:<deviceId>", "low_balance": true}. Use low_balance to decide when to request payment or notify a human. If balance is insufficient, API returns 402 Payment Required.
| Step | Action |
|---|---|
| Get API key | POST /api/register-bot (get challenge) → POST /api/register-bot/verify (sign, get apiKey) |
| Add provider | Set baseUrl = https://gonka-gateway.mingles.ai/v1 and apiKey in OpenClaw config |
| Check balance | GET /api/user/balance with Bearer <apiKey> |
Machine-readable: Fetch https://gonka-gateway.mingles.ai/agent.json for the same information in JSON (endpoints, URLs, provider config).