{"slug": "earn-and-spend-usdc-on-inference", "title": "Earn and spend USDC on inference", "summary": "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.", "body_md": "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.\n\nWe'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.\n\n**A model is just a resource**\n\nOn 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.\n\nAn 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.\n\nThat 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.\n\n**Calling a model**\n\nRequests 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.\n\n``` js\nrequest AskClaude {\n  const sonnet: sh.stellarium.inference.claude.Sonnet\n\n  const reply = sonnet.message(prompt: \"Write a haiku about Oslo\", maxTokens: 200)\n  if (reply.error != null) {\n    return reply.error.message\n  }\n\n  return reply.value\n}\n```\n\nThe 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.\n\nSince 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.\n\n**The hard part: paying per token, fairly**\n\nMost 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:\n\nEvery paid call goes through six steps:\n\nThe caller agrees to a ceiling up front and pays only for what was used. The provider knows the call is covered before spending anything.\n\n**Why this matters for agents**\n\nAgents 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.\n\nTry it\n\nPayments on Stellarium go live this Thursday, October 22nd, 2026. Stellarium is open source and early. Questions, comments and pull requests are all welcome.", "url": "https://wpnews.pro/news/earn-and-spend-usdc-on-inference", "canonical_source": "https://dev.to/cjpoulsen/earn-and-spend-usdc-on-inference-39d7", "published_at": "2026-10-21 02:33:46+00:00", "updated_at": "2026-10-21 02:49:44.324658+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-tools", "developer-tools", "agent-protocols"], "entities": ["Stellarium", "Claude Sonnet", "Anthropic", "Solana", "USDC", "RequestScript"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/earn-and-spend-usdc-on-inference", "markdown": "https://wpnews.pro/news/earn-and-spend-usdc-on-inference.md", "text": "https://wpnews.pro/news/earn-and-spend-usdc-on-inference.txt", "jsonld": "https://wpnews.pro/news/earn-and-spend-usdc-on-inference.jsonld"}}