Active development. APIs and on-chain layouts may change. Track on GitHub.
S SolanaLM
v0.1.0 — MIT licensed, Python 3.12+

On-chain AI inference
the agent economy can pay for.

SolanaLM is a decentralized, OpenAI-compatible inference network built for machine-to-machine payment: agents pay per request in SOL with sub-second settlement, operators run nodes on the cheapest DePIN GPUs, and every call leaves an on-chain audit trail — heading toward inference you can verify.

openai_compatibility.py
from solanalm_client import OpenAICompatibleClient

client = OpenAICompatibleClient(
    base_url="https://gateway.solanalm.io/v1",
    api_key="your-solana-wallet-address",  # wallet as API key
)

response = client.chat.completions.create(
    model="meta-llama/Llama-3.1-8B-Instruct",
    messages=[{"role": "user", "content": "Explain CRDTs."}],
)
print(response.choices[0].message.content)
~0.4s
Solana finality
$0.00025
Settlement fee
4
FL algorithms shipped
MIT
Fully open source
What is SolanaLM?

SolanaLM is an MIT-licensed, decentralized AI network combining OpenAI-compatible LLM inference and federated learning, with settlement and node incentives on Solana. It's built for the agent economy: callers — increasingly autonomous agents with their own wallets — pay per request in SOL with ~0.4s settlement, while GPU operators earn SOL serving inference and contributing GPU cycles on the cheapest DePIN hardware. It bundles a FastAPI gateway, a Python client SDK with OpenAI compatibility, and a federation runtime implementing FedAvg, FedProx, FedAdam, and SCAFFOLD.

Problem → Solution

The gaps centralized inference can't close.

The problem

Agents make more inference calls than humans, at thinner margins, and increasingly hold their own wallets — but centralized APIs bill monthly against seat licenses, not per call. They can't prove your prompt is unreadable to the operator, and idle DePIN GPUs earn nothing between jobs.

What SolanaLM does

Per-request SOL micropayments with sub-second finality make machine-to-machine inference practical — an agent funds a session and pays as it calls. Operators monetize the cheapest DePIN GPUs across inference and federated training, and every payment leaves an on-chain audit trail.

Why it's practical

OpenAI-compatible endpoints mean existing apps and agent frameworks switch with a base-URL change. A standard Python stack — FastAPI, Postgres, Redis, Prometheus — plus Docker Compose and Kubernetes manifests make it deployable, not just theoretical.

Capabilities

Built for paid inference on hardware you don't own.

On-chain payment and DePIN compute are only useful if the stack ships the boring operational pieces too. SolanaLM bundles them in.

See the full feature breakdown →

Multi-backend inference

One API across PyTorch/Transformers, llama.cpp, and proxied OpenAI, Anthropic, Cohere, or Ollama. Switch backends without changing client code.

Federated learning that ships

FedAvg, FedProx, FedAdam, and SCAFFOLD implementations with non-IID data handling, circuit breakers, and automatic recovery on dropped clients.

Privacy-preserving inference

Optional 3-hop onion routing for confidential prompts and differential privacy on gradient updates. Sensitive workloads stop leaking metadata.

OpenAI-compatible gateway

Drop-in replacement for the OpenAI client. Point base_url at the gateway, pass a Solana wallet as the API key, and existing apps — or autonomous agents — work unchanged. Compatibility is the on-ramp to on-chain inference.

Machine-payable settlement on Solana

Per-request SOL micropayments with sub-second finality and ~$0.00025 fees — settlement built for agents that pay per call, not per invoice. Operators get paid on every served request and every training round; every payment leaves an on-chain audit trail.

Real observability

Prometheus metrics, WebSocket admin dashboard, structured request tracing, and a Textual TUI. Diagnose hot nodes and slow clients without grepping logs.

Runs on cheap DePIN GPUs

Nodes are just containers that phone home to the registry, so they drop straight onto DePIN GPU networks (io.net, Akash, Render, Nosana) or marketplace/spot GPUs (Vast.ai, RunPod). Turn the cheapest idle inference-capable hardware into SOL revenue.

On-chain audit trail, verifiable next

Every request and payout is anchored to an on-chain audit trail today. The roadmap moves from "trust the operator" toward verifiable inference — signed attestation of which model produced a result, then sampled re-execution, then cryptographic proofs.

Architecture

Gateway, registry, nodes. No magic.

A FastAPI gateway handles auth, rate limits, and routing. The node registry tracks health and capacity with circuit breakers. Inference and training nodes plug in via a uniform backend interface — local Torch, llama.cpp, or proxied providers, with the same wire protocol.

  • · JWT + Solana signature auth, per-route rate limits
  • · Prometheus, structured logs, real-time WebSocket dashboard
  • · SQLAlchemy 2 + asyncpg, Redis cache, Alembic migrations
  • · Docker Compose for dev, Kubernetes HPA/VPA for prod
Read the architecture deep dive →
 Client SDK ─▶ Gateway API ─▶ Node Registry
                  │              │
                  ▼              ▼
            Auth / Rate     Health / Routing
            Audit Logs      Circuit Breakers
                                 │
            ┌────────────────────┼────────────────────┐
            ▼                    ▼                    ▼
       Inference          Training            Proxy
       PyTorch · GGUF     FedAvg · FedProx    OpenAI
       Transformers       SCAFFOLD · DP       Anthropic
Use cases

What people build on SolanaLM.

All use cases →
Comparisons

How SolanaLM is different.

See all comparisons →
From the blog

Latest writing.

All posts →
FAQ

Questions, answered.

All questions →
Do I need to know Solana to run a node? +

No. You need a wallet to receive payouts, but the node software handles signing, registry, and settlement. The quick-start script provisions a testnet wallet for development.

Is SolanaLM OpenAI API compatible? +

Yes. The gateway exposes /v1/chat/completions and /v1/completions matching OpenAI’s schema. Point the OpenAI SDK at the gateway URL and pass your Solana wallet address as the api_key.

What models can I serve? +

Anything PyTorch/Transformers supports, anything llama.cpp can load (GGUF), or anything reachable through OpenAI/Anthropic/Cohere/Ollama backends. You declare available models in node config.

How does privacy-preserving inference work? +

You can route a request through a 3-hop onion circuit so no single node sees both the prompt source and the prompt content. Combined with differential privacy on federated rounds, sensitive data stops leaking.

Explore the docs

Everything on SolanaLM, one hop away.

The whole site, grouped so you — or your crawler — can go straight to the page you need.

Point a DePIN GPU at it. Get paid in SOL.

Clone the repo, run poetry install, and your node joins the registry on its first heartbeat — on io.net, Akash, Vast.ai, or hardware you already own.