> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-add-json-rpc-release-notes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a token

<Info>
  Check out the "Getting Started with the Hedera Token Service" video tutorial in JavaScript [here](https://youtu.be/lp3mwdYEZEk).
</Info>

Create a new fungible or non-fungible token (NFT) on the Hedera network. After you submit the transaction to the Hedera network, you can obtain the new token ID by requesting the receipt.

You can also create, access, or transfer HTS tokens using smart contracts - see [Hedera Service Solidity Libraries](https://docs.hedera.com/guides/docs/sdks/smart-contracts/hedera-service-solidity-libraries) and [Supported ERC Token Standards](https://docs.hedera.com/guides/core-concepts/smart-contracts/supported-erc-token-standards).

<Warning>
  **Token Keys**

  * If any of the token key types (KYC key, Wipe key, Metadata key, etc) are not set during the creation of the token, you will not be able to update the token and add them in the future
  * If any of the token key types (KYC key, Wipe key, Metadata key, etc) are set during the creation of the token, you will not be able to remove them in the future
</Warning>

#### **NFTs**

For non-fungible tokens, the token ID represents an NFT class. Once the token is created, you must mint each NFT using the [token mint](/hedera/sdks-and-apis/sdks/token-service/mint-a-token) operation.

<Warning>
  **Note**: The initial supply for an NFT is required to be set to 0.
</Warning>

#### **Token Properties**

<Card title="Token Properties" href="/hedera/core-concepts/tokens/hedera-token-service-hts-native-tokenization/token-properties" />

**Transaction Signing Requirements**

* Treasury key is required to sign
* Admin key, if specified
* Transaction fee payer key

**Transaction Fees**

* For fungible tokens, a [`CryptoTransfer`](/hedera/networks/mainnet/fees) fee is added to transfer the newly created token to the treasury account
* Please see the transaction and query [fees](/hedera/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

## Methods

<table><thead><tr><th>Method</th><th>Type</th><th>Requirement</th></tr></thead><tbody><tr><td><code>setTokenName(\<name>)</code></td><td>String</td><td>Required</td></tr><tr><td><code>setTokenType(\<tokenType>)</code></td><td><a href="/hedera/sdks-and-apis/sdks/token-service/token-types">TokenType</a></td><td>Optional</td></tr><tr><td><code>setTokenSymbol(\<symbol>)</code></td><td>String</td><td>Required</td></tr><tr><td><code>setDecimals(\<decimal>)</code></td><td>int</td><td>Optional</td></tr><tr><td><code>setInitialSupply(\<initialSupply>)</code></td><td>int</td><td>Optional</td></tr><tr><td><code>setTreasuryAccountId(\<treasury>)</code></td><td><a href="https://github.com/hashgraph/hedera-docs/blob/main/sdks-and-apis/sdks/token-service/broken-reference/README.md">AccountId</a></td><td>Required</td></tr><tr><td><code>setAdminKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setKycKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setFreezeKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setWipeKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setSupplyKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setPauseKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setFreezeDefault(\<freeze></code>)</td><td>boolean</td><td>Optional</td></tr><tr><td><code>setExpirationTime(\<expirationTime>)</code></td><td>Instant</td><td>Optional</td></tr><tr><td><code>setFeeScheduleKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setCustomFees(\<customFees>)</code></td><td>List\<<a href="/hedera/sdks-and-apis/sdks/token-service/custom-token-fees#custom-fee">CustomFee</a>></td><td>Optional</td></tr><tr><td><code>setSupplyType(\<supplyType>)</code></td><td>TokenSupplyType</td><td>Optional</td></tr><tr><td><code>setMaxSupply(\<maxSupply>)</code></td><td>long</td><td>Optional</td></tr><tr><td><code>setTokenMemo(\<memo>)</code></td><td>String</td><td>Optional</td></tr><tr><td><code>setAutoRenewAccountId(\<account>)</code></td><td><a href="../accounts-and-hbar/get-account-info">AccountId</a></td><td>Optional</td></tr><tr><td><code>setAutoRenewPeriod(\<period>)</code></td><td>Duration</td><td>Optional</td></tr><tr><td><code>setMetadataKey(\<key>)</code></td><td>Key</td><td>Optional</td></tr><tr><td><code>setMetadata(\<bytes>)</code></td><td>bytes</td><td>Optional</td></tr></tbody></table>

<Info>
  **Note**: Where the Admin, Pause, Freeze, and Wipe keys are left blank, the Supply key will be required as a minimum.
</Info>

<CodeGroup>
  ```java Java theme={null}
  //Create the transaction
  TokenCreateTransaction transaction = new TokenCreateTransaction()
          .setTokenName("Your Token Name")
          .setTokenSymbol("F")
          .setTreasuryAccountId(treasuryAccountId)
          .setInitialSupply(5000)
          .setAdminKey(adminKey.getPublicKey())
          .setMetadataKey(metadataKey)
          .setMetadata(metadata)
          .setMaxTransactionFee(new Hbar(30)); //Change the default max transaction fee

  //Build the unsigned transaction, sign with admin private key of the token, sign with the token treasury private key, submit the transaction to a Hedera network
  TransactionResponse txResponse = transaction.freezeWith(client).sign(adminKey).sign(treasuryKey).execute(client);

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

  //Get the token ID from the receipt
  TokenId tokenId = receipt.tokenId;

  System.out.println("The new token ID is " + tokenId);

  //v2.0.1
  ```

  ```javascript JavaScript theme={null}
  //Create the transaction and freeze for manual signing
  const transaction = await new TokenCreateTransaction()
       .setTokenName("Your Token Name")
       .setTokenSymbol("F")
       .setTreasuryAccountId(treasuryAccountId)
       .setInitialSupply(5000)
       .setAdminKey(adminPublicKey)
       .setMetadataKey(metadataKey)
       .setMetadata(metadata)
       .setMaxTransactionFee(new Hbar(30)) //Change the default max transaction fee
       .freezeWith(client);

  //Sign the transaction with the token adminKey and the token treasury account private key
  const signTx =  await (await transaction.sign(adminKey)).sign(treasuryKey);

  //Sign the transaction with the client operator private key and submit to a Hedera network
  const txResponse = await signTx.execute(client);

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

  //Get the token ID from the receipt
  const tokenId = receipt.tokenId;

  console.log("The new token ID is " + tokenId);

  //v2.0.5
  ```

  ```go Go theme={null}
  //Create the transaction and freeze the unsigned transaction
  tokenCreateTransaction, err := hedera.NewTokenCreateTransaction().
        SetTokenName("Your Token Name").
          SetTokenSymbol("F").
          SetTreasuryAccountID(treasuryAccountId).
          SetInitialSupply(1000).
          SetAdminKey(adminKey).
          SetMetadataKey(metadataKey).
          SetMetadata(metadata)
          SetMaxTransactionFee(hedera.NewHbar(30)). //Change the default max transaction fee
          FreezeWith(client)

  if err != nil {
      panic(err)
  }

  //Sign with the admin private key of the token, sign with the token treasury private key, sign with the client operator private key and submit the transaction to a Hedera network
  txResponse, err := tokenCreateTransaction.Sign(adminKey).Sign(treasuryKey).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 token ID from the receipt
  tokenId := *receipt.TokenID

  fmt.Printf("The new token ID is %v\n", tokenId)

  //v2.1.0
  ```

  ```rust Rust theme={null}
  // Create the transaction
  let transaction = TokenCreateTransaction::new()
      .name("Your Token Name")
      .symbol("F")
      .treasury_account_id(treasury_account_id)
      .initial_supply(5000)
      .admin_key(admin_key.public_key())
      .metadata_key(metadata_key)
      .metadata(metadata)
      .max_transaction_fee(Hbar::from(30)); // Change the default max transaction fee

  // Build the unsigned transaction, sign with admin private key of the token, sign with the token treasury private key
  let tx_response = transaction
      .freeze_with(&client)?
      .sign(admin_key)
      .sign(treasury_key)
      .execute(&client).await?;

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

  // Get the token ID from the receipt
  let token_id = receipt.token_id.unwrap();

  println!("The new token ID is {:?}", token_id);

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