Docs

A slow read about a fast thing.

Reference

API reference

The HTTP surface is small. Every state-changing route requires a signed-in session (the SIWS cookie). All bodies are JSON unless marked otherwise.

POST
/api/auth/nonceIssues a one-shot SIWS challenge value, valid for 5 minutes.
POST
/api/auth/verifyVerifies a signed SIWS message; sets the session cookie.
POST
/api/auth/logoutDestroys the current session.
GET
/api/auth/meReturns the current session's wallet address (or null).
POST
/api/uploadmultipart/form-data — pins an image to IPFS via Pinata. Returns { cid, uri, gateway }.
POST
/api/tokensPins metadata, grinds a vanity mint, and returns two partially-signed transactions for the wallet to finalize. Auth required.
GET
/api/tokens?stage=new|migrating|migratedDiscover feed — paginated list, ordered by newest.
GET
/api/tokens/[mint]Token detail — DB row plus best-effort live pool snapshot.
POST
/api/tokens/confirmCalled by the client after both create txs confirm; writes the Token row.
POST
/api/swapBuilds a quoted DBC swap transaction (buy or sell). Auth required.
GET
/api/claim?mint=…Returns the unclaimed creator-fee breakdown for a token. Creator-only.
POST
/api/claimBuilds a creator-fee-claim transaction. Creator-only.

Errors come back as { "error": "<code>" } with a stable error code. Common: unauthenticated, not_found, not_creator, bad_params.

i.imagination.so