Gonka AI Provider
Gonka is a decentralized AI inference network built on a Cosmos-SDK chain that routes LLM requests to a peer-to-peer pool of GPU operators. Zeph supports two access paths.
Gonka is particularly useful for:
- Privacy-preserving inference — Requests are signed with your key; no account credentials stored on Gonka servers
- Cost control — Direct token consumption with no markup or subscription fees
- Decentralization — Work is distributed across independent GPU operators
Path A: GonkaGate (Recommended for quick start)
GonkaGate is a hosted gateway to the Gonka network with USD-denominated billing — no token staking required.
Setup:
- Sign up at https://gonkagate.com/en/register and create a
gp-...API key. - Store the key in the Zeph vault:
zeph vault set ZEPH_COMPATIBLE_GONKAGATE_API_KEY gp-... - Run
zeph initand select “Gonka (decentralized — via GonkaGate)” when prompted for a provider.
Resulting config:
[[llm.providers]]
type = "compatible"
name = "gonkagate"
base_url = "https://api.gonkagate.com/v1"
model = "gpt-4o"
Pricing: USD-denominated. Top up at https://gonkagate.com.
Path B: Native Gonka Network (Requires GNK staking)
The native path connects directly to Gonka inference nodes over a signed transport. Requests are authenticated with a secp256k1 key and GNK tokens are consumed per inference.
Prerequisites:
- Download and install
inferencedCLI from https://github.com/gonka-ai/gonka/releases. - Acquire GNK tokens and fund your address.
Setup:
- Create a key with
inferenced:inferenced keys add zeph - Store the signing key in the Zeph vault:
zeph vault set ZEPH_GONKA_PRIVATE_KEY <your-hex-encoded-secp256k1-key> zeph vault set ZEPH_GONKA_ADDRESS <your-bech32-address> # optional, for validation - Run
zeph initand select “Gonka (native — requires GNK staking)”.
Resulting config:
[[llm.providers]]
type = "gonka"
name = "gonka-mainnet"
model = "gpt-4o"
gonka_chain_prefix = "gonka"
[[llm.providers.gonka_nodes]]
url = "https://node1.gonka.ai"
address = "gonka1..."
[[llm.providers.gonka_nodes]]
url = "https://node2.gonka.ai"
address = "gonka1..."
[[llm.providers.gonka_nodes]]
url = "https://node3.gonka.ai"
address = "gonka1..."
Pricing: GNK token consumption per inference.
How GonkaProvider Works
The native Gonka integration (Path B) uses three components working together:
RequestSigner
RequestSigner handles request authentication using your secp256k1 private key. Every request is signed with:
- Request serialization — The message payload (chat parameters, tools, etc.) is serialized to JSON
- Signing — The payload is signed using secp256k1 ECDSA with your private key
- Envelope — The signature and public key are included in the request headers
EndpointPool
EndpointPool manages multiple Gonka nodes for redundancy and load distribution:
- Maintains a pool of healthy node endpoints from
[[llm.providers.gonka_nodes]]entries - Performs health checks to detect unavailable nodes
- Routes requests round-robin across available nodes
- Falls back to alternative nodes on failure
Capabilities
GonkaProvider supports all standard Zeph LLM capabilities:
| Capability | Supported | Notes |
|---|---|---|
| Chat (single-turn) | Yes | Standard text-to-text inference |
| Chat streaming (SSE) | Yes | Streaming tokens via Server-Sent Events |
| Tool use (function calling) | Yes | Full tool definitions and results supported |
| Tool streaming | Yes | Incremental tool call generation during streaming |
| Embeddings | Yes | Vector generation for semantic memory and skill matching |
| Vision (image input) | Via compatible models | Use base64-encoded images |
Configuration Details
Full Native Gonka Config Example
[llm]
[[llm.providers]]
type = "gonka"
name = "gonka-mainnet"
model = "gpt-4o"
gonka_chain_prefix = "gonka"
max_tokens = 4096
# List of available inference nodes
[[llm.providers.gonka_nodes]]
url = "https://node1.gonka.ai"
address = "gonka1acnx3cpm8cz5nqu24aql4cqx5fxqm9w4vf2hqr"
[[llm.providers.gonka_nodes]]
url = "https://node2.gonka.ai"
address = "gonka1bcx3cpm8cz5nqu24aql4cqx5fxqm9w4vf2xyz"
[[llm.providers.gonka_nodes]]
url = "https://node3.gonka.ai"
address = "gonka1ccx3cpm8cz5nqu24aql4cqx5fxqm9w4vf2abc"
Combining Gonka with Local Embeddings
If you want Gonka for chat but prefer local embeddings for cost reasons:
[[llm.providers]]
type = "gonka"
name = "gonka-chat"
model = "gpt-4o"
gonka_chain_prefix = "gonka"
default = true # use for chat
[[llm.providers]]
type = "ollama"
name = "local-embed"
embedding_model = "nomic-embed-text"
embed = true # use for embeddings
[memory.semantic]
embed_provider = "local-embed"
[skills]
embedding_provider = "local-embed"
Troubleshooting
Run the built-in diagnostic tool to check credentials and node reachability:
zeph gonka doctor
# or for machine-readable JSON output:
zeph gonka doctor --json
The doctor prints [OK], [WARN], or [FAIL] for each check: vault key resolution, signer construction, and per-node HTTP probes with latency. Exit code is 0 on success, 1 on failures.
| Symptom | Cause | Fix |
|---|---|---|
| 401 / signature error | Invalid key format or address mismatch | Verify ZEPH_GONKA_PRIVATE_KEY is hex-encoded secp256k1; confirm address matches key |
| 401 with “clock skew” | System time out of sync | Sync your clock via NTP |
| “ZEPH_GONKA_PRIVATE_KEY not found in vault” | Key not stored | Run zeph vault set ZEPH_GONKA_PRIVATE_KEY <key> |
| “ZEPH_GONKA_ADDRESS does not match address derived from private key” | Address/key mismatch | Either unset ZEPH_GONKA_ADDRESS or correct it to match the key |
inferenced not found | CLI not installed | Download from https://github.com/gonka-ai/gonka/releases |
Migrating from GonkaGate to Native
Run zeph migrate-config — it will add advisory comments to your config pointing to the fields that need updating. Then:
- Install
inferencedand fund your GNK address. - Store
ZEPH_GONKA_PRIVATE_KEYin the vault. - Update
[[llm.providers]]in your config: changetype = "compatible"totype = "gonka"and add[[llm.providers.gonka_nodes]]entries.