> For the complete documentation index, see [llms.txt](https://cooking-city-launchpad.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cooking-city-launchpad.gitbook.io/docs/api-documentation/token-creation.md).

# Token Creation

### Creation Process

#### 1. Prepare Metadata

```javascript
const metadata = {
  name: "Token Name",
  symbol: "Token Symbol",
  description: "Token Description",
  image: "IPFS Image URL",
  social_links: {
    twitter: "Twitter Link",
    telegram: "Telegram Link",
    discord: "Discord Link",
  },
};
```

#### 2. Create Token Transaction

**Endpoint**: `POST /api/token/create`

**Request Headers**:

```
Authorization: Bearer your_jwt_token
Content-Type: application/json
```

**Request Parameters**:

```json
{
  "insurance_amt": 1000000000,
  "insurance_px": 500000000,
  "name": "My Token",
  "symbol": "MTK",
  "uri": "ipfs://metadata_hash",
  "user_pubkey": "user_wallet_public_key",
  "network": "mainnet",
  "platform": "meteora",
  "platform_params": ""
}
```

**Response Example**:

```json
{
  "code": 200,
  "data": {
    "mint": "token_mint_private_key_base58",
    "signature": "transaction_signature",
    "tx": "transaction_id",
    "dlmm": {
      "initial_bin_id": -300
    }
  }
}
```

#### 3. Sign and Send Transaction

```javascript
// Build on-chain transaction using returned mint private key
const tokenParams = {
  name: "My Token",
  symbol: "MTK",
  uri: "ipfs://metadata_hash",
  insuranceAmt: 1000000000,
  insurancePx: 500000000,
  userPubkey: "user_public_key",
  mint: "mint_private_key",
  buyAmount: 100000000,
  binId: -300,
  isAntiSniper: false,
};

// Call on-chain creation function
const { signatures, mintPubkey } = await signAndSendTransaction(
  connection,
  tokenParams,
  wallet
);
```

### Parameter Description

#### Basic Parameters

* **name**: Token name (1-32 characters)
* **symbol**: Token symbol (3-10 bytes)
* **uri**: Metadata URI (IPFS link)
* **user\_pubkey**: Creator wallet address

#### Conviction Pool Parameters

* **insurance\_amt**: Conviction amount (lamports, 0 means no creation)
* **insurance\_px**: Trigger price (lamports)

#### Trading Parameters

* **buyAmount**: Initial purchase amount (optional)
* **binId**: Initial price point for DLMM pool (default -300)
* **isAntiSniper**: Enable anti-sniper functionality

### Key Points

* Token creation requires sufficient SOL balance
* Conviction pool is optional, insurance\_amt=0 means no creation
* Symbol length is calculated in bytes, supports UTF-8
* Uses Meteora DLMM as AMM protocol
* Supports anti-sniper configuration


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cooking-city-launchpad.gitbook.io/docs/api-documentation/token-creation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
