API
Every route of the Shader API, with its authentication, inputs, outputs and schemas.
The API speaks JSON over HTTPS. Amounts are decimal strings of base units: credits in credit base units (1,000 per credit, one per USDC atom), tokens in their mint's atoms. Times are UTC ISO 8601. Response objects can gain fields in later versions, so a client should ignore keys it does not know; request bodies are strict and refuse unknown keys.
The typed client in @shader/contract calls every route below and parses each response with the same schemas.
#Authentication
A person signs in with their wallet (Sign-In With Solana) and gets a session. In a browser the session can live in a cookie; any other client sends it as Authorization: Bearer <session token>. An agent sends its agent token the same way, Authorization: Bearer <agent token>, and acts for its key's wallet within the key's caps. Agent keys and limits covers how a token is made.
Ask for a nonce
GET /auth/noncereturns the sign-in message fields ininputand anonceToken.Sign the message
The wallet signs the Sign-In With Solana message built from
input.Verify
POST /auth/verifywith the wallet's public key, the signed message, the signature and thenonceToken. The answer carriestoken, the bearer session token. WithoutnonceTokenthe session is set as a cookie instead.
#Transactions
Routes that end in /build return a BuiltTransaction: a v0 transaction built by the server for the caller's wallet to sign. The wallet signs it and either sends it itself or hands it back to POST /transactions/submit to be relayed; GET /transactions/{id} then follows it to confirmation.
#Formats
| Written as | Is |
|---|---|
| A | |
| A | |
| base64 | Standard base64. |
| base units | An unsigned integer as a decimal string, such as "40000" for 40 credits. |
| u64 string | Base units that fit an unsigned 64-bit integer. |
| u64 string above 0 | A u64 string greater than zero. |
| UTC timestamp | ISO 8601 in UTC, such as "2026-11-28T12:00:00.000Z". |
#Service
Status, configuration and the public numbers.
#GET /health
Service status.
Auth: none.
Response 200: Health.
#GET /config
Product configuration: credit value, settle interval, launch headroom, payment assets, the SHDR token, generation prices and the program id. Clients read prices from here.
Auth: none.
Response 200: ProductConfig.
#GET /dashboard
The GPU list, the latest receipts across all wallets, and the burn and Earn totals.
Auth: none.
Response 200: Dashboard.
#GET /catalog/gpus
Every GPU model with its price per second, price per hour and free machines.
Auth: none.
Response 200: GpuCatalog.
#GET /receipts/public
Receipts across all wallets, newest first.
Auth: none.
| Parameter | In | Type | Meaning |
|---|---|---|---|
cursor (optional) | query | cursor | Opaque cursor from page.nextCursor. |
limit (optional) | query | integer | Page size, 1 to 100, default 24. |
agentKey (optional) | query | A | Only lines this agent key spent. |
kind (optional) | query | one of "deposit", "rental_settle", "generation", "x402" | Only lines of this kind. |
Response 200: ReceiptPage.
#Sign-in
Sign-In With Solana sessions for wallets.
#GET /auth/nonce
Starts a sign-in: the message fields to sign and a nonce token.
Auth: none.
Response 200: SignInRequest.
Errors: RATE_LIMITED.
#POST /auth/verify
Checks the signed sign-in message and opens a session.
Auth: none.
Request body: SignInProof.
Response 200: SignInSession.
Errors: UNAUTHORIZED, AUTH_NONCE_EXPIRED, AUTH_SIGNATURE_INVALID.
#GET /auth/session
The current session's wallet and expiry.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Response 200: SignInSession.
Errors: UNAUTHORIZED, SESSION_EXPIRED.
#POST /auth/logout
Ends the session. Answers 204.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
#GET /me
Who the request acts as: the wallet, and the agent key when an agent token is used.
Auth: a session or an agent token.
Response 200: Caller.
Errors: UNAUTHORIZED, AGENT_TOKEN_INVALID, AGENT_TOKEN_REVOKED.
#Rentals
Launch, read and stop GPU instances.
#POST /instances/quote
Quotes the cheapest machine of a model available now: its rate, locked if you launch with the quote before it expires, and the headroom a launch needs.
Auth: a session or an agent token.
Request body: InstanceQuoteRequest.
Response 200: InstanceQuote.
Errors: GPU_UNAVAILABLE, NOT_FOUND.
#GET /instances
The caller's instances, newest first.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
cursor (optional) | query | cursor | Opaque cursor from page.nextCursor. |
limit (optional) | query | integer | Page size, 1 to 100, default 24. |
Response 200: InstancePage.
#POST /instances
Launches a GPU. The balance must hold the launch headroom. With an agent token, the key's per-request cap must also cover the longest rental an agent may run at this rate. Answers 201 with the instance in provisioning.
Auth: a session or an agent token.
Request body: InstanceLaunchRequest.
Response 201: InstanceDetail.
Errors: UNAUTHORIZED, AGENT_TOKEN_INVALID, AGENT_TOKEN_REVOKED, AGENT_KEY_REVOKED, AGENT_CAP_EXCEEDED, AGENT_DAILY_CAP_EXCEEDED, GPU_SOLD_OUT, CREDITS_TOO_LOW, VALIDATION_ERROR, UPSTREAM_UNAVAILABLE.
#GET /instances/{id}
One instance with its meter, SSH and Jupyter details, last settlement and final receipt.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Response 200: InstanceDetail.
Errors: NOT_FOUND.
#POST /instances/{id}/stop
Stops the instance. The seconds since the last settlement are settled once more.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Request body: InstanceStopRequest.
Response 200: StopInstanceResponse.
Errors: NOT_FOUND, INSTANCE_NOT_STOPPABLE.
#Meter
Routes the meter agent inside each rented machine calls, with its per-rental launch token. Metering and settlement explains it.
#POST /instances/{id}/meter
Registers the rental's meter key and GPU UUID, signed by that key. Accepted once.
Auth: the rental's meter launch token, Authorization: Bearer shdrmeter_…, which works for this rental's registration and ticks only.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Request body: MeterRegistrationRequest.
Response 200: MeterRegistrationResponse.
Errors: METER_ALREADY_REGISTERED, UNAUTHORIZED, VALIDATION_ERROR, NOT_FOUND.
#POST /instances/{id}/ticks
Posts a batch of signed ticks. Stored with the rental; billing does not use them yet.
Auth: the rental's meter launch token, Authorization: Bearer shdrmeter_…, which works for this rental's registration and ticks only.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Request body: MeterTicksRequest.
Response 200: MeterTicksResponse.
Errors: UNAUTHORIZED, VALIDATION_ERROR, NOT_FOUND.
#Meter ticks
The signed ticks of a rental, public by rental id. Verify a rental's ticks checks them.
#GET /instances/{id}/ticks
A rental's signed ticks, by minute, with each closed minute's digest. Paged with from and limit (1 to 60 minutes, default 10).
Auth: none.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | The rental id. |
from (optional) | query | integer | First minute to return. |
limit (optional) | query | integer | Minutes per page, 1 to 60, default 10. |
Response 200: MeterTicksPage.
Errors: NOT_FOUND, VALIDATION_ERROR.
#Generation
Estimate, create and read generation jobs.
#POST /jobs/estimate
What a generation will cost, without starting it.
Auth: a session or an agent token.
Request body: GenerationRequest.
Response 200: GenerationEstimate.
Errors: UNAUTHORIZED, AGENT_TOKEN_INVALID, AGENT_TOKEN_REVOKED, AGENT_KEY_REVOKED, AGENT_CAP_EXCEEDED, AGENT_DAILY_CAP_EXCEEDED, CREDITS_TOO_LOW, CONFIGURATION_REQUIRED, VALIDATION_ERROR.
#POST /jobs
Starts a generation. Answers 201 with the job; it settles once, when the file is ready.
Auth: a session or an agent token.
Request body: GenerationRequest.
Response 201: Job.
Errors: UNAUTHORIZED, AGENT_TOKEN_INVALID, AGENT_TOKEN_REVOKED, AGENT_KEY_REVOKED, AGENT_CAP_EXCEEDED, AGENT_DAILY_CAP_EXCEEDED, CREDITS_TOO_LOW, CONFIGURATION_REQUIRED, VALIDATION_ERROR.
#GET /jobs
The caller's generation jobs, newest first.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
cursor (optional) | query | cursor | Opaque cursor from page.nextCursor. |
limit (optional) | query | integer | Page size, 1 to 100, default 24. |
Response 200: JobPage.
#GET /jobs/{id}
One job with its progress, file and receipt.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Response 200: Job.
Errors: NOT_FOUND.
#Credits
Balance, quotes and deposit transactions.
#GET /credits/balance
The credit balance in its two parts, with its dollar value.
Auth: a session or an agent token.
Response 200: CreditBalance.
#GET /credits/holdings
Supported payment assets the wallet holds, for picking what to pay with.
Auth: a session or an agent token.
Response 200: WalletHoldings.
#POST /credits/quote
Quotes a deposit: how many credits an amount of an asset will add, and until when.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: DepositQuoteRequest.
Response 200: DepositQuote.
Errors: QUOTE_ASSET_UNSUPPORTED, ASSET_NOT_LIVE, UPSTREAM_UNAVAILABLE.
#POST /credits/deposit/build
Builds the deposit transaction for a quote. For SOL and xStocks it holds the Jupiter swap and deposit_usdc; for SHDR the server co-signs after the wallet.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: BuildDepositRequest.
Response 200: BuiltTransaction.
Errors: QUOTE_EXPIRED.
#Transactions
Hand back a signed transaction and follow it.
#POST /transactions/submit
Hands back a signed transaction to relay, or the signature of one the wallet sent, and returns its status.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: SubmitTransactionRequest.
Response 200: TransactionStatus.
Errors: WALLET_REJECTED, SIMULATION_FAILED, CHAIN_REFUSED, TRANSACTION_EXPIRED, IDEMPOTENCY_CONFLICT.
#GET /transactions/{id}
The status of a built transaction. On a confirmed create_agent_key it carries the agent token, once.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
id | path | string | Instance, job or transaction id. |
Response 200: TransactionStatus.
Errors: TRANSACTION_NOT_FOUND.
#Receipts
Every charge and deposit, from the indexed Receipt and deposit events.
#GET /receipts
The caller's receipts, newest first, filtered by agent key or kind.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
cursor (optional) | query | cursor | Opaque cursor from page.nextCursor. |
limit (optional) | query | integer | Page size, 1 to 100, default 24. |
agentKey (optional) | query | A | Only lines this agent key spent. |
kind (optional) | query | one of "deposit", "rental_settle", "generation", "x402" | Only lines of this kind. |
Response 200: ReceiptPage.
#GET /receipts/{signature}
One settlement or deposit with every line and the raw event.
Auth: a session or an agent token.
| Parameter | In | Type | Meaning |
|---|---|---|---|
signature | path | A | Transaction signature. |
Response 200: ReceiptDetail.
Errors: NOT_FOUND.
#Agent keys
Agent keys and what an agent needs to connect.
#GET /agents
The wallet's agent keys with what each spent today, and the integration details.
Auth: a session or an agent token.
Response 200: AgentList.
#POST /agents/build
Builds the create_agent_key transaction. Once it confirms, GET /transactions/{id} returns the agent token once.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: CreateAgentKeyRequest.
Response 200: BuildAgentKeyResponse.
#POST /agents/{address}/update/build
Builds the update_agent_key transaction.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
| Parameter | In | Type | Meaning |
|---|---|---|---|
address | path | A | Agent key address. |
Request body: UpdateAgentKeyRequest.
Response 200: BuildAgentKeyActionResponse.
Errors: AGENT_KEY_REVOKED.
#POST /agents/{address}/revoke/build
Builds the revoke_agent_key transaction.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
| Parameter | In | Type | Meaning |
|---|---|---|---|
address | path | A | Agent key address. |
Request body: ClaimRequest.
Response 200: BuildAgentKeyActionResponse.
Errors: AGENT_KEY_REVOKED.
#Earn
Stake, withdraw and claim.
#GET /earn
The wallet's stake, accrued and claimable NVDAx, the next drop time and the pool totals.
Auth: a session or an agent token.
Response 200: EarnSummary.
#POST /earn/stake/build
Builds the stake transaction.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: StakeRequest.
Response 200: EarnBuildResponse.
Errors: ASSET_NOT_LIVE.
#POST /earn/unstake/build
Builds the unstake transaction.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: UnstakeRequest.
Response 200: EarnBuildResponse.
Errors: ASSET_NOT_LIVE.
#POST /earn/claim/build
Builds the claim transaction.
Auth: a wallet session. These routes build a transaction for the wallet to sign, so an agent token gets UNAUTHORIZED.
Request body: ClaimRequest.
Response 200: EarnBuildResponse.
Errors: ASSET_NOT_LIVE.
#x402
Generation paid per request in USDC, with no account. x402 walks through a request.
#POST /x402/generate/image
Generates images, paid in USDC per request.
Auth: none; payment goes in the PAYMENT-SIGNATURE header.
| Parameter | In | Type | Meaning |
|---|---|---|---|
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: ImageGenerationRequest.
Response 200: X402GenerationResponse.
Errors: PAYMENT_REQUIRED, PAYMENT_INVALID, PAYMENT_SETTLEMENT_FAILED.
#POST /x402/generate/video
Generates a video, paid in USDC per request.
Auth: none; payment goes in the PAYMENT-SIGNATURE header.
| Parameter | In | Type | Meaning |
|---|---|---|---|
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: VideoGenerationRequest.
Response 200: X402GenerationResponse.
Errors: PAYMENT_REQUIRED, PAYMENT_INVALID, PAYMENT_SETTLEMENT_FAILED.
#POST /x402/generate/voice
Generates a voice track, paid in USDC per request.
Auth: none; payment goes in the PAYMENT-SIGNATURE header.
| Parameter | In | Type | Meaning |
|---|---|---|---|
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: VoiceGenerationRequest.
Response 200: X402GenerationResponse.
Errors: PAYMENT_REQUIRED, PAYMENT_INVALID, PAYMENT_SETTLEMENT_FAILED.
#POST /x402/generate/asset3d
Generates a 3D asset, paid in USDC per request.
Auth: none; payment goes in the PAYMENT-SIGNATURE header.
| Parameter | In | Type | Meaning |
|---|---|---|---|
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: Asset3dGenerationRequest.
Response 200: X402GenerationResponse.
Errors: PAYMENT_REQUIRED, PAYMENT_INVALID, PAYMENT_SETTLEMENT_FAILED.
#POST /x402/rent/{gpuId}
Rents a GPU over x402 with the upto scheme. Without PAYMENT-SIGNATURE it answers 402 with a quote: the ceiling for maxSeconds at the quoted machine's rate, and the quote id in extra.memo. With a signed channel open for that ceiling it co-signs, opens the channel, launches the machine and answers with the instance, the locked rate and a stop token. Stopping and the refund come in the next step of What comes next. A refused payment answers 402 with a fresh quote and error.reason.
Auth: none; payment goes in the PAYMENT-SIGNATURE header.
| Parameter | In | Type | Meaning |
|---|---|---|---|
gpuId | path | string | Catalog id of the GPU model, such as h100-sxm-80gb. |
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: X402RentRequest.
Response 200: X402RentalResponse.
Errors: PAYMENT_REQUIRED, GPU_UNAVAILABLE, NOT_FOUND, VALIDATION_ERROR.
#POST /x402/rent/{instanceId}/extend
Extends a running x402 rental: answers 402 with another upto ceiling for maxSeconds at the rental's locked rate, with a new extension id in extra.memo. Paid from the rental's payer wallet, it opens a further channel on the same machine.
Auth: the rental's stop token, Authorization: Bearer shdrstop_…; payment goes in PAYMENT-SIGNATURE.
| Parameter | In | Type | Meaning |
|---|---|---|---|
instanceId | path | string | The rental to extend. |
PAYMENT-SIGNATURE (optional) | header | PaymentSignatureHeader | Base64 JSON PaymentPayload. Leave it out to get the price in a 402. |
Request body: X402RentExtendRequest.
Response 200: X402RentalExtensionResponse.
Errors: UNAUTHORIZED, PAYMENT_REQUIRED, PAYMENT_INVALID, INSTANCE_NOT_EXTENDABLE, EXTENSION_PENDING, NOT_FOUND.
#MCP
The MCP server for agents. MCP server lists its tools.
#POST /mcp
MCP over stateless streamable HTTP. Without a token it answers 401 with WWW-Authenticate.
Auth: an agent token only; wallet sessions are refused.
Request body: McpRequest.
Response 200: McpResponse.
#Files
Generated files.
#GET /files/{key}
A generated file, served with its stored MIME type. The key comes from a job's result.url.
Auth: none.
| Parameter | In | Type | Meaning |
|---|---|---|---|
key | path | string | Opaque file key from the job's file URL. |
#Live events
One Server-Sent Events stream for everything that changes.
#GET /events
Opens the live event stream. Send Last-Event-ID to resume after a disconnect.
Auth: a session or an agent token.
Response 200: SseEvent.
#Live events
GET /events streams SseEvent values. The meter on a screen counts seconds itself from startedAt and the rate; the stream carries state changes and settlements.
| Type | Sent when |
|---|---|
instance.changed | An instance changed state. |
meter.tick | A running instance's seconds and credits so far. |
instance.settled | A rental settlement landed. |
job.progress | A job's progress moved. |
job.completed | A job finished, done or failed. |
receipt.appended | A new receipt for the caller. |
deposit.credited | A deposit landed in the balance. |
earn.drop | The hourly NVDAx drop reached the Earn pool. |
burn.hourly | The hourly burn ran. |
resync | The stream lost events; read the state again. |
#Schemas
#McpRequest
| Field | Type | Meaning |
|---|---|---|
jsonrpc | "2.0" | "2.0". |
id (optional) | string or number | Identifier. |
method | string | MCP method, such as initialize, tools/list or tools/call. |
params (optional) | object (free form) | Method parameters; for tools/call, name and arguments. |
#McpResponse
| Field | Type | Meaning |
|---|---|---|
jsonrpc | "2.0" | "2.0". |
id (optional) | string or number or null | Identifier. |
result (optional) | any JSON | The method's result. |
error (optional) | any JSON | Why payment is required. |
#FileContent
string.
#Health
| Field | Type | Meaning |
|---|---|---|
status | string | ready, waiting or fixture. |
#ProductConfig
| Field | Type | Meaning |
|---|---|---|
contractVersion | string | Version of @shader/contract the server speaks. |
creditValueUsd | decimal string | Dollar value of one credit. |
creditBaseUnitsPerCredit | u64 string above 0 | Base units in one credit. |
settleIntervalSeconds | integer | Seconds between rental settlements. |
launchHeadroomBaseUnits | u64 string above 0 | Credits a launch needs in the balance, base units. |
feeShareBps | integer | Protocol fee share of used USDC-backed credits, basis points. |
cluster | string | Solana cluster the API runs against. |
programId | A or null | The shader program id. |
explorerBase | URL | Base URL of the block explorer links. |
paymentAssets | array of object | Assets credits can be bought with. |
paymentAssets[].mint | A or null | Mint address, or null before it exists. |
paymentAssets[].symbol | string | Ticker. |
paymentAssets[].name | string | Name. |
paymentAssets[].decimals | integer | Decimals of the mint. |
paymentAssets[].tokenProgram | A or null | Token program of the USDC mint. |
paymentAssets[].depositMethod | string | direct for USDC, jupiter for a swap to USDC, attested for SHDR. |
paymentAssets[].enabled | boolean | Whether it can be deposited now. |
paymentAssets[].native (optional) | boolean | True for SOL, which is wrapped only for its swap. |
shdr | object | The SHDR token: mint and venue are null until they exist. |
shdr.mint | A or null | Mint address, or null before it exists. |
shdr.venue | URL or null | Where SHDR trades, or null before it exists. |
shdr.symbol | string | Ticker. |
shdr.name | string | Name. |
generationPricing | object | Generation prices, base units. |
generationPricing.imageCreditsBaseUnits | u64 string above 0 | Price of one image, base units. |
generationPricing.videoCreditsBaseUnitsPerOutputSecond | u64 string above 0 | Price of one output second of video, base units. |
generationPricing.voiceCreditsBaseUnitsPerCharacter | u64 string above 0 | Price of one character of voice, base units. |
generationPricing.asset3dCreditsBaseUnits | u64 string above 0 | Price of one 3D asset, base units. |
gpuPricing (optional) | array of Gpu | The live GPU catalog with its price ranges, the same as GET /catalog/gpus. |
agentRentalMaxSeconds (optional) | integer | Longest run an agent rental is admitted for: a launch with an agent token needs a per-request cap of at least the rate times this. |
meterGraceSeconds (optional) | integer | Seconds a metered rental may go without a signed tick before it is stopped. |
#Dashboard
| Field | Type | Meaning |
|---|---|---|
gpus | array of Gpu | GPU models with their prices and free machines. |
recentReceipts | array of object | Latest receipts across all wallets. |
recentReceipts[].signature | A | Transaction signature. |
recentReceipts[].lineIndex | integer | Position of the line in its transaction, from 0. |
recentReceipts[].occurredAt | UTC timestamp | When it landed. |
recentReceipts[].kind | string | Kind. |
recentReceipts[].jobId | string or null | The rental or generation it charges, or null for a deposit. |
recentReceipts[].label | string | Name shown for it. |
recentReceipts[].units | u64 string | How many of unit. |
recentReceipts[].unitsDisplay | decimal string | units as a decimal for display. |
recentReceipts[].unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
recentReceipts[].creditsBaseUnits | base units | Credits, base units. |
recentReceipts[].usdcBackedBaseUnits | base units | USDC-backed part, base units. |
recentReceipts[].shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
recentReceipts[].rateBaseUnitsPerSecond (optional) | u64 string above 0 | Price per second, base units. |
recentReceipts[].refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
recentReceipts[].channelId (optional) | A | The payment channel account. |
recentReceipts[].channelPosition (optional) | integer | For an x402 rental close, which channel of the rental this is, from 1. |
recentReceipts[].channelCount (optional) | integer | For an x402 rental close, how many channels the rental had. |
recentReceipts[].unmetered (optional) | boolean | True when the rental had no meter key, so its seconds came from the server meter. |
recentReceipts[].meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
recentReceipts[].minute (optional) | integer | Minute index. |
recentReceipts[].signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
recentReceipts[].digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
recentReceipts[].ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
recentReceipts[].wallet | A | The wallet. |
recentReceipts[].agentKey | object or null | The agent key involved, or null for the wallet itself. |
recentReceipts[].agentKey.address | A | Address. |
recentReceipts[].agentKey.label | string | Name shown for it. |
recentReceipts[].explorerUrl | URL | The transaction on the block explorer. |
totals | object | Burn and Earn totals. |
totals.shdrBurnedBaseUnits | base units | SHDR burned so far, atoms. |
totals.shdrBurnedLastHourBaseUnits | base units | SHDR burned in the last hour, atoms. |
totals.totalStakedBaseUnits | base units | SHDR staked in the pool, atoms. |
totals.nvdaxDistributedBaseUnits | base units | NVDAx added to the pool so far, atoms. |
asOf | UTC timestamp | When the data was read. |
#Gpu
| Field | Type | Meaning |
|---|---|---|
id | identifier | Identifier. |
displayName | string | Model name, with its memory. |
memoryGb | integer | GPU memory, GB. |
creditsPerSecondBaseUnits | u64 string above 0 or null | Lowest live rate now, base units per second, or null when no machine can be priced. The same as fromCreditsPerSecondBaseUnits. |
usdPerHour | decimal string or null | Lowest live rate now in dollars an hour, or null. The same as fromUsdPerHour. |
availableCount | integer | Machines of this model offered now. |
fromCreditsPerSecondBaseUnits (optional) | u64 string above 0 or null | Lowest live rate now, base units per second, or null. |
maxCreditsPerSecondBaseUnits (optional) | u64 string above 0 or null | Highest live rate now, base units per second, or null. |
fromUsdPerHour (optional) | decimal string or null | Lowest live rate now, dollars an hour, or null. |
maxUsdPerHour (optional) | decimal string or null | Highest live rate now, dollars an hour, or null. |
#GpuCatalog
| Field | Type | Meaning |
|---|---|---|
gpus | array of Gpu | GPU models with their prices and free machines. |
asOf | UTC timestamp | When the data was read. |
#SignInRequest
| Field | Type | Meaning |
|---|---|---|
input | object | Fields of the Sign-In With Solana message to sign. |
input.domain | string | Host the sign-in is for. |
input.statement | string | The sentence the wallet shows. |
input.uri | URL | Origin the sign-in is for. |
input.version | string | Message version. |
input.chainId | string | Chain the sign-in is for. |
input.nonce | string | A number the payer chooses so each channel is new. |
input.issuedAt | UTC timestamp | When the message was issued. |
input.expirationTime | UTC timestamp | When the message stops being accepted. |
nonceToken (optional) | string | Token proving the nonce was issued by this server. |
#SignInProof
| Field | Type | Meaning |
|---|---|---|
publicKey | A | The wallet's address. |
signedMessage | X402UptoSettlementResponseHeader | The exact message the wallet signed, base64. |
signature | base64 signature | The wallet's ed25519 signature of signedMessage, base64. |
nonceToken (optional) | string | Token proving the nonce was issued by this server. |
#SignInSession
| Field | Type | Meaning |
|---|---|---|
wallet | A | The wallet. |
expiresAt | UTC timestamp | When it expires. |
token (optional) | string | Bearer session token, when nonceToken was sent to /auth/verify. |
#Caller
| Field | Type | Meaning |
|---|---|---|
wallet | A | The wallet. |
authKind | string | session for a wallet session, agent for an agent token. |
agentKey | object or null | The agent key the token belongs to, or null for a wallet session. |
agentKey.address | A | Address. |
agentKey.label | string | Name shown for it. |
#SseEvent
One Server-Sent Event of GET /events.
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
type | string | Event type, from the table above. |
timestamp | UTC timestamp | When the event happened. |
data | any JSON | The event's payload; its shape depends on type. |
#InstancePage
| Field | Type | Meaning |
|---|---|---|
items | array of object | The page of results, newest first. |
items[].id | string | Identifier. |
items[].wallet | A | The wallet. |
items[].gpu | Gpu | The GPU model. |
items[].state | string | Current state. |
items[].createdAt | UTC timestamp | When it was created. |
items[].startedAt | UTC timestamp or null | When it started running, or null. |
items[].stoppedAt | UTC timestamp or null | When it stopped, or null. |
items[].secondsRun | u64 string | Seconds the instance has run. |
items[].creditsSoFarBaseUnits | base units | Credits the rental has cost so far, base units. |
items[].rateBaseUnitsPerSecond | u64 string above 0 | Price per second, base units. |
items[].lastSettlement | object or null | The most recent settlement of this rental, or null before the first. |
items[].lastSettlement.signature | A | Transaction signature. |
items[].lastSettlement.occurredAt | UTC timestamp | When it landed. |
items[].lastSettlement.creditsBaseUnits | base units | Credits, base units. |
items[].lastSettlement.lineIndex | integer | Position of the line in its transaction, from 0. |
items[].lastSettlement.meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
items[].lastSettlement.minute (optional) | integer | Minute index. |
items[].lastSettlement.signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
items[].lastSettlement.digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
items[].lastSettlement.ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
items[].payment (optional) | object or object or object | How the rental is paid: credits, or x402 with its channel, ceiling, maxSeconds, open signature and explorer link. |
items[].payment.mode | "credits" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
items[].payment.mode | "x402" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
items[].payment.channelId | A | The payment channel account. |
items[].payment.ceilingBaseUnits | u64 string above 0 | The escrowed ceiling, USDC atoms. |
items[].payment.maxSeconds | integer | Longest the rental may run, in seconds. Defaults to 3600 and is capped at agentRentalMaxSeconds. |
items[].payment.openSignature | A | Signature of the channel open transaction. |
items[].payment.explorerUrl | URL | The transaction on the block explorer. |
items[].payment.chargedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms charged when the channel closed. |
items[].payment.refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
items[].payment.sealSignature (optional) | A | Signature of the settle_and_seal transaction. |
items[].payment.distributeSignature (optional) | A | Signature of the distribute transaction. |
items[].payment.closedAt (optional) | UTC timestamp | When the channel closed. |
items[].payment.channels (optional) | array of InstanceX402Channel | Every payment channel of an x402 rental, in order: its ceiling, signatures, seconds run, charge, refund and state. |
items[].payment.mode | string | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
items[].metered (optional) | boolean | Whether the rental has a registered meter key; its seconds are then the signed seconds. |
items[].signedSeconds (optional) | u64 string or null | Seconds signed by the meter so far, or null when unmetered. |
items[].unsealedSeconds (optional) | string | Signed seconds in minutes whose meter never sent a seal; they are not charged. |
items[].stopReason (optional) | string or null | Why the rental stopped: user, credits_exhausted, ceiling, channel_expired, agent_cap, settlement_refused, provisioning_failed, meter_stopped_signing or meter_did_not_start; null while it runs. |
page | object | Paging: nextCursor and hasMore. |
page.nextCursor | string or null | Cursor for the next page, or null. |
page.hasMore | boolean | Whether more pages follow. |
asOf | UTC timestamp | When the data was read. |
#InstanceQuoteRequest
| Field | Type | Meaning |
|---|---|---|
gpu | identifier | The GPU model. |
#InstanceQuote
| Field | Type | Meaning |
|---|---|---|
quoteId | string | Quote to launch from. |
gpu | Gpu | The GPU model. |
rateBaseUnitsPerSecond | u64 string above 0 | The quoted machine's rate, base units per second, locked for the rental if you launch before expiresAt. |
usdPerHour | decimal string | The quoted rate in dollars an hour. |
expiresAt | UTC timestamp | When it expires. |
launchHeadroomBaseUnits | u64 string above 0 | Credits a launch needs in the balance, base units. |
#InstanceLaunchRequest
| Field | Type | Meaning |
|---|---|---|
gpuId | identifier | Catalog id of the GPU model, such as h100-sxm-80gb. |
quoteId (optional) | string | Quote to launch from. |
sshPublicKey (optional) | string | Your SSH public key. Without one, a password is generated and shown only to you. |
idempotencyKey (optional) | string | A key of your choice; repeating a request with the same key returns the first result instead of acting twice. |
#InstanceDetail
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
wallet | A | The wallet. |
gpu | Gpu | The GPU model. |
state | string | provisioning, running, settling, stopping, stopped or failed. |
createdAt | UTC timestamp | When it was created. |
startedAt | UTC timestamp or null | When it started running, or null. |
stoppedAt | UTC timestamp or null | When it stopped, or null. |
secondsRun | u64 string | Seconds the instance has run. |
creditsSoFarBaseUnits | base units | Credits the rental has cost so far, base units. |
rateBaseUnitsPerSecond | u64 string above 0 | Price per second, base units. |
lastSettlement | object or null | The most recent settlement of this rental, or null before the first. |
lastSettlement.signature | A | Transaction signature. |
lastSettlement.occurredAt | UTC timestamp | When it landed. |
lastSettlement.creditsBaseUnits | base units | Credits, base units. |
lastSettlement.lineIndex | integer | Position of the line in its transaction, from 0. |
lastSettlement.meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
lastSettlement.minute (optional) | integer | Minute index. |
lastSettlement.signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
lastSettlement.digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
lastSettlement.ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
payment (optional) | object or object or object | How the rental is paid: credits, or x402 with its channel, ceiling, maxSeconds, open signature and explorer link. |
payment.mode | "credits" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
payment.mode | "x402" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
payment.channelId | A | The payment channel account. |
payment.ceilingBaseUnits | u64 string above 0 | The escrowed ceiling, USDC atoms. |
payment.maxSeconds | integer | Longest the rental may run, in seconds. Defaults to 3600 and is capped at agentRentalMaxSeconds. |
payment.openSignature | A | Signature of the channel open transaction. |
payment.explorerUrl | URL | The transaction on the block explorer. |
payment.chargedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms charged when the channel closed. |
payment.refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
payment.sealSignature (optional) | A | Signature of the settle_and_seal transaction. |
payment.distributeSignature (optional) | A | Signature of the distribute transaction. |
payment.closedAt (optional) | UTC timestamp | When the channel closed. |
payment.channels (optional) | array of InstanceX402Channel | Every payment channel of an x402 rental, in order: its ceiling, signatures, seconds run, charge, refund and state. |
payment.mode | string | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
metered (optional) | boolean | Whether the rental has a registered meter key; its seconds are then the signed seconds. |
signedSeconds (optional) | u64 string or null | Seconds signed by the meter so far, or null when unmetered. |
unsealedSeconds (optional) | string | Signed seconds in minutes whose meter never sent a seal; they are not charged. |
stopReason (optional) | string or null | Why the rental stopped: user, credits_exhausted, ceiling, channel_expired, agent_cap, settlement_refused, provisioning_failed, meter_stopped_signing or meter_did_not_start; null while it runs. |
ssh | object or null | SSH host, port, user and full command, while running. |
ssh.host | string | SSH host. |
ssh.port | integer | SSH port. |
ssh.user | string | SSH user. |
ssh.command | string | The full SSH command. |
ssh.password | string or null | Generated password when no key was given, shown only to the owner; otherwise null. |
jupyter | object or null | Jupyter URL and token, while running. |
jupyter.url | URL | URL. |
jupyter.token | string | Bearer session token, when nonceToken was sent to /auth/verify. |
finalReceipt | object or null | The receipt of the settlement at stop, once it lands. |
finalReceipt.signature | A | Transaction signature. |
finalReceipt.lineIndex | integer | Position of the line in its transaction, from 0. |
finalReceipt.occurredAt | UTC timestamp | When it landed. |
finalReceipt.kind | string | Kind. |
finalReceipt.jobId | string or null | The rental or generation it charges, or null for a deposit. |
finalReceipt.label | string | Name shown for it. |
finalReceipt.units | u64 string | How many of unit. |
finalReceipt.unitsDisplay | decimal string | units as a decimal for display. |
finalReceipt.unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
finalReceipt.creditsBaseUnits | base units | Credits, base units. |
finalReceipt.usdcBackedBaseUnits | base units | USDC-backed part, base units. |
finalReceipt.shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
finalReceipt.rateBaseUnitsPerSecond (optional) | u64 string above 0 | Price per second, base units. |
finalReceipt.refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
finalReceipt.channelId (optional) | A | The payment channel account. |
finalReceipt.channelPosition (optional) | integer | For an x402 rental close, which channel of the rental this is, from 1. |
finalReceipt.channelCount (optional) | integer | For an x402 rental close, how many channels the rental had. |
finalReceipt.unmetered (optional) | boolean | True when the rental had no meter key, so its seconds came from the server meter. |
finalReceipt.meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
finalReceipt.minute (optional) | integer | Minute index. |
finalReceipt.signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
finalReceipt.digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
finalReceipt.ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
finalReceipt.wallet | A | The wallet. |
finalReceipt.agentKey | object or null | The agent key involved, or null for the wallet itself. |
finalReceipt.agentKey.address | A | Address. |
finalReceipt.agentKey.label | string | Name shown for it. |
finalReceipt.explorerUrl | URL | The transaction on the block explorer. |
failure | string or null | Why it failed, or null. |
creditsRefunded | boolean | True when a launch failed before running, so nothing was charged. |
meterKey (optional) | A or null | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
gpuUuid (optional) | string or null | The GPU's UUID as nvidia-smi reports it inside the machine; null until the meter agent registers. |
#MeterRegistrationRequest
| Field | Type | Meaning |
|---|---|---|
publicKey | A | The meter key, base58. |
gpuUuid | string | The GPU's UUID as nvidia-smi reports it inside the machine; null until the meter agent registers. |
signature | string | The meter key's Ed25519 signature over the registration message. |
#MeterRegistrationResponse
| Field | Type | Meaning |
|---|---|---|
registered | true | true once the meter is registered. |
#MeterTicksRequest
| Field | Type | Meaning |
|---|---|---|
ticks (optional) | array of object | Signed ticks, one per second, in a batch. |
ticks[].second | integer | Seconds since registration, from 0. |
ticks[].signature | string | The meter key's Ed25519 signature over the tick message. |
seals (optional) | array of object | Minute seals, one per closed minute, each signed by the meter key. |
seals[].minute | integer | The minute sealed. |
seals[].count | integer | Signed seconds in that minute. |
seals[].digest | string | The minute digest, lowercase hex. |
seals[].signature | string | The meter key's Ed25519 signature over the seal message. |
#MeterTicksResponse
| Field | Type | Meaning |
|---|---|---|
accepted | integer | Ticks accepted from the batch. |
refused (optional) | integer | Ticks refused from the batch: a bad signature, a repeated or out-of-order second, or a second ahead of time. |
storedSeconds (optional) | array of integer | Seconds of the batch stored. |
sealedMinutes (optional) | array of integer | Minutes whose seal was accepted. |
refusedSeals (optional) | integer | Seals refused from the batch. |
#MeterTicksPage
| Field | Type | Meaning |
|---|---|---|
jobId | string | The rental id. |
meterKey | A or null | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
gpuUuid | string or null | The GPU's UUID as nvidia-smi reports it inside the machine; null until the meter agent registers. |
tickVersion | string | The tick message version, shader-meter-tick/v1. |
minuteVersion | string | The minute digest version, shader-meter-minute/v1. |
sealVersion (optional) | string | The seal message version, shader-meter-seal/v1. |
minutes | array of object | The rental's minutes, from from. |
minutes[].minute | integer | Minute index m, from 0 at registration. |
minutes[].firstSecond | integer | First second of the minute, 60 × m. |
minutes[].ticks | array of object | The minute's signed ticks, in second order. |
minutes[].ticks[].second | integer | Seconds since registration. |
minutes[].ticks[].signature | string | Ed25519 signature over the tick message, padded base64. |
minutes[].count | integer | Ticks in the minute. |
minutes[].gaps | array of object | Runs of seconds in the minute with no tick; they are not charged. |
minutes[].gaps[].fromSecond | integer | First second of the gap. |
minutes[].gaps[].toSecond | integer | Last second of the gap. |
minutes[].digest | string or null | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
minutes[].seal (optional) | object or null | The closed minute's seal: minute, count, digest and the meter key's signature, or null if the meter never sealed it. |
minutes[].seal.minute | integer | The minute sealed. |
minutes[].seal.count | integer | Signed seconds sealed. |
minutes[].seal.digest | string | The minute digest sealed. |
minutes[].seal.signature | string | Ed25519 signature over the seal message, padded base64. |
minutes[].open | boolean | True while the minute is still being written. |
nextMinute | integer or null | The from for the next page, or null. |
#InstanceStopRequest
| Field | Type | Meaning |
|---|---|---|
idempotencyKey (optional) | string | A key of your choice; repeating a request with the same key returns the first result instead of acting twice. |
#StopInstanceResponse
| Field | Type | Meaning |
|---|---|---|
instance | InstanceDetail | The instance after the stop request. |
#JobPage
| Field | Type | Meaning |
|---|---|---|
items | array of Job | The page of results, newest first. |
page | object | Paging: nextCursor and hasMore. |
page.nextCursor | string or null | Cursor for the next page, or null. |
page.hasMore | boolean | Whether more pages follow. |
asOf | UTC timestamp | When the data was read. |
#GenerationRequest
One of the four kinds, chosen by kind.
When kind is "image":
| Field | Type | Meaning |
|---|---|---|
kind | "image" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.width (optional) | integer | Image width, 256 to 2048. |
options.height (optional) | integer | Image height, 256 to 2048. |
options.count (optional) | integer | Images to make, 1 to 4. |
options.format (optional) | one of "png", "webp" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
When kind is "video":
| Field | Type | Meaning |
|---|---|---|
kind | "video" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.outputSeconds | integer | Video length, 1 to 60 seconds. |
options.aspectRatio (optional) | one of "16:9", "9:16", "1:1" | 16:9, 9:16 or 1:1. |
options.format (optional) | one of "mp4", "webm" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
When kind is "voice":
| Field | Type | Meaning |
|---|---|---|
kind | "voice" | Kind. |
text | string | Text to speak. |
options | object | Options of the kind. |
options.voice (optional) | string | Voice to speak with. |
options.format (optional) | one of "mp3", "wav" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
When kind is "asset3d":
| Field | Type | Meaning |
|---|---|---|
kind | "asset3d" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.format (optional) | one of "glb", "usdz" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
options.style (optional) | string | Style of the 3D asset. |
#ImageGenerationRequest
| Field | Type | Meaning |
|---|---|---|
kind | "image" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.width (optional) | integer | Image width, 256 to 2048. |
options.height (optional) | integer | Image height, 256 to 2048. |
options.count (optional) | integer | Images to make, 1 to 4. |
options.format (optional) | one of "png", "webp" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
#VideoGenerationRequest
| Field | Type | Meaning |
|---|---|---|
kind | "video" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.outputSeconds | integer | Video length, 1 to 60 seconds. |
options.aspectRatio (optional) | one of "16:9", "9:16", "1:1" | 16:9, 9:16 or 1:1. |
options.format (optional) | one of "mp4", "webm" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
#VoiceGenerationRequest
| Field | Type | Meaning |
|---|---|---|
kind | "voice" | Kind. |
text | string | Text to speak. |
options | object | Options of the kind. |
options.voice (optional) | string | Voice to speak with. |
options.format (optional) | one of "mp3", "wav" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
#Asset3dGenerationRequest
| Field | Type | Meaning |
|---|---|---|
kind | "asset3d" | Kind. |
prompt | string | What to generate. |
options | object | Options of the kind. |
options.format (optional) | one of "glb", "usdz" | File format: png or webp for images, mp4 or webm for video, mp3 or wav for voice, glb or usdz for 3D. |
options.style (optional) | string | Style of the 3D asset. |
#GenerationEstimate
| Field | Type | Meaning |
|---|---|---|
kind | string | image, video, voice or asset3d. |
units | u64 string | How many of unit. |
unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
creditsBaseUnits | u64 string above 0 | Credits the job will cost, base units. |
pricingRule | string | The price rule in words. |
#Job
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
wallet | A | The wallet. |
kind | string | image, video, voice or asset3d. |
state | string | queued, running, done (with result and receipt) or failed (with failure, nothing charged). |
createdAt | UTC timestamp | When it was created. |
startedAt | UTC timestamp or null | When it started running, or null. |
completedAt | UTC timestamp or null | When the job finished, or null. |
progress | number | Progress from 0 to 1. |
estimate | GenerationEstimate | The estimate the job was created with. |
chargedCreditsBaseUnits | base units | Credits charged so far; 0 until the job settles, and 0 for a failed job. |
result | object or null | The method's result. |
result.url | URL | URL. |
result.mimeType | string | File type. |
result.sizeBytes | u64 string | File size, bytes. |
results (optional) | array of object | Every generated file, when a job makes more than one. |
results[].url | URL | URL. |
results[].mimeType | string | File type. |
results[].sizeBytes | u64 string | File size, bytes. |
paymentMode (optional) | string | credits when the job spends the credit account, x402 when it was paid per request. |
settlementStatus (optional) | string | pending, settled, not_charged (a failed credit-funded job) or refund_review (a failed paid job whose payment is held for a refund). |
refundRequired (optional) | boolean | True when a paid x402 job failed after its payment landed. |
receipt | object or null | The receipt of the job's settlement, once it lands. |
receipt.signature | A | Transaction signature. |
receipt.lineIndex | integer | Position of the line in its transaction, from 0. |
receipt.occurredAt | UTC timestamp | When it landed. |
receipt.kind | string | image, video, voice or asset3d. |
receipt.jobId | string or null | The rental or generation it charges, or null for a deposit. |
receipt.label | string | Name shown for it. |
receipt.units | u64 string | How many of unit. |
receipt.unitsDisplay | decimal string | units as a decimal for display. |
receipt.unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
receipt.creditsBaseUnits | base units | Credits, base units. |
receipt.usdcBackedBaseUnits | base units | USDC-backed part, base units. |
receipt.shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
receipt.rateBaseUnitsPerSecond (optional) | u64 string above 0 | Price per second, base units. |
receipt.refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
receipt.channelId (optional) | A | The payment channel account. |
receipt.channelPosition (optional) | integer | For an x402 rental close, which channel of the rental this is, from 1. |
receipt.channelCount (optional) | integer | For an x402 rental close, how many channels the rental had. |
receipt.unmetered (optional) | boolean | True when the rental had no meter key, so its seconds came from the server meter. |
receipt.meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
receipt.minute (optional) | integer | Minute index. |
receipt.signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
receipt.digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
receipt.ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
receipt.wallet | A | The wallet. |
receipt.agentKey | object or null | The agent key involved, or null for the wallet itself. |
receipt.agentKey.address | A | Address. |
receipt.agentKey.label | string | Name shown for it. |
receipt.explorerUrl | URL | The transaction on the block explorer. |
failure | string or null | Why it failed, or null. |
#CreditBalance
| Field | Type | Meaning |
|---|---|---|
totalBaseUnits | base units | All credits, base units. |
usdcBackedBaseUnits | base units | USDC-backed part, base units. |
shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
usdValue | decimal string | Value in dollars. |
#WalletHoldings
| Field | Type | Meaning |
|---|---|---|
wallet | A | The wallet. |
holdings | array of object | Supported assets the wallet holds. |
holdings[].asset | object | The payment asset. |
holdings[].asset.mint | A or null | Mint address, or null before it exists. |
holdings[].asset.symbol | string | Ticker. |
holdings[].asset.name | string | Name. |
holdings[].asset.decimals | integer | Decimals of the mint. |
holdings[].asset.tokenProgram | A or null | Token program of the USDC mint. |
holdings[].asset.depositMethod | string | direct for USDC, jupiter for a swap to USDC, attested for SHDR. |
holdings[].asset.enabled | boolean | Whether it can be deposited now. |
holdings[].asset.native (optional) | boolean | True for SOL, which is wrapped only for its swap. |
holdings[].amountBaseUnits | base units | Amount in the asset's atoms. |
holdings[].usdValue | decimal string | Value in dollars. |
holdings[].amountDisplay (optional) | decimal string | The amount as a decimal. |
holdings[].uiMultiplier (optional) | decimal string | The mint's Token-2022 display multiplier, if any. |
holdings[].usdValueAvailable (optional) | boolean | Whether a dollar value could be read. |
holdings[].totalAmountBaseUnits (optional) | base units | All the wallet holds of the asset, atoms. |
holdings[].reservedBaseUnits (optional) | base units | Atoms kept back, such as the SOL left for fees. |
asOf | UTC timestamp | When the data was read. |
#DepositQuoteRequest
| Field | Type | Meaning |
|---|---|---|
assetMint | A | Mint of the asset to deposit. |
amountBaseUnits | u64 string above 0 | Amount in the asset's atoms. |
#DepositQuote
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
asset | object | The payment asset. |
asset.mint | A or null | Mint address, or null before it exists. |
asset.symbol | string | Ticker. |
asset.name | string | Name. |
asset.decimals | integer | Decimals of the mint. |
asset.tokenProgram | A or null | Token program of the USDC mint. |
asset.depositMethod | string | direct for USDC, jupiter for a swap to USDC, attested for SHDR. |
asset.enabled | boolean | Whether it can be deposited now. |
asset.native (optional) | boolean | True for SOL, which is wrapped only for its swap. |
amountBaseUnits | u64 string above 0 | Amount in the asset's atoms. |
creditsBaseUnits | u64 string above 0 | Credits the deposit will add, base units. |
routeSummary | string | How the asset becomes USDC, in words. |
expiresAt | UTC timestamp | When it expires. |
requiresPriceSigner | boolean | True for SHDR: the server co-signs the deposit after the wallet. |
#BuildDepositRequest
| Field | Type | Meaning |
|---|---|---|
quoteId | string | Quote to launch from. |
#BuiltTransaction
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
transactionBase64 | X402UptoSettlementResponseHeader | The unsigned v0 transaction, base64. |
blockhash | string | Blockhash the transaction was built on. |
lastValidBlockHeight | integer | Block height after which the transaction can no longer land. |
cosigned | boolean | Whether the server already added its own signature (the price signer, on a SHDR deposit). |
#SubmitTransactionRequest
When mode is "relay":
| Field | Type | Meaning |
|---|---|---|
mode | "relay" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
buildId | string | Id of the BuiltTransaction. |
signedTransactionBase64 | X402UptoSettlementResponseHeader | The wallet-signed transaction, base64. |
idempotencyKey | string | A key of your choice; repeating a request with the same key returns the first result instead of acting twice. |
When mode is "wallet-sent":
| Field | Type | Meaning |
|---|---|---|
mode | "wallet-sent" | relay to have the API send the signed transaction, wallet-sent when the wallet already sent it. |
buildId | string | Id of the BuiltTransaction. |
signature | A | Signature of the transaction the wallet sent. |
idempotencyKey | string | A key of your choice; repeating a request with the same key returns the first result instead of acting twice. |
#TransactionStatus
| Field | Type | Meaning |
|---|---|---|
id | string | Identifier. |
status | string | submitted, unconfirmed, confirmed, finalized, failed or expired. |
signature (optional) | A | Transaction signature. |
error (optional) | object | Why the transaction failed, with the stage it failed at. |
error.stage | string | Where it failed: build, wallet, simulation, send or confirmation. |
error.message | string | A sentence to show a person. |
error.nextStep (optional) | string | What to do next. |
error.retryable | boolean | Whether trying again unchanged can succeed. |
error.program (optional) | object | The program that failed, with its error code and name. |
error.program.address | A | Address. |
error.program.code | integer or null | Program error code. |
error.program.name | string or null | Name. |
oneTimeAgentToken (optional) | string | The agent token, present once, on the confirmed create_agent_key transaction. Store it; it is never shown again. |
#ReceiptPage
| Field | Type | Meaning |
|---|---|---|
items | array of object | The page of results, newest first. |
items[].signature | A | Transaction signature. |
items[].lineIndex | integer | Position of the line in its transaction, from 0. |
items[].occurredAt | UTC timestamp | When it landed. |
items[].kind | string | Kind. |
items[].jobId | string or null | The rental or generation it charges, or null for a deposit. |
items[].label | string | Name shown for it. |
items[].units | u64 string | How many of unit. |
items[].unitsDisplay | decimal string | units as a decimal for display. |
items[].unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
items[].creditsBaseUnits | base units | Credits, base units. |
items[].usdcBackedBaseUnits | base units | USDC-backed part, base units. |
items[].shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
items[].rateBaseUnitsPerSecond (optional) | u64 string above 0 | Price per second, base units. |
items[].refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
items[].channelId (optional) | A | The payment channel account. |
items[].channelPosition (optional) | integer | For an x402 rental close, which channel of the rental this is, from 1. |
items[].channelCount (optional) | integer | For an x402 rental close, how many channels the rental had. |
items[].unmetered (optional) | boolean | True when the rental had no meter key, so its seconds came from the server meter. |
items[].meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
items[].minute (optional) | integer | Minute index. |
items[].signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
items[].digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
items[].ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
items[].wallet | A | The wallet. |
items[].agentKey | object or null | The agent key involved, or null for the wallet itself. |
items[].agentKey.address | A | Address. |
items[].agentKey.label | string | Name shown for it. |
items[].explorerUrl | URL | The transaction on the block explorer. |
page | object | Paging: nextCursor and hasMore. |
page.nextCursor | string or null | Cursor for the next page, or null. |
page.hasMore | boolean | Whether more pages follow. |
asOf | UTC timestamp | When the data was read. |
#ReceiptQuery
The query of GET /receipts and GET /receipts/public.
| Field | Type | Meaning |
|---|---|---|
cursor (optional) | cursor | Opaque cursor from page.nextCursor. |
limit | integer | Page size, 1 to 100. |
agentKey (optional) | A | The agent key involved, or null for the wallet itself. |
kind (optional) | one of "deposit", "rental_settle", "generation", "x402" | Kind. |
#ReceiptDetail
| Field | Type | Meaning |
|---|---|---|
signature | A | Transaction signature. |
wallet | A | The wallet. |
slot | u64 string | Slot the transaction landed in. |
blockTime | UTC timestamp | Block time of the transaction. |
explorerUrl | URL | The transaction on the block explorer. |
lines | array of object | One entry per settlement line, in lineIndex order. |
lines[].lineIndex | integer | Position of the line in its transaction, from 0. |
lines[].kind | string | Kind. |
lines[].jobId | string or null | The rental or generation it charges, or null for a deposit. |
lines[].label | string | Name shown for it. |
lines[].units | u64 string | How many of unit. |
lines[].unitsDisplay | decimal string | units as a decimal for display. |
lines[].unit | string | What units counts: seconds, images, output seconds, characters, assets, or the deposit asset. |
lines[].creditsBaseUnits | base units | Credits, base units. |
lines[].usdcBackedBaseUnits | base units | USDC-backed part, base units. |
lines[].shdrBackedBaseUnits | base units | SHDR-backed part, base units. |
lines[].rateBaseUnitsPerSecond (optional) | u64 string above 0 | Price per second, base units. |
lines[].refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
lines[].channelId (optional) | A | The payment channel account. |
lines[].channelPosition (optional) | integer | For an x402 rental close, which channel of the rental this is, from 1. |
lines[].channelCount (optional) | integer | For an x402 rental close, how many channels the rental had. |
lines[].unmetered (optional) | boolean | True when the rental had no meter key, so its seconds came from the server meter. |
lines[].meterKey (optional) | A | The meter agent's public key for this rental, base58, the same as /etc/shader/meter.pub inside the machine; null until the agent registers. |
lines[].minute (optional) | integer | Minute index. |
lines[].signedCount (optional) | integer | For a metered rental line, the signed seconds in its sealed minute. |
lines[].digest (optional) | string | SHA-256 of the minute digest message, lowercase hex, or null while the minute is open. |
lines[].ticksUrl (optional) | URL | For a metered rental line, the public ticks of its minute. |
lines[].agentKey | object or null | The agent key involved, or null for the wallet itself. |
lines[].agentKey.address | A | Address. |
lines[].agentKey.label | string | Name shown for it. |
rawEvent | any JSON | The decoded program event, as indexed. |
#AgentList
| Field | Type | Meaning |
|---|---|---|
agents | array of object | The caller's agent keys. |
agents[].address | A | Address. |
agents[].label | string | Name shown for it. |
agents[].perRequestCapBaseUnits | u64 string above 0 | Per-request cap, base units. |
agents[].perDayCapBaseUnits | u64 string above 0 | Per-day cap, base units. |
agents[].spentTodayBaseUnits | base units | Credits charged to the key in the current UTC day, base units. |
agents[].dayWindowStartedAt | UTC timestamp | Start of the key's current UTC day. |
agents[].revoked | boolean | Whether the key is revoked. |
integration | object | What an agent needs to connect: the MCP endpoint and config, the x402 routes, the skill and CLI install lines. |
integration.mcpEndpoint | URL | The MCP server URL. |
integration.mcpConfigSnippet | string | A client configuration with a placeholder token. |
integration.x402Endpoints | array of object | The x402 routes with their price rules. |
integration.x402Endpoints[].path | string | Route path. |
integration.x402Endpoints[].kind | string | Kind. |
integration.x402Endpoints[].pricingRule | string | The price rule in words. |
integration.skillInstallCommand | string | How to install the coding-agent skill. |
integration.cliInstallCommand | string | How to install the CLI. |
integration.x402CliRentCommand (optional) | string | The CLI command that rents over x402 from a wallet. |
integration.x402McpConfigSnippet (optional) | string | An MCP client configuration with no token, for the x402 tools. |
#CreateAgentKeyRequest
| Field | Type | Meaning |
|---|---|---|
label | string | Name shown for it. |
perRequestCapBaseUnits | u64 string above 0 | Per-request cap, base units. |
perDayCapBaseUnits | u64 string above 0 | Per-day cap, base units. |
#BuildAgentKeyResponse
| Field | Type | Meaning |
|---|---|---|
agentKey | object | The key as it will exist once the transaction confirms. |
agentKey.address | A | Address. |
agentKey.label | string | Name shown for it. |
agentKey.perRequestCapBaseUnits | u64 string above 0 | Per-request cap, base units. |
agentKey.perDayCapBaseUnits | u64 string above 0 | Per-day cap, base units. |
agentKey.spentTodayBaseUnits | base units | Credits charged to the key in the current UTC day, base units. |
agentKey.dayWindowStartedAt | UTC timestamp | Start of the key's current UTC day. |
agentKey.revoked | boolean | Whether the key is revoked. |
build | BuiltTransaction | The transaction to sign. |
#UpdateAgentKeyRequest
| Field | Type | Meaning |
|---|---|---|
perRequestCapBaseUnits (optional) | u64 string above 0 | Per-request cap, base units. |
perDayCapBaseUnits (optional) | u64 string above 0 | Per-day cap, base units. |
#BuildAgentKeyActionResponse
| Field | Type | Meaning |
|---|---|---|
build | BuiltTransaction | The transaction to sign. |
#EarnSummary
| Field | Type | Meaning |
|---|---|---|
tokenLive | boolean | False until the SHDR mint exists; Earn actions wait for it. |
shdrMint | A or null | SHDR mint, or null before launch. |
nvdaxMint | A | NVDAx mint. |
stakeBaseUnits | base units | SHDR staked, atoms. |
nvdaxAccruedBaseUnits | base units | NVDAx accrued by the stake, atoms. |
nvdaxClaimableBaseUnits | base units | NVDAx claimable now, atoms. |
nextDropAt | UTC timestamp | When the next hourly NVDAx drop lands. |
pool | object | Pool totals. |
pool.totalStakedBaseUnits | base units | SHDR staked in the pool, atoms. |
pool.nvdaxDistributedBaseUnits | base units | NVDAx added to the pool so far, atoms. |
pool.shdrBurnedBaseUnits | base units | SHDR burned so far, atoms. |
pool.shdrBurnedLastHourBaseUnits | base units | SHDR burned in the last hour, atoms. |
pool.nvdaxTotalFundedBaseUnits (optional) | base units | NVDAx ever funded into the pool, atoms. |
pool.nvdaxUndistributedBaseUnits (optional) | base units | NVDAx waiting to be shared out, atoms. |
pool.nvdaxTotalClaimedBaseUnits (optional) | base units | NVDAx this wallet has claimed so far, atoms. |
pool.nvdaxTotalFundedDisplay (optional) | decimal string | nvdaxTotalFundedBaseUnits as a decimal. |
state (optional) | string | token-not-live, no-shdr, ready, staked or claimable. |
nvdaxPendingBaseUnits (optional) | base units | NVDAx accrued and not yet claimed, atoms. |
nvdaxTotalClaimedBaseUnits (optional) | base units | NVDAx this wallet has claimed so far, atoms. |
nvdaxPendingDisplay (optional) | decimal string | nvdaxPendingBaseUnits as a decimal amount. |
nvdaxAccruedDisplay (optional) | decimal string | nvdaxAccruedBaseUnits as a decimal amount. |
nvdaxClaimableDisplay (optional) | decimal string | nvdaxClaimableBaseUnits as a decimal amount. |
nvdaxTotalClaimedDisplay (optional) | decimal string | nvdaxTotalClaimedBaseUnits as a decimal amount. |
nvdaxUiMultiplier (optional) | decimal string | NVDAx's Token-2022 display multiplier, applied to the display amounts. |
nvdaxDecimals (optional) | integer | Decimals of the NVDAx mint. |
stakeDisplay (optional) | decimal string | stakeBaseUnits as a decimal SHDR amount. |
#StakeRequest
| Field | Type | Meaning |
|---|---|---|
amountBaseUnits | u64 string above 0 | Amount in the asset's atoms. |
#UnstakeRequest
| Field | Type | Meaning |
|---|---|---|
amountBaseUnits | u64 string above 0 | Amount in the asset's atoms. |
#ClaimRequest
#EarnBuildResponse
| Field | Type | Meaning |
|---|---|---|
build | BuiltTransaction | The transaction to sign. |
#PaymentRequired
| Field | Type | Meaning |
|---|---|---|
x402Version | 2 | x402 protocol version: 2. |
error (optional) | string | Why payment is required. |
resource | object | The resource being paid for. |
resource.url | URL | URL. |
resource.description (optional) | string | What the resource is. |
resource.mimeType (optional) | string | File type. |
resource.serviceName (optional) | string | Service name. |
resource.tags (optional) | array of string | Tags. |
resource.iconUrl (optional) | URL | Icon URL. |
accepts | array of object | Ways the resource can be paid for, one requirement each. |
accepts[].scheme | string | x402 scheme: exact for generation, upto for rentals. |
accepts[].network | string | CAIP-2 network id of the chain. |
accepts[].amount | u64 string above 0 | Atoms to pay; for upto, the ceiling. |
accepts[].asset | A | The payment asset. |
accepts[].payTo | A | Owner of the treasury token account. |
accepts[].maxTimeoutSeconds | integer | Seconds the payment stays valid. |
accepts[].extra (optional) | object (free form) | Scheme details, such as the fee payer. |
extensions (optional) | object (free form) | x402 extensions; empty. |
#PaymentPayload
| Field | Type | Meaning |
|---|---|---|
x402Version | 2 | x402 protocol version: 2. |
resource (optional) | object | The resource being paid for. |
resource.url | URL | URL. |
resource.description (optional) | string | What the resource is. |
resource.mimeType (optional) | string | File type. |
resource.serviceName (optional) | string | Service name. |
resource.tags (optional) | array of string | Tags. |
resource.iconUrl (optional) | URL | Icon URL. |
accepted | object | Ticks accepted from the batch. |
accepted.scheme | string | x402 scheme: exact for generation, upto for rentals. |
accepted.network | string | CAIP-2 network id of the chain. |
accepted.amount | u64 string above 0 | Atoms to pay; for upto, the ceiling. |
accepted.asset | A | The payment asset. |
accepted.payTo | A | Owner of the treasury token account. |
accepted.maxTimeoutSeconds | integer | Seconds the payment stays valid. |
accepted.extra (optional) | object (free form) | Scheme details, such as the fee payer. |
payload | any JSON | The signed payment, for the chosen scheme. |
extensions (optional) | object (free form) | x402 extensions; empty. |
#PaymentResponse
| Field | Type | Meaning |
|---|---|---|
success | boolean | Whether the payment settled. |
transaction (optional) | string | Signature of the settlement transaction. |
network (optional) | string | CAIP-2 network id of the chain. |
payer (optional) | A | Wallet that paid. |
#PaymentRequiredHeader
The PAYMENT-REQUIRED header: a base64 JSON PaymentRequired.
#PaymentSignatureHeader
The PAYMENT-SIGNATURE header: a base64 JSON PaymentPayload.
#PaymentResponseHeader
The PAYMENT-RESPONSE header: a base64 JSON PaymentResponse.
#X402GenerationResponse
| Field | Type | Meaning |
|---|---|---|
job | Job | The generation job. |
#X402RentRequest
| Field | Type | Meaning |
|---|---|---|
maxSeconds (optional) | integer | Longest the rental may run, in seconds. Defaults to 3600 and is capped at agentRentalMaxSeconds. |
sshPublicKey (optional) | string | Your SSH public key. Without one, a password is generated and shown only to you. |
#X402RentExtendRequest
| Field | Type | Meaning |
|---|---|---|
maxSeconds (optional) | integer | Longest the rental may run, in seconds. Defaults to 3600 and is capped at agentRentalMaxSeconds. |
#X402RentalExtensionResponse
| Field | Type | Meaning |
|---|---|---|
instance | InstanceDetail | The instance after the stop request. |
#InstanceX402Channel
| Field | Type | Meaning |
|---|---|---|
channelId | A | The payment channel account. |
ceilingBaseUnits | u64 string above 0 | The escrowed ceiling, USDC atoms. |
maxSeconds | integer | Longest the rental may run, in seconds. Defaults to 3600 and is capped at agentRentalMaxSeconds. |
openSignature | A | Signature of the channel open transaction. |
explorerUrl | URL | The transaction on the block explorer. |
chargedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms charged when the channel closed. |
refundedBaseUnits (optional) | base units | For an x402 rental, the USDC atoms returned to the payer when the channel closed. |
sealSignature (optional) | A | Signature of the settle_and_seal transaction. |
distributeSignature (optional) | A | Signature of the distribute transaction. |
closedAt (optional) | UTC timestamp | When the channel closed. |
position | integer | Order of the channel in the rental, from 1. |
secondsRun | u64 string | Seconds charged against this channel. |
state | one of "open", "in_use", "closed" | open (not used yet), in_use or closed. |
#X402UptoExtra
| Field | Type | Meaning |
|---|---|---|
feePayer | A | The sponsor that pays the transaction fee. |
receiverAuthorizer | A | The key that will sign the settlement voucher for the seconds used. |
withdrawDelay | integer | Seconds before the payer can withdraw an unsettled channel; equal to maxTimeoutSeconds. |
tokenProgram | A | Token program of the USDC mint. |
memo (optional) | string | The quote id. The signed open transaction must carry exactly one Memo instruction with this value. |
#X402UptoRequirements
| Field | Type | Meaning |
|---|---|---|
scheme | "upto" | "upto": the payer escrows a ceiling and is charged the seconds used. |
network | string | CAIP-2 network id of the chain. |
amount | u64 string above 0 | The ceiling in USDC atoms: the GPU's rate in base units per second times maxSeconds. |
asset | A | The payment asset. |
payTo | A | Owner of the treasury token account, the same as for generation. |
maxTimeoutSeconds | integer | maxSeconds plus 300 seconds. |
extra | X402UptoExtra | The fee payer, the receiver authorizer, the withdraw delay and the token program. |
#X402UptoPayload
| Field | Type | Meaning |
|---|---|---|
from | A | The paying wallet. |
maxAmount | u64 string above 0 | The ceiling the payer authorizes, USDC atoms; equal to the requirement's amount. |
expiresAt | integer | Unix time the authorization expires. |
validAfter | integer | Unix time the authorization becomes valid. |
nonce | u64 string | A number the payer chooses so each channel is new. |
openSlot | integer | The slot the open transaction was built at. |
channelId | A | The payment channel account. |
deposit | u64 string above 0 | USDC atoms the open escrows; equal to the ceiling. |
authorizedSigner | A | The key allowed to sign the payer's side of the channel. |
openTransaction | base64 | The payer-signed open transaction, base64. The server adds the fee payer's signature. |
#X402RentalPaymentPayload
| Field | Type | Meaning |
|---|---|---|
x402Version | 2 | x402 protocol version: 2. |
resource (optional) | object | The resource being paid for. |
resource.url | URL | URL. |
resource.description (optional) | string | What the resource is. |
resource.mimeType (optional) | string | File type. |
resource.serviceName (optional) | string | Service name. |
resource.tags (optional) | array of string | Tags. |
resource.iconUrl (optional) | URL | Icon URL. |
accepted | X402UptoRequirements | Ticks accepted from the batch. |
payload | X402UptoPayload | The signed payment, for the chosen scheme. |
extensions (optional) | object (free form) | x402 extensions; empty. |
#X402RentalPaymentRequired
| Field | Type | Meaning |
|---|---|---|
x402Version | 2 | x402 protocol version: 2. |
error (optional) | string | Why payment is required. |
resource | object | The resource being paid for. |
resource.url | URL | URL. |
resource.description (optional) | string | What the resource is. |
resource.mimeType (optional) | string | File type. |
resource.serviceName (optional) | string | Service name. |
resource.tags (optional) | array of string | Tags. |
resource.iconUrl (optional) | URL | Icon URL. |
accepts | array of unknown | Ways the resource can be paid for, one requirement each. |
extensions (optional) | object (free form) | x402 extensions; empty. |
#X402RentalResponse
| Field | Type | Meaning |
|---|---|---|
instance | InstanceDetail | The instance after the stop request. |
stopToken | string | Token to stop this rental, shdrstop_…, shown once. |
lockedRateBaseUnitsPerSecond (optional) | u64 string above 0 | The rate locked for this rental, base units per second. |
#X402UptoSettlementResponse
| Field | Type | Meaning |
|---|---|---|
success | boolean | Whether the payment settled. |
errorReason (optional) | string | Why a settlement failed, in x402 terms. |
payer (optional) | A | Wallet that paid. |
transaction | A | Signature of the settlement transaction. |
network | string | CAIP-2 network id of the chain. |
amount | base units | Atoms charged by this response: "0" when the channel opens, since charging comes at stop. |
#X402UptoSettlementResponseHeader
base64.