x402

Metaplex x402 - Pay-Per-Request AI and Solana RPC

Last updated September 8, 2026

Metaplex x402 is a pay-per-request HTTP API for LLM inference, image generation, and Solana RPC — no API keys, no accounts, no subscriptions. Bring a USDC-funded Solana wallet, Core asset, or registered agent, and every request pays for itself in USDC as it is made.

Summary

Metaplex x402 turns HTTP's 402 Payment Required status into a machine-payable flow: your app calls an endpoint, the server responds 402 with payment requirements, the client signs a USDC payment and retries, and the server settles on Solana and returns the response. The service is operated by Mech, an onchain Metaplex agent.

  • Three services — OpenAI-compatible chat completions, OpenAI-compatible image generation, and Solana JSON-RPC with DAS pass-through
  • Three payment modes — a standard wallet, a Core asset or agent paying directly, or a delegated agent that pays without a per-request signature
  • USDC settlement — payments come from a classic SPL Token associated token account; Token-2022 payment mints are not supported
  • Open-source client — @metaplex-foundation/x402 is Apache-2.0 with 12 runnable examples; the hosted server is not published

Metaplex x402 and the name Nori

Metaplex x402 replaces an earlier service-agent prototype that was documented here as "Nori". That prototype was never released publicly and is no longer maintained; its SOL-denominated billing, /a2a surface, and agent card do not exist in this service. Nori is now the Metaplex AI copilot — a separate product, unrelated to paid inference and RPC.

Services Metaplex x402 Provides

Metaplex x402 exposes three paid services and two free discovery endpoints under a single base URL, https://api.metaplex.com/x402.

ServiceEndpointPaymentUpstream
Chat completionsPOST /x402/chat/completionsPaidAnthropic and OpenAI models, addressed as <provider>/<model>
Image generationPOST /x402/images/generationsPaidOpenAI gpt-image-1.5 and gpt-image-2
Solana RPC and DASPOST /x402/rpcPaidSolana JSON-RPC, HTTP only
Model discoveryGET /x402/modelsFreeAvailable model IDs
Pricing discoveryGET /x402/pricingFreeToken rates, request minimums, RPC method prices

The chat and image endpoints speak canonical OpenAI wire format, so any OpenAI-compatible client works by changing baseURL and supplying a payment-aware fetch. See the API reference for full request and response detail.

Mech: The Agent That Operates Metaplex x402

Mech is the onchain Metaplex agent that sells the x402 services, and USDC payments settle to Mech's Core wallet. Mech is itself a registered agent with an Asset Signer PDA wallet — an agent selling services to your agent, which is the agent commerce model working end to end.

PropertyValue
Agent addressMECHjj31U1hBapoVeJtZo5U5WGRd2293JEwRErvPTuF
Public pagemetaplex.com/agents/MECHjj…
Settlement assetUSDC

Quick Start

Install the client and point an OpenAI SDK at Metaplex x402 with a payment-aware fetch. This example pays from a standard wallet; the payment modes guide covers all three modes in full.

Install the client and its peers
pnpm add @metaplex-foundation/x402 \
@metaplex-foundation/umi \
@solana/kit \
@x402/core \
@x402/fetch \
@x402/svm \
openai
Paid chat completion from a standard wallet
import { METAPLEX_X402_BASE_URL } from '@metaplex-foundation/x402';
import { createKeyPairSignerFromBytes, getBase58Encoder } from '@solana/kit';
import { x402Client } from '@x402/core/client';
import { wrapFetchWithPayment } from '@x402/fetch';
import { ExactSvmScheme } from '@x402/svm/exact/client';
import OpenAI from 'openai';
// A Solana signer whose token account holds USDC.
const svmSigner = await createKeyPairSignerFromBytes(
getBase58Encoder().encode(process.env.SVM_PRIVATE_KEY!),
);
const paymentClient = new x402Client();
paymentClient.register('solana:*', new ExactSvmScheme(svmSigner));
const openai = new OpenAI({
// The OpenAI SDK requires a value, but this gateway authenticates by payment.
apiKey: 'x402',
baseURL: METAPLEX_X402_BASE_URL,
fetch: wrapFetchWithPayment(fetch, paymentClient),
});
const completion = await openai.chat.completions.create({
model: 'openai/gpt-5.4-mini',
messages: [{ role: 'user', content: 'Say hi in one word.' }],
});

Payment happens inside the wrapped fetch; your code only sees the final API response.

Payment Modes at a Glance

Metaplex x402 supports three ways to pay, differing in where the USDC comes from and how often the owner signs.

ModeFunds come fromOwner signsBest for
Standard walletYour wallet's USDC token accountEvery paymentApps and scripts paying as themselves
Core asset or agent (direct)The asset's signer PDA token accountEvery paymentGiving an asset its own budget, with owner oversight
Delegated agent (instant)The agent's signer PDA token accountOnce, at delegationAutonomous agents paying without supervision

