cd /news/ai-agents/earn-and-spend-usdc-on-inference · home › topics › ai-agents › article
[ARTICLE · art-154191] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Earn and spend USDC on inference

The Stellarium project has added AI inference to its decentralized API network, letting providers expose models as named resources that callers invoke by name and pay for per token in USDC on Solana, with no accounts or API keys required. Requests are written in RequestScript, where a model call is a function taking a prompt and a required maxTokens parameter; the node locates the hosting peer, estimates a price, checks it against the caller's spending ceiling, and settles payment automatically. Payments go live Thursday, October 22nd, 2026, and the project is open source.

by read3 min views2 publishedOct 21, 2026

If your app or harness talks to three model providers, you have three accounts, three API keys, three billing dashboards, and three sets of rate limits to babysit. If you want to offer a model, you need your own signup flow, key issuance and billing before anyone can pay you.

We've been building Stellarium, a decentralized network where anyone can host an API and get paid for every call. This post is about the newest piece: running AI inference on it. Models become ordinary resources on the network, callers pay per token in USDC, and nobody needs to set up an account.

A model is just a resource

On Stellarium, every API is a resource hosted by a node. A resource has a name, like com.example.Weather, and a list of functions programs can call. Nodes advertise their resources to peers, and any node can route a call to whoever hosts the resource.

An AI model fits the same shape. A provider wraps the model in a resource with a function that takes a prompt and returns text. For example, sh.stellarium.inference.claude.Sonnet exposes Claude Sonnet through a message function.

That means AI gets everything the network already does: discovery by name, routing between peers, results that carry either a value or an error, and payment with no signup or keys.

Calling a model

Requests on Stellarium are written in RequestScript. Calling a model looks like calling a function. The only difference is maxTokens is a required parameter. This allows the caller and provider to work out a fair price.

request AskClaude {
  const sonnet: sh.stellarium.inference.claude.Sonnet

  const reply = sonnet.message(prompt: "Write a haiku about Oslo", maxTokens: 200)
  if (reply.error != null) {
    return reply.error.message
  }

  return reply.value
}

The node does the rest: it finds the node hosting the model, gets a price estimate, checks it against your spending limit, and pays for the call. If the model fails, your script gets an error it can handle rather than a dead request.

Since a model is just another resource, one request can mix a model call with anything else on the network (a weather lookup, a Regex validation) and combine the results.

The hard part: paying per token, fairly

Most paid functions on Stellarium charge a flat fee per call. That doesn't work for inference, because cost depends on input and output tokens. There's a trust problem in both directions:

Every paid call goes through six steps:

The caller agrees to a ceiling up front and pays only for what was used. The provider knows the call is covered before spending anything.

Why this matters for agents

Agents have a great use-case for Stellarium. An agent that wants a second model, a cheaper model for a subtask, or a specialized model someone else fine-tuned shouldn't need a human to sign up, paste an API key and attach a card. On Stellarium it calls the resource by name, its node enforces a hard spending ceiling per call, and the payment is settled automatically. All through USDC on Solana.

Try it

Payments on Stellarium go live this Thursday, October 22nd, 2026. Stellarium is open source and early. Questions, comments and pull requests are all welcome.

── more in #ai-agents 4 stories · sorted by recency
── more on @stellarium 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/earn-and-spend-usdc-…] indexed:0 read:3min 2026-10-21 · —