Solana Mainnet

Build on Memora

Any agent that can make an HTTP request and sign a Solana transaction can buy from Memora. The settings shown here come live from this server.

Paid retrieval

Sign each payment once. If a response says it is still settling, ask again with no payment header, and the content arrives when the transaction finalizes.

# 0. Sign in: sign the exact message with ed25519, no transaction
POST /api/auth/challenge      { "wallet": "<payer>" }
POST /api/auth/verify         { "wallet": "<payer>", "signature": "<base64>" }
# Keep the Set-Cookie value and send it with every request below.

# 1. Ask for the content. Existing access returns 200.
GET  /api/memories/{id}/content
→ 402  PAYMENT-REQUIRED: <base64 JSON>
       scheme exact · network <chain>
       asset <mint>
       amount <atomic> · payTo <contributor> · extra.memo memora:{id}

# 2. Sign one transaction: your wallet pays the fee and is the only signer.
#    Allowed: compute budget, an idempotent USDC account for payTo,
#    one TransferChecked of the exact amount, and one memo of extra.memo.
GET  /api/memories/{id}/content
     PAYMENT-SIGNATURE: <base64 of {"x402Version":2,"scheme":"exact","network":"...","payload":{"transaction":"<base64>"}}>
→ 200  { memoryId, title, content, contentHash, receiptId, transactionSignature }
→ 202  { status: "pending", receiptId }   # request again WITHOUT a payment

Live configuration

RPC: checkingStorage: checkingPayments: checkingRegistration: checkingAsk AI: checking

The limits of this API

A receipt tells you a payment settled and access was granted, not whether a model used the text well or answered correctly. Nothing here stops a buyer from reselling what they read. Memora deploys no contract of its own: each asset lives in Metaplex Core and holds the owner and the content hash.

Endpoints

GET/api/statusPublic

Which network, program and mint this deployment uses, and whether anything is blocking it.

POST/api/auth/challengePublic

Body { wallet }. Returns a plain text message to sign with ed25519.

POST/api/auth/verifyPublic

Body { wallet, signature } (base64). Sets a session cookie.

GET/api/sessionCookie

Returns { wallet } or { wallet: null }. DELETE signs out.

GET/api/memories/pagePublic / session

Cursor pages of { items, nextCursor, hasMore }. Query q, category, mine, status, cursor, limit (1-50, default 25). Draft status requires mine=true.

GET/api/memories/:idPublic

Metadata: contributor, contentHash, priceUsdc, priceAtomic, assetAddress, registrationSignature. Drafts are visible only to their owner.

POST/api/memoriesSession

Create a draft: { title, summary, category, content, priceUsdc }. PATCH and DELETE on :id for your unfrozen drafts.

POST/api/memories/:id/registration/prepareOwner

Freeze a draft and publish its metadata before signing. Frozen memories cannot be edited or deleted.

GET/api/memories/:id/registrationOwner

The Metaplex Core plan: name, uri, attributes. POST { assetAddress, signature } confirms after the server reads the asset from the chain.

GET/api/memories/:id/contentSession + x402

Free for the owner and for wallets with prior paid access. Otherwise 402 with x402 V2 exact requirements. 202 while a payment settles.

PATCH/api/memories/:id/agent-permissionOwner

Body { agentEnabled }. Lets the owner allow or stop Ask AI use. Runs already quoted are unaffected.

GET/api/receipts/pageSession

Query view=all|earned|spent, cursor, limit. Returns { items, nextCursor, hasMore, hasPending }.

POST/api/receipts/:id/reconcileSession

Asks the chain what happened to a payment. Send {} to re-check, or { transactionSignature } to find an older one. It only reads, so it cannot charge you.

GET/api/overviewSession

Totals: drafts, published, paidRetrievals, earnedUsdc, spentUsdc.

GET/api/agent/statusPublic

Agent readiness, model and ranking method.

POST/api/agent/runsSession

Body { question, maxBudgetUsdc, requestKey }. Returns a quoted run. Reuse requestKey when a response is uncertain. GET lists your runs.

POST/api/agent/runs/:id/approveSession

Body { expectedTotalAtomic, allowAiProcessing: true }. Signs nothing and moves no funds.

GET/api/agent/runs/:id/items/:itemId/contentSession + x402

Retrieve one approved item. Each item is paid at most once.

POST/api/agent/runs/:id/generateSession

After every item is retrieved, generate the cited answer. Retrying never pays for knowledge again.

POST/api/agent/runs/:id/cancelSession

Ends the run. USDC that has already settled stays with the contributor.