Delegation is an onchain grant you can revoke at any time. The payment modes guide has the setup, code, and revocation flow for each.

How Metaplex x402 Prices Requests

Metaplex x402 prices inference at the upstream providers' token rates and RPC per request, with the live rate card published free at GET /x402/pricing.

  • Chat completions — priced per million tokens with separate input, cached-input, and output rates, subject to a $0.001 per-request minimum
  • Image generation — priced per million tokens across input text, input image, output image, and output text, with the same $0.001 minimum
  • Solana RPC — $0.00001 per request by default, with higher rates for heavier methods such as getSignaturesForAddress at $0.0001

Treat the live endpoint as the price list

Rates published in documentation are a snapshot. GET /x402/pricing on the live service is the operative price list, it requires no payment or signer, and the SDK exposes it as getPricing().

Notes

  • Payments settle in USDC from a classic SPL Token associated token account. Token-2022 payment mints are not currently supported.
  • Core asset and agent payment modes need a small SOL balance in the asset signer PDA to cover Core execute transaction fees. Standard wallet payments need no SOL — the service's fee payer covers the network fee.
  • The x402 RPC endpoint supports HTTP requests only. WebSocket connections and subscriptions are not supported.
  • The hosted server is not open source. The client, its examples, and the protocol types are published under Apache-2.0.
  • Using the services means agreeing to the Metaplex.com Terms of Use and Privacy Policy.

Quick Reference

ItemValue
API base URLhttps://api.metaplex.com/x402
RPC URLhttps://api.metaplex.com/x402/rpc
JS client@metaplex-foundation/x402 (0.1.0)
RuntimeNode.js 20.18+, ESM
Settlement assetUSDC (classic SPL Token)
Operating agentMECHjj31U1hBapoVeJtZo5U5WGRd2293JEwRErvPTuF
SourceGitHub (Apache-2.0)

FAQ

Common questions about Metaplex x402.

What is Metaplex x402?

Metaplex x402 is a pay-per-request HTTP API selling LLM inference, image generation, and Solana RPC access. There are no API keys, accounts, or subscriptions — each request settles in USDC on Solana using the x402 protocol, which turns the HTTP 402 Payment Required status into a machine-payable flow.

Do I need an API key or an account to use Metaplex x402?

No. Payment is the authentication. You need a Solana wallet, Core asset, or registered agent holding USDC. The OpenAI SDK requires a non-empty apiKey value, so the examples pass the literal string 'x402', which the gateway ignores.

What is Mech?

Mech is the onchain Metaplex agent that operates the x402 services. Payments settle in USDC to Mech's Core wallet — its Asset Signer PDA. Mech is an agent selling services to your agent or wallet, at address MECHjj31U1hBapoVeJtZo5U5WGRd2293JEwRErvPTuF.

What happened to the Nori service agent documentation?

The Nori pages documented an early prototype that was never released publicly and is no longer maintained. Metaplex x402 is the shipped service that replaced it. The name Nori now refers to the Metaplex AI copilot, a separate product unrelated to paid inference and RPC.

Does Metaplex x402 charge in SOL or USDC?

USDC. Payments are made from a classic SPL Token associated token account; Token-2022 payment mints are not supported. Core asset and agent payment modes additionally need a small SOL balance in the asset signer PDA to cover Core execute transaction fees.

Is the Metaplex x402 server open source?

The client is. The TypeScript client, its examples, and the protocol types are published at github.com/metaplex-foundation/x402 under Apache-2.0. The server that runs the hosted service is not currently published.

How much does a request cost?

Inference pricing mirrors the upstream providers' token rates with a $0.001 per-request minimum, and RPC calls are priced per request from $0.00001 with higher per-method rates for heavier calls. GET /x402/pricing returns the live rates and is free to call.

Glossary

Terms used across the Metaplex x402 documentation.

TermDefinition
x402An open protocol that uses the HTTP 402 Payment Required status to make stablecoin micropayments part of an API request/response cycle
Metaplex x402The Metaplex-hosted x402 service at https://api.metaplex.com/x402 selling inference, image generation, and Solana RPC
MechThe onchain Metaplex agent that operates Metaplex x402 and receives USDC payments
Asset Signer PDAAn MPL Core PDA derived from ["mpl-core-execute", asset] — a Core asset's onchain wallet, controlled through Core's Execute lifecycle hook
Payment modeWhich account funds a payment and how often its owner signs — standard wallet, Core asset or agent direct, or delegated agent
Execution delegationA revocable onchain grant (ExecutionDelegateRecordV1) letting Mech approve payments from a registered agent's wallet without a per-request owner signature
FacilitatorThe x402 component that verifies and settles a submitted payment onchain before the resource is returned
DASThe Digital Asset Standard read API, available through the x402 RPC endpoint as a pass-through

Maintained by Metaplex Foundation. Last verified: 2026-09-08. Client version: @metaplex-foundation/x402 0.1.0. View source on GitHub.