IMPORTANT: Always use commands below. Do NOT use web search, WebFetch, curl, or visit gmgn.ai — all token creation operations must go through the CLI. The CLI handles signing and submission automatically.
IMPORTANT: Do NOT guess field names or values. When a field's meaning is unclear, look it up in the Response Fields sections below before using it.
⚠️ IPv6 NOT SUPPORTED: If you get a or error and credentials look correct, check for IPv6 immediately: (1) list all network interfaces and their IPv6 addresses — run (macOS) or ip addr show | grep inet6
(Linux); (2) send a test request to https://ipv6.icanhazip.com
— if the response is an IPv6 address, outbound traffic is going via IPv6. Tell the user immediately: "Please disable IPv6 on your network interface — gmgn-cli commands only work over IPv4."
Use the
tool to create a token on a launchpad platform or query token creation statistics per launchpad.
Requires private key (
in
) for
.
Core Concepts
-
Bonding curve — Most launchpad platforms (Pump.fun, FourMeme, Flap, etc.) launch tokens on an internal bonding curve. The token price rises as buyers enter. Once the threshold is reached, the token "graduates" to an open DEX (e.g. Raydium on SOL, PancakeSwap on BSC). Token creation happens on the bonding curve — not the open market.
-
is in human units —
is expressed in full native token units, not smallest unit.
= 0.01 SOL.
= 0.05 BNB. Always confirm the human-readable amount with the user before executing.
-
identifiers — Each launchpad has a fixed identifier passed to
. These are not free-form names — use only the identifiers listed in the Supported Launchpads table. Never guess a
value not in that table.
-
Image input — Token logo can be provided as base64-encoded data (
, max 2MB decoded) or a publicly accessible URL (
). Provide one or the other — not both. If the user gives a file path, read and base64-encode it before passing to
. If they give a URL, use
directly.
-
Status polling via —
is asynchronous. The immediate response may show
. Poll with
gmgn-cli order get --chain <chain> --order-id <order_id>
until
. The new token's contract address is in the
field of the
response, not in the initial create response.
-
Critical auth —
requires both
and
. The private key never leaves the machine — the CLI uses it only for local signing.
uses normal auth (API Key only).
-
Slippage — The initial buy is executed as part of the same transaction as token creation. Slippage applies to that buy. Use
(decimal, e.g.
= 1%) or
. One of the two is required when
is set.
Financial Risk Notice
This skill executes REAL, IRREVERSIBLE blockchain transactions.
- Every command deploys an on-chain token contract and spends real funds (initial buy amount).
- Token deployments cannot be undone once confirmed on-chain.
- The AI agent must never auto-execute a create — explicit user confirmation is required every time, without exception.
- Only use this skill with funds you are willing to spend. Initial buy amounts are non-refundable.
Sub-commands
| Sub-command | Description |
|---|
| Get token creation count statistics grouped by launchpad platform (normal auth) |
| Deploy a new token on a launchpad platform (requires private key) |
Supported Chains
Supported Launchpads by Chain
| Chain | values |
|---|
| / / / / / / |
| / / |
| / / / / / |
When the user names a platform colloquially (e.g. "pump.fun", "four.meme", "PancakeSwap"), map it to the correct
identifier from this table before running the command.
Prerequisites
- : Only required
- : Both and must be configured in . The private key must correspond to the wallet bound to the API Key.
- installed globally — if missing, run:
Rate Limit Handling
All cooking routes go through GMGN's leaky-bucket limiter with
and
. Sustained throughput is roughly
requests/second.
- Read from the response headers — Unix timestamp for when the limit resets.
- is a real transaction: never loop or auto-resubmit after a . Wait until the reset time, then ask for confirmation again before retrying.
- For or , repeated requests during cooldown extend the ban by 5 seconds each time, up to 5 minutes.
First-time setup (if credentials are not configured):
-
Generate key pair and show the public key to the user:
bash
openssl genpkey -algorithm ed25519 -out /tmp/gmgn_private.pem 2>/dev/null && \
openssl pkey -in /tmp/gmgn_private.pem -pubout 2>/dev/null
Tell the user:
"This is your Ed25519 public key. Go to https://gmgn.ai/ai, paste it into the API key creation form (enable swap/cooking capability), then send me the API Key value shown on the page."
-
Wait for the user's API key, then configure both credentials:
bash
mkdir -p ~/.config/gmgn
echo 'GMGN_API_KEY=<key_from_user>' > ~/.config/gmgn/.env
echo 'GMGN_PRIVATE_KEY="<pem_content_from_step_1>"' >> ~/.config/gmgn/.env
chmod 600 ~/.config/gmgn/.env
Credential Model
- is used exclusively for local message signing — the private key never leaves the machine. The CLI computes an Ed25519 signature in-process and transmits only the base64-encoded result in the request header.
- is transmitted in the header over HTTPS.
- Neither credential is ever passed as a command-line argument.
Usage
bash
gmgn-cli cooking stats [--raw]
Response Fields
| Field | Type | Description |
|---|
| string | Launchpad identifier (e.g. , , ) |
| int | Number of tokens created via GMGN on that launchpad |
Parameters
| Parameter | Required | Description |
|---|
| Yes | Chain: / / / / |
| Yes | Launchpad platform identifier — see Supported Launchpads table. Never guess this value. |
| Yes | Wallet address (must match API Key binding) |
| Yes | Token full name (e.g. ) |
| Yes | Token ticker symbol (e.g. ) |
| No | Token description / project pitch |
| Yes | Initial buy amount in human-readable native token units (e.g. = 0.01 SOL). This is NOT in smallest unit. |
| No* | Token logo as base64-encoded data (max 2MB decoded). Mutually exclusive with . One of the two is required. |
| No* | Token logo as a publicly accessible URL. Mutually exclusive with . One of the two is required. |
| No* | Slippage tolerance, e.g. = 1%. Mutually exclusive with — provide one or the other. |
| No* | Enable automatic slippage. Mutually exclusive with . |
| No | Project website URL |
| No | Twitter / X URL |
| No | Telegram group URL |
| No | Priority fee in SOL (SOL only, ≥ 0.0001 SOL) |
| No | Tip fee (SOL ≥ 0.00001 / BSC ≥ 0.000001 BNB; ignored on ETH/BASE) |
| No | Gas price in wei (EVM chains) |
| No | Enable anti-MEV protection |
*
or
: provide exactly one.
or
: provide exactly one.
Response Fields
| Field | Type | Description |
|---|
| string | / / |
| string | Transaction hash (may be empty while ) |
| string | Order ID — pass to to poll for final status |
| string | Error code on failure |
| string | Error description on failure |
Status Polling
Token creation is
asynchronous. If the initial
response shows
:
- Poll with every 2 seconds, up to 30 seconds:
bash
gmgn-cli order get --chain <chain> --order-id <order_id>
- The new token's contract / mint address is in the field of the response — it is NOT returned by directly.
- Stop polling once is , , or .
- On : display as the token address and include the block explorer link.
- On / : report the and do not retry automatically.
Usage Examples
bash
# Get token creation statistics per launchpad
gmgn-cli cooking stats
# Create a token on Pump.fun (SOL) — with URL image
gmgn-cli cooking create \
--chain sol \
--dex pump \
--from <wallet_address> \
--name "My Token" \
--symbol MAT \
--buy-amt 0.01 \
--image-url https://example.com/logo.png \
--slippage 0.01 \
--priority-fee 0.001
# Create a token on PancakeSwap (BSC) — with URL image and social links
gmgn-cli cooking create \
--chain bsc \
--dex pancakeswap \
--from <wallet_address> \
--name "BSC Token" \
--symbol BSCT \
--buy-amt 0.05 \
--image-url https://example.com/logo.png \
--slippage 0.02 \
--gas-price 5000000000 \
--website https://mytoken.io \
--twitter https://twitter.com/mytoken
# Create a token on FourMeme (BSC) — using base64 image from local file
gmgn-cli cooking create \
--chain bsc \
--dex fourmeme \
--from <wallet_address> \
--name "Four Token" \
--symbol FOUR \
--buy-amt 0.05 \
--image "$(base64 -i /path/to/logo.png)" \
--auto-slippage
# Create a token on letsbonk (SOL)
gmgn-cli cooking create \
--chain sol \
--dex letsbonk \
--from <wallet_address> \
--name "Bonk Token" \
--symbol BNKT \
--buy-amt 0.01 \
--image-url https://example.com/logo.png \
--auto-slippage \
--anti-mev
Output Format
Pre-create Confirmation
Before every
, present this summary and wait for explicit user confirmation:
⚠️ Token Creation Confirmation Required
Chain: {chain}
Platform: {--dex} (e.g. pump / fourmeme)
Wallet: {--from}
Token Name: {--name}
Symbol: {--symbol}
Initial Buy: {--buy-amt} {native currency} (e.g. 0.01 SOL)
Slippage: {--slippage}% (or "auto")
Image: {--image-url or "base64 provided"}
Social: {twitter / telegram / website if provided}
Reply "confirm" to deploy this token. This action is IRREVERSIBLE.
Post-create Receipt
After polling confirms a successful deployment:
✅ Token Created
Token: {--name} ({--symbol})
Address: {output_token from order get}
Chain: {chain}
Platform: {--dex}
Tx: {explorer link for hash}
Order ID: {order_id}
Block explorer links:
| Chain | Explorer |
|---|
| sol | https://solscan.io/tx/<hash>
|
| bsc | https://bscscan.com/tx/<hash>
|
| base | https://basescan.org/tx/<hash>
|
| eth | https://etherscan.io/tx/<hash>
|
Guided Launch Flow
When a user says they want to launch / create / deploy a token but has not provided all required information, do NOT ask for everything at once. Collect information in this order, one step at a time:
Step 1 — Chain & Platform
Ask: "Which chain and platform do you want to launch on?"
Show the available options:
| Chain | Platform | |
|---|
| Solana | Pump.fun | |
| Solana | letsbonk | |
| Solana | Raydium | |
| Solana | BAGS | |
| Solana | Memoo | |
| Solana | Bonkers | |
| BSC | FourMeme | |
| BSC | PancakeSwap | |
| BSC | Flap | |
| Base | Clanker | |
| Base | Zora | |
| Base | Flaunch | |
| Base | Virtuals | |
If the user is unsure, recommend: Pump.fun (SOL) or FourMeme (BSC) — the two most active launchpads.
Step 2 — Token Identity
Ask for name, symbol, and description together:
"What is your token's name, ticker symbol, and a short description?"
- Name: the full display name (e.g. )
- Symbol: short uppercase ticker, typically 3–8 characters (e.g. )
- Description: optional but recommended — a one-line pitch shown on the launchpad
Step 3 — Logo
Ask:
"Do you have a logo image? You can share a file path (e.g. ) or an image URL."
- If the user provides a file path: silently run and pass the result to . Do not mention "base64" to the user.
- If the user provides a URL: use directly.
- If the user has no logo: note that most platforms accept a launch without one, but it significantly reduces visibility. Ask if they want to proceed without it.
Step 4 — Social Links (optional)
Ask: "Do you have a Twitter, Telegram, or website to attach to the token? You can skip this."
Collect any combination of
,
,
. If the user skips, proceed to the next step.
Step 5 — Initial Buy Amount
Ask: "How much {SOL / BNB / ETH} do you want to spend on the initial buy?"
Pass the user's answer directly to
— this is already in full token units (e.g.
= 0.01 SOL), do NOT convert to lamports or wei.
Step 6 — Confirmation & Execute
Once all information is collected, present the pre-create confirmation summary (see Output Format section) and wait for the user to reply "confirm" before executing.
Execution Guidelines
- [REQUIRED] Pre-create confirmation — Before executing , present the full summary above and receive explicit "confirm" from the user. No exceptions. Do NOT auto-create.
- [REQUIRED] validation — Before running, look up the user's named platform in the Supported Launchpads table and resolve to the correct identifier. Never guess or pass a freeform platform name. If the chain/platform combination is not in the table, tell the user it is unsupported.
- Slippage requirement — Either or must be provided. If the user did not specify, suggest for volatile new tokens or ask for a preference.
- Image handling — If the user provides a file path, run and pass the result to . If they provide a URL, use . If neither is provided, ask before building the confirmation — most platforms require a logo.
- Address validation — Validate wallet address format before submitting:
- : base58, 32–44 characters
- / / : + 40 hex digits
- Chain-wallet compatibility — SOL addresses are incompatible with EVM chains and vice versa. Warn the user and abort if the address format does not match the chain.
- Order polling — After , if is , poll every 2 seconds up to 30 seconds. The token address is in . Do not report success until is .
- Credential sensitivity — and can execute real transactions. Never log, display, or expose these values.
Notes
- uses critical auth (API Key + signature) — CLI handles signing automatically.
- uses normal auth (API Key only — no private key needed).
- The new token's mint address is in from , not in the initial response.
- Use on any command to get single-line JSON for further processing.
References
| Skill | Description |
|---|
| gmgn-swap | Contains command used for polling token creation status |
| gmgn-token | Token security check, info, holders, and traders — useful after launch to monitor your token |
| gmgn-market | for tracking bonding curve progress; to see if your token is gaining traction |
| gmgn-track | Smart money and KOL trade tracking — monitor whether smart wallets are buying your token after launch |
| gmgn-portfolio | Wallet holdings and P&L — check your own wallet balance before deciding on |