# Token Creator API

## API Reference <a href="#v6-api-reference" id="v6-api-reference"></a>

With over 180,000+ tokens already issued through Dexlab, we are now offering even easier and more powerful features for token creation.

Our robust REST API provides seamless access to all token issuance functionalities, allowing developers to create and manage tokens effortlessly. Whether you’re launching a new project or enhancing an existing one, Dexlab’s API offers a simple and efficient solution.

And the best part? You can get started right now—for free.

Experience the freedom to build, create, and innovate without barriers.

{% hint style="success" %}
The Open API is freely accessible with no restrictions. However, it is subject to a rate limit of 2 request per second (RPS) per IP, and the referral fee can be set up to a maximum of 3% (100 bps).\
[**Dexlab API Key Request**](https://forms.gle/pnuAjVNsM8Mm6LSg7)
{% endhint %}

## API Endpoint

All APIs are free to use, but the Pro API requires an API key(Free) issuance.

* Open API: `https://open-api.dexlab.space/`&#x20;
  * *There is a rate limit of 1 RPS. If you need more, get a free API key.*
* Pro API( API key required ): `https://pro-api.dexlab.space/`&#x20;
  * *The rate limit is increased and free.*

## Create Token&#x20;

{% hint style="info" %}
When using the Open API endpoint, the x-api-key is not required.
{% endhint %}

## POST /token

>

```json
{"openapi":"3.0.1","info":{"title":"Dexlab Public OpenAPI","version":"1.0"},"servers":[{"url":"https://open-api.dexlab.space"}],"paths":{"/token":{"post":{"operationId":"TokenController_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreationRequestBody"}}},"required":true},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MODELcfae95"}}}},"400":{"description":"400 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseError"}}}},"500":{"description":"500 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseError"}}}}}}}},"components":{"schemas":{"TokenCreationRequestBody":{"required":["payer","symbol"],"type":"object","properties":{"payer":{"type":"string","description":"Public key of the payer who will cover transaction fees."},"symbol":{"type":"string","description":"Token symbol (max 10 bytes)."},"newMint":{"type":"string","description":"Public key for minting the token. If not provided, a new mint will be automatically generated."},"name":{"type":"string","description":"Token name (max 32 bytes). If not provided, the symbol is used as the name."},"metadataUri":{"type":"string","description":"If provided, `metadataUri` will override `metadata` and be used directly."},"metadata":{"description":"Metadata object containing detailed information about the token, such as name, description, image URI, and extensions. If `metadataUri` is provided, this field will be ignored.","allOf":[{"$ref":"#/components/schemas/TokenMetadata"}]},"decimals":{"type":"number","description":"Defines the number of decimal places for the token. Default is 6."},"mintSupply":{"type":"string","description":"Total supply of tokens to mint. Default is 1,000,000,000 (10^9)."},"mintToPubkey":{"type":"string","description":"Public key to which the minted tokens will be sent. Required if `mintSupply` is specified."},"mintAuthority":{"type":"boolean","description":"Determines if the mint authority is assigned. Default is true."},"freezeAuthority":{"type":"boolean","description":"Determines if the freeze authority is enabled. Default is false."},"program":{"type":"string","description":"Token creation type. Supports \"token\" for standard SPL tokens or \"token2022\" for advanced tokens with extended capabilities.","default":"token"},"transferFeeConfigAuthority":{"type":"string","description":"\n[Token2022 Only] Public key of the authority responsible for setting or adjusting transfer fees. \nAll four transferFee fields (transferFeeConfigAuthority, transferFeeWithdrawalAuthority, transferFeeBps, and transferFeeMax) must be provided; otherwise, the transaction will fail."},"transferFeeWithdrawalAuthority":{"type":"string","description":"\n[Token2022 Only] Public key of the authority capable of withdrawing fees collected from token transfers.\nAll four transferFee fields (transferFeeConfigAuthority, transferFeeWithdrawalAuthority, transferFeeBps, and transferFeeMax) must be provided; otherwise, the transaction will fail.\n"},"transferFeeBps":{"type":"number","description":"\n[Token2022 Only] Fee charged for token transfers, represented in basis points (bps). 1 bps equals 0.01%. Must be a value between 0 and 10,000.\nAll four transferFee fields (transferFeeConfigAuthority, transferFeeWithdrawalAuthority, transferFeeBps, and transferFeeMax) must be provided; otherwise, the transaction will fail.\n"},"transferFeeMax":{"type":"string","description":"\n[Token2022 Only] Maximum possible fee that can be charged for a single transfer (measured in lamports).\nAll four transferFee fields (transferFeeConfigAuthority, transferFeeWithdrawalAuthority, transferFeeBps, and transferFeeMax) must be provided; otherwise, the transaction will fail.\n"},"permanentDelegate":{"type":"string","description":"[Token2022 Only] Public key of the delegated authority with permanent rights over the mint"},"defaultAccountState":{"type":"object","description":"\n[Token2022 Only] Default state of accounts created by this mint. 'Possible values are: \"uninitialized\", \"initialized\", or \"frozen\".\n'Accounts cannot be created in the \"uninitialized\" state. A \"frozen\" state requires a `freezeAuthority` to exist."},"interestBearingAuthority":{"type":"string","description":"\n[Token2022 Only] Public key of the authority responsible for configuring interest rates for token accounts.\nBoth interestBearing fields (interestBearingAuthority and interestBearingPercent) must be provided together; otherwise, the transaction will fail.\n"},"interestBearingPercent":{"type":"number","description":"\n[Token2022 Only] Interest rate applied to token balances.\nBoth interestBearing fields (interestBearingAuthority and interestBearingPercent) must be provided together; otherwise, the transaction will fail.\n"},"mintCloseAuthority":{"type":"string","description":"[Token2022 Only] Public key of the authority allowed to close the mint and reclaim rent."},"nonTransferableMint":{"type":"boolean","description":"[Token2022 Only] Indicates whether tokens minted by this contract are non-transferable."}}},"TokenMetadata":{"type":"object","properties":{"description":{"type":"string","description":"A brief description of the token."},"imageUri":{"type":"string","description":"URL of the token's image."},"extensions":{"description":"Additional metadata, including social links or other extensions.","allOf":[{"$ref":"#/components/schemas/TokenMetadataExtension"}]},"tags":{"type":"string","description":"Comma-separated list of tags for categorization."}}},"TokenMetadataExtension":{"type":"object","properties":{"discord":{"type":"string","description":"Discord link related to the token."},"telegram":{"type":"string","description":"Telegram link for the token community."},"twitter":{"type":"string","description":"Twitter profile link."},"website":{"type":"string","description":"Official website URL."}}},"MODELcfae95":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TokenCreationResponse"}}},"TokenCreationResponse":{"required":["payer","token","tx"],"type":"object","properties":{"payer":{"type":"string","description":"The public key of the payer who initiated the token creation transaction."},"token":{"description":"Details of the created token, including its address, name, symbol, etc.","allOf":[{"$ref":"#/components/schemas/TokenMint"}]},"tx":{"type":"string","description":"The transaction ID of the token creation process."}}},"TokenMint":{"required":["address","decimals","freezeAuthority","metadata","mintAuthority","mintSupply","mintTo","name","program","symbol"],"type":"object","properties":{"address":{"type":"string","description":"The address of the created token mint on the Solana blockchain."},"name":{"type":"string","description":"The name of the created token."},"symbol":{"type":"string","description":"The symbol representing the created token."},"decimals":{"type":"number","description":"The number of decimal places for the token."},"metadata":{"type":"string","description":"The URI of the associated metadata for the created token."},"mintAuthority":{"type":"string","description":"The public key of the mint authority for the token."},"freezeAuthority":{"type":"string","description":"The public key of the freeze authority for the token."},"mintSupply":{"type":"string","description":"The total supply of tokens that were minted."},"mintTo":{"type":"string","description":"The public key to which the minted tokens were sent."},"program":{"type":"string","description":"Defines the token creation type. Supports \"token\" for standard SPL tokens or \"token2022\" for advanced tokens with extended capabilities."},"transferFeeConfigAuthority":{"type":"string","description":"[Token2022 Only] Public key of the authority responsible for setting or adjusting transfer fees."},"transferFeeWithdrawalAuthority":{"type":"string","description":"[Token2022 Only] Public key of the authority capable of withdrawing fees collected from token transfers."},"transferFeeBps":{"type":"number","description":"[Token2022 Only] Fee charged for token transfers, represented in basis points (bps). 1 bps equals 0.01%."},"transferFeeMax":{"type":"string","description":"[Token2022 Only] Maximum possible fee that can be charged for a single transfer, measured in lamports."},"permanentDelegate":{"type":"string","description":"Public key of the delegated authority with permanent rights over the mint."},"defaultAccountState":{"type":"object","description":"[Token2022 Only] Default state of accounts created by this mint. Possible values are: \"uninitialized\", \"initialized\", or \"frozen\"."},"interestBearingAuthority":{"type":"string","description":"[Token2022 Only] Public key of the authority responsible for configuring interest rates for token accounts."},"interestBearingPercent":{"type":"number","description":"[Token2022 Only] Interest rate applied to token holdings, represented in basis points (bps). 1 bps equals 0.01%. Valid range is 0 to 10,000."},"mintCloseAuthority":{"type":"string","description":"[Token2022 Only] Public key of the authority allowed to close the mint and reclaim rent."},"nonTransferableMint":{"type":"boolean","description":"[Token2022 Only] Flag indicating whether tokens created by the mint are non-transferable."}}},"CommonResponseError":{"type":"object","properties":{}}}}}
```
