Agents & Automation / Somnia LLM Inference

Somnia LLM Inference

Live

Deterministic LLM inference, powered by the Somnia Validator Network. Every validator runs the same pinned model and must return a byte-identical answer.

Requests 24h4,218
Success99.6%
Median latency5.8s
Validators / requestUp to 10Set by the calling contract
Pinned model

Qwen3-30B

Serving
Weights
Open, pinned hash
Temperature
0
Seed
Fixed
Output
Byte-identical
Agent id
1284729384…
Price / call
0.0042 SOMI
Output modes

Four ways to ask

Constrained textPick one of a fixed set of labelsclassify("…", ["YES", "NO"])
Bounded numbersReturn a number inside a rangescore("…", 0, 100)
ChatFree-form completion, byte-identical across validatorschat([{ role: "user", … }])
Tool callsStructured calls the contract can executetools([getPrice, …])
Latest

Inference requests

RequestCallerModeAgreementTokensLatencyAnswer
3919402OracleCoreConstrained text3 / 34124.9sFrance
3919388ModerationRegistryConstrained text3 / 32363.1sAPPROVED
39193770x9e14…b7a0Bounded numbers5 / 56906.4s72
3919350NameRegistryChat3 / 31582.7s"Bitcoin 20-min up"
39193310x41b0…9a07Tool calls3 / 31,0228.8sgetPrice(BTC)
Example

Call the model from a contract

solidity
uint256 id = somniaAgents.requestInference{value: fee}(
    InferenceRequest({
        model: "qwen3-30b",
        mode: Mode.ConstrainedText,
        prompt: "Who won France vs Italy on 2 Oct 2026? Answer with one label.",
        labels: ["France", "Italy", "Draw"],
        validators: 5              // up to 10, set by the caller
    })
);

function onInference(uint256 id, bytes calldata answer, Receipt[] calldata r)
    external onlyAgents { ... }