Chat models, paid per call in WIF.
Preview only · no request is sentPOST /v1/models/gpt-4o/chat/completions← 402 · exact WIF amount comes from the live quotecaller authorizes Payment-Signature200 OK · response after successful paid callsigned receipt accompanies completed response
Priced from the request itself.
- Every eligible chat request is quoted from the body.
POST /v1/quoteis free. - The USD quote uses the configured upstream rate plus 3%, with a $0.001 minimum; the 402 binds the WIF amount to its price snapshot.
- The caller authorizes the exact WIF amount with an EVM wallet on Robinhood Chain.
- Chat and approved marketplace APIs support WIF checkout. Media and automatic refunds are unavailable.
- A completed paid chat response can include a signed Moltworld receipt.
Endpoints.
| Type | Endpoint | Priced by | Status |
|---|---|---|---|
| Chat | /v1/models/{model}/chat/completions | Input tokens + max_tokens | WIF checkout when deployment is enabled |
| Image | /v1/models/{model}/images/generations | — | Not enabled on WIF |
| Voice | /v1/models/{model}/audio/speech | — | Not enabled on WIF |
Start in a few lines.
{
"mcpServers": {
"moltworld": {
"type": "http",
"url": "https://moltworldd.vercel.app/mcp"
}
}
}
// Remote MCP lists models, quotes requests, and relays caller-signed chat.
// It never holds a private key or signs; a user-approved wallet supplies each payment.
// Agent mandates use a local session key. Marketplace calls require approved listings.
// This is configuration example text; it does not claim a completed call.
import { MoltworldClient } from "moltworld-sdk";
// Provide an EIP-1193/viem-compatible signer for Robinhood Chain.
const client = new MoltworldClient({
baseUrl: "https://moltworldd.vercel.app",
evmSigner,
maxPerRequestUsd: 0.25,
budgetUsd: 5,
});
const res = await client.chat("gpt-4o", {
messages: [{ role: "user", content: "Summarize x402 in one line" }],
max_tokens: 200,
});
console.log(res.data.choices[0].message.content);import json
from urllib.request import Request, urlopen
payload = {
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hi"}],
"max_tokens": 200,
}
request = Request(
"https://moltworldd.vercel.app/v1/quote",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
with urlopen(request) as response:
print(json.load(response))
# This is a free quote. A paid chat call needs a caller-authorized wallet signature.
# Exact price, free
curl -s https://moltworldd.vercel.app/v1/quote -H 'Content-Type: application/json' \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hi"}],"max_tokens":200}'
# The same body without payment returns 402 + Payment-Required.
# Retry with a Payment-Signature header from an x402 EVM client for Robinhood Chain.
curl -si https://moltworldd.vercel.app/v1/models/gpt-4o/chat/completions \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"user","content":"Hi"}],"max_tokens":200}'How a chat call gets paid.
- Request a free quote and receive the exact USD estimate plus WIF amount.
- Submit the same chat body, receive the 402 challenge, and authorize it with an EVM x402 client.
- The gateway returns the chat response and signed receipt when the enabled payment path completes.