> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint a token

Minting fungible token allows you to increase the total supply of the token. Minting a non-fungible token creates an NFT with its unique metadata for the class of NFTs defined by the token ID. The Supply Key must sign the transaction.

* If no Supply Key is defined, the transaction will resolve to `TOKEN\_HAS\_NO\_SUPPLY\_KEY`. The maximum total supply a token can have is `2^63-1`.
* The amount provided must be in the lowest denomination possible.
  * Example: Token A has 2 decimals. In order to mint 100 tokens, one must provide an amount of 10000. In order to mint 100.55 tokens, one must provide an amount of 10055.
* The metadata field is specific to NFTs. Once an NFT is minted, the metadata cannot be changed and is immutable.
  * You can use the metadata field to add a URI that contains additional information about the token. You can view the metadata schema [here](https://hips.hedera.com/hip/hip-412). The metadata field has a 100-character limit.
* The serial number for the NFT is returned in the receipt of the transaction.
* When minting NFTs, do not set the amount. The amount is used for minting fungible tokens only.
* This transaction accepts zero unit minting operations for fungible tokens ([HIP-564](https://hips.hedera.com/hip/hip-564))

**Transaction Signing Requirements**

* Supply key
* Transaction fee payer account key

**Transaction Fees**

* Please see the transaction and query [fees](/learn/networks/mainnet/fees#transaction-and-query-fees) table for the base transaction fee.
* Please use the [Hedera fee estimator](https://hedera.com/fees) to estimate your transaction fee cost.

## Constructor

| Constructor                  | Description                                 |
| ---------------------------- | ------------------------------------------- |
| `new TokenMintTransaction()` | Initializes the TokenMintTransaction object |

## Transaction Properties

| **Method**                    | **Type**       | **Requirement**     |
| ----------------------------- | -------------- | ------------------- |
| `setTokenId(<tokenId>)`       | TokenId        | Required            |
| `setAmount(<amount>)`         | long           | Optional (fungible) |
| `addMetadata(<metadata>)`     | byte\[]        | Optional (NFT)      |
| `setMetadata(<metadataList>)` | List\<byte\[]> | Optional (NFT)      |
| `setHighVolume(<highVolume>)` | boolean        | Optional            |

## Get Transaction Values

| **Method**        | **Type**       | **Description**                                                                                                 |
| ----------------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
| `getTokenId()`    | TokenId        | Returns the token ID                                                                                            |
| `getAmount()`     | long           | Returns the amount to mint (fungible)                                                                           |
| `getMetadata()`   | List\<byte\[]> | Returns the metadata list (NFT)                                                                                 |
| `getHighVolume()` | boolean        | Returns whether this transaction uses [high-volume throttles](/learn/core-concepts/high-volume-entity-creation) |

<Note>
  This transaction supports [high-volume entity creation](/learn/core-concepts/high-volume-entity-creation)
  (HIP-1313). Setting `setHighVolume(true)` routes the transaction through dedicated
  high-volume throttle capacity with variable-rate pricing for both fungible and NFT mints.
  Always pair this with `setMaxTransactionFee()` to cap your costs.
</Note>

<CodeGroup>
  ```java Java theme={null}
  //Mint another 1,000 tokens
  TokenMintTransaction transaction = new TokenMintTransaction()
       .setTokenId(tokenId)
       .setMaxTransactionFee(new Hbar(20)) //Use when HBAR is under 10 cents
       .setAmount(1000);

  //Freeze the unsigned transaction, sign with the supply private key of the token, submit the transaction to a Hedera network
  TransactionResponse txResponse = transaction
       .freezeWith(client)
       .sign(supplyKey)
       .execute(client);

  //Request the receipt of the transaction
  TransactionReceipt receipt = txResponse.getReceipt(client);

  //Obtain the transaction consensus status
  Status transactionStatus = receipt.status;

  System.out.println("The transaction consensus status is " +transactionStatus;

  //v2.0.1
  ```

  ```javascript JavaScript theme={null}
  //Mint another 1,000 tokens and freeze the unsigned transaction for manual signing
  const transaction = await new TokenMintTransaction()
       .setTokenId(tokenId)
       .setAmount(1000)
       .setMaxTransactionFee(new Hbar(20)) //Use when HBAR is under 10 cents
       .freezeWith(client);

  //Sign with the supply private key of the token 
  const signTx = await transaction.sign(supplyKey);

  //Submit the transaction to a Hedera network    
  const txResponse = await signTx.execute(client);

  //Request the receipt of the transaction
  const receipt = await txResponse.getReceipt(client);
      
  //Get the transaction consensus status
  const transactionStatus = receipt.status;

  console.log("The transaction consensus status " +transactionStatus.toString());

  //v2.0.7
  ```

  ```go Go theme={null}
  //Mint another 1,000 tokens and freeze the unsigned transaction for manual signing
  transaction, err = hedera.NewTokenMintTransaction().
  		SetTokenID(tokenId).
  		SetAmount(1000).
  		//Use when HBAR is under 10 cents
  		SetMaxTransactionFee(hedera.HbarFrom(20, hedera.HbarUnits.Hbar)).
  		FreezeWith(client)

  if err != nil {
  		panic(err)
  }

  //Sign with the supply private key of the token, submit the transaction to a Hedera network
  txResponse, err := transaction.
  		Sign(supplyKey).
  		Execute(client)

  if err != nil {
  		panic(err)
  }

  //Request the receipt of the transaction
  receipt, err = txResponse.GetReceipt(client)

  if err != nil {
  		panic(err)
  }

  //Get the transaction consensus status
  status := receipt.Status

  fmt.Printf("The transaction consensus status is %v\n", status)

  //v2.1.0
  ```

  ```rust Rust theme={null}
  // Mint another 1,000 tokens
  let transaction = TokenMintTransaction::new()
      .token_id(token_id)
      .amount(1000)
      .max_transaction_fee(Hbar::from(20)); // Use when HBAR is under 10 cents

  // Freeze the unsigned transaction, sign with the supply private key of the token
  let tx_response = transaction
      .freeze_with(&client)?
      .sign(supply_key)
      .execute(&client).await?;

  // Request the receipt of the transaction
  let receipt = tx_response.get_receipt(&client).await?;

  // Get the transaction consensus status
  let status = receipt.status;

  println!("The transaction consensus status is {:?}", status);

  // v0.34.0
  ```
</CodeGroup>
