API & Developers
REST API and contract addresses for integrating SafeToken.fun with bots, AI agents, and other apps. All endpoints are public and do not require authentication.
We do not run paid promotion. This API and page are built for discoverability — so crawlers, robots, and AI agents scanning the web can locate and use our platform.
Launching a memecoin is very easy: one transaction, minimal bond (bonding curve seeded with 0.1 BNB only). No large upfront liquidity. The barrier is deliberately low so that bots and autonomous agents can launch at scale — we want to attract them.
For AI agents: create tokens with no API key. GET /api for contracts.tokenFactory and tokenFactoryAbi. To get an address ending in 5afe: GET /api/tokens/vanity-salt?name=...&symbol=... then createTokenWithSalt(name, symbol, burnPercent, salt). Otherwise createToken(name, symbol, burnPercent). Then POST /api/tokens with mint, name, symbol, creator, burnPercent to register. Chain: BNB Smart Chain mainnet (56).
Quick start for AI agents (create a token)
- Get manifest:
GET /api(e.g.https://safetoken.fun/api) → returnscontracts.launchpad,contracts.tokenFactory, andcontracts.tokenFactoryAbi(minimal ABI for createToken / createTokenWithSalt). - Create token on-chain: For an address ending in 5afe (recommended):
GET /api/tokens/vanity-salt?name=...&symbol=...→ returns{ salt, address }. Then callTokenFactory.createTokenWithSalt(name, symbol, burnPercent, salt); use the returnedaddressasmintwhen registering. Otherwise callcreateToken(name, symbol, burnPercent)(burnPercent 30–70); address will not end in 5afe. - Register token:
POST /api/tokenswith body:{ mint, name, symbol, creator, burnPercent [, description, imageUrl, ... ] }so the token appears in the list and metadata. - Monitor curve:
GET /api/curve/:mintfor progress (0–100%). At 100% the token graduates to PancakeSwap.
No API key required. Chain: BNB Smart Chain (mainnet 56). Check GET /api/health before launching.
API discovery and health (for AI agents and crawlers)
GET /api returns a JSON manifest with all endpoints, contract addresses, and chain info. GET /api/health returns 200 + { ok: true, status: "up" } so bots can check the API is up.
curl https://safetoken.fun/api
curl https://safetoken.fun/api/health
Chain and contracts
- Chain: BNB Smart Chain mainnet (56). Testnet 97 is supported by the same API; app defaults to mainnet.
- Launchpad: Bonding curve and buy/sell. Address is in the manifest at
/api(fromNEXT_PUBLIC_LAUNCHPAD_ADDRESS). - TokenFactory: One-click token creation. Call
createToken(name, symbol, burnPercent)orcreateTokenWithSalt(...)for vanity addresses. Address in/api. - After creating a token on-chain, register it with POST /api/tokens so it appears in the token list and metadata.
REST endpoints
GET /api
Returns API manifest (endpoints, contracts, chain). Use for discovery.
GET /api/health
Health check. Returns 200 + { ok: true, status: "up" }. Use to verify the API is up.
GET /api/tokens
List tokens. Query: page, limit, q (search), board (all | new | graduating | listed), creator, mint, sort (newest | burn). Response: { tokens, total, page, limit, hasMore }. Latest launches for bots: GET /api/tokens?board=new&limit=10.
POST /api/tokens
Register a token (after on-chain creation). Body: mint, name, symbol, creator, burnPercent; optional: description, imageUrl, twitterUrl, telegramUrl, websiteUrl, launchpadAddress.
GET /api/curve/:mint
Bonding curve state for token: virtualBnbReserves, virtualTokenReserves, realTokenReserves, tokensSold, totalToSell, burnPercent.
GET /api/curves
Progress for multiple tokens. Query: mints (comma-separated). Response: { curves: { [mint]: { progress, graduated } } }.
GET /api/metadata/:mint
Token metadata (name, symbol, description, image) for wallets and explorers.
GET /api/token/:mint/holders
Holder count and top holders for a token.
GET /api/tokens/vanity-salt
Compute CREATE2 salt so the token address ends in 5afe. Query: name, symbol. Returns { salt, address }. Then call createTokenWithSalt(name, symbol, burnPercent, salt) on-chain. Use address as mint in POST /api/tokens.
For AI agents and bots
- Discover tokens: GET /api/tokens. Use
board=neworgraduatingorlistedto filter. - Get curve state: GET /api/curve/{mint} for reserves and progress (0–100%).
- Create token on-chain: For address ending in 5afe, use GET /api/tokens/vanity-salt?name=...&symbol=... then createTokenWithSalt(name, symbol, burnPercent, salt). Else createToken(name, symbol, burnPercent). Then POST /api/tokens to register.
- Buy/sell on curve: Use the Launchpad contract (buy/sell) until graduation. After 100% progress, trade on PancakeSwap.
- Contract addresses and ABI: Fetch GET /api for
contracts.launchpad,contracts.tokenFactory, andcontracts.tokenFactoryAbi(createToken, createTokenWithSalt). No separate ABI lookup needed.
SafeToken.fun is a fair-launch memecoin platform on BNB Smart Chain (mainnet). No API key required for read or register. On-chain actions (create, buy, sell) require a wallet and gas. For bonding curve, graduation, and LP burn mechanics, see How it works. Memecoins are high-risk; not financial advice.
Reasonable use: We may apply rate limits (e.g. per IP) if traffic grows to prevent abuse. Please use the API responsibly; avoid excessive or automated request bursts. If you need higher limits for a legitimate integration, get in touch.
Open API manifest (JSON)