Docs

Launch tokens programmatically.

Base path /api/launch. Same economics as the Launchpad UI — ANSEM-paired reward coins with a Token-2022 transfer tax and permanently locked DAMM v2 liquidity.

Non-custodial by construction. We never ask for, accept, or store a private key. You sign the 0.2 SOL launch fee locally. There is no endpoint that signs on your behalf.

Quickstart

No API keys and nothing to sign up for. When Launch is enabled on a host, every public endpoint below is open. Authorisation for a launch is your own signature on the fee payment — stronger than any key we could issue.

bash
# Fee quote + economics
curl https://thecollectivesol.com/api/launch/prepare

# Board catalog
curl https://thecollectivesol.com/api/launch/list
node — prepare → pay → submit
import {
  Connection,
  Keypair,
  SystemProgram,
  Transaction,
  PublicKey,
  LAMPORTS_PER_SOL,
} from "@solana/web3.js";
import fs from "node:fs";

const ORIGIN = "https://thecollectivesol.com";
const creator = Keypair.fromSecretKey(
  Uint8Array.from(JSON.parse(fs.readFileSync("creator.json", "utf8"))),
);
const connection = new Connection(process.env.SOLANA_RPC_URL!, "confirmed");

const call = async (path, init) => {
  const response = await fetch(ORIGIN + path, init);
  const body = await response.json();
  if (!response.ok) throw new Error(body.error ?? response.statusText);
  return body;
};

// 1. Fee quote + economics
const prepared = await call("/api/launch/prepare");

// 2. Upload logo (PNG/JPEG/WebP, ≤512KB) → data URL
const form = new FormData();
form.append("file", new Blob([fs.readFileSync("logo.png")], { type: "image/png" }), "logo.png");
const { url: imageUrl } = await call("/api/launch/upload", { method: "POST", body: form });

// 3. Pay the launch fee yourself. Your key never leaves this process.
const tx = new Transaction().add(
  SystemProgram.transfer({
    fromPubkey: creator.publicKey,
    toPubkey: new PublicKey(prepared.feeReceiver),
    lamports: Number(prepared.launchFeeLamports),
  }),
);
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash();
tx.recentBlockhash = blockhash;
tx.feePayer = creator.publicKey;
tx.sign(creator);
const paymentSignature = await connection.sendRawTransaction(tx.serialize());
await connection.confirmTransaction({ signature: paymentSignature, blockhash, lastValidBlockHeight });

// 4. Submit. Server mints Token-2022 + seeds a permanently locked DAMM v2 ANSEM pool.
//    Re-submit the same paymentSignature if the HTTP call times out — never pay twice.
const result = await call("/api/launch/submit", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    paymentSignature,
    creator: creator.publicKey.toBase58(),
    name: "My Token",
    symbol: "MYTKN",
    imageUrl, // must be the same data URL from step 2
    // optional: twitter, telegram, website
  }),
});

console.log("Live mint:", result.launch.mint);
console.log("Fee paid (SOL):", 0.2);

Economics

Every launch is a reward coin paired against ANSEM. There is no creator trading-fee seat — holder rewards are automatic.

Quote mint9cRCn9rGT8V2imeM2BaKs13yhMEais3ruM3rPvTGpump
Supply1,000,000,000 (6 decimals)
Launch fee0.2 SOL → 50% gas reserve, 50% treasury
Token tax4% Token-2022 transfer tax on every transfer
Pool LP fee0.25% DAMM v2 → 100% treasury (not holders)
Ops skim2.5% of tax proceeds → SOL for gas
Holder share85% of post-skim tax → holders in ANSEM
Treasury share15% of post-skim tax → treasury ANSEM
Initial LP4% tax live from mint init (Token-2022 cannot activate a fee change sooner than ~2 epochs). Seed over-sends so LP nets 100% of advertised supply; seed tax is burned. Mint + metadata + fee-config authorities revoked.
EngineToken-2022 TransferFee + Meteora DAMM v2
Min holder USD$20 for reward eligibility

Launch flow

  1. GET /api/launch/prepare — fee receiver, lamports, and live economics.
  2. POST /api/launch/upload — logo → data:image/…URL (PNG / JPEG / WebP, max 512 KB).
  3. Sign and send a System Program transfer of launchFeeLamports from the creator wallet to feeReceiver.
  4. POST /api/launch/submit with that paymentSignature. The server uploads permanent Irys metadata, mints the Token-2022 base, and seeds a one-sided permanently locked DAMM v2 pool against ANSEM.
Submit is idempotent on paymentSignature. If the HTTP call times out after your fee landed, call submit again with the same signature — never pay twice. A second payment creates a second token.

Creators need only the launch fee in SOL. Ops wallets cover mint rent, metadata upload, and pool creation. Buyers trade against ANSEM on the pool.

Endpoints

All public launch routes require Launch to be live on that host (NEXT_PUBLIC_LAUNCH_LIVE_ENABLED=true). Otherwise they return 404. Responses are Cache-Control: private, no-store.

GET/api/launch/prepare

Public fee quote for the create wizard and API clients.

Returns quoteMint, launchFeeSol, launchFeeLamports, feeReceiver, fee split, tax/pool bps, holder/treasury/ops shares, mode: "reward", engine: "damm_v2", and a human-readable economics object.

POST/api/launch/upload

Multipart field file. Returns { url } as a data URL for the wizard; permanent Irys upload happens on submit.

POST/api/launch/submit

JSON body:

{
  "paymentSignature": "<solana signature>",
  "creator": "<base58 wallet that paid>",
  "name": "My Token",          // ≤ 32 chars
  "symbol": "MYTKN",           // ≤ 10, uppercased server-side
  "imageUrl": "data:image/png;base64,...",
  "twitter": "optional",
  "telegram": "optional",
  "website": "optional"
}

Success includes launch, mint/create signatures, metadata URIs, fee split, and engine fields. Duplicate payment signatures return { ok, already: true, launch }. Allow up to ~120s for mint + pool creation.

GET/api/launch/list

Board catalog: launches[] with mint, symbol, name, creator, status, image, pool, timestamps, plus quote mint and launch fee. Market cap / volume are enriched client-side from DexScreener.

GET/api/launch/{mint}

Full launch row for a single mint.

GET/api/launch/{mint}/market

Holder snapshot (top 15), recent activity, DexScreener chart embed, and Jupiter swap / embed URLs for the token page.

GET/api/launch/cron/rewards

Operator-only. Requires Authorization: Bearer CRON_SECRET. Harvests transfer fees, claims pool fees, swaps tax to ANSEM, and pushes holder rewards. Not part of the public creator API.

Errors

Failures return JSON { error: string } (or a short message). Common cases:

HTTPMeaning
400Missing fields, bad image, underpaid fee, or invalid creator payment.
404Launch disabled on this host, or mint not found.
503Fee receiver / distributor secrets not configured.
500Unexpected server or chain error. Safe to retry submit with the same payment signature only.

Also available