<p>The process is the same but you need to specify in your <code>cardano-cli transaction build</code> command, all your assets to mint. For example:</p>
<pre><code>cardano-cli transaction build-raw \
  --fee 197797 \
  --tx-in 6af4fea10fe3fd7120ab7e3f5361ae15d898f4fa6ebddcf585a80865010722dd#0 \
  --tx-out $(cat key1/payment.addr)+15850022+&quot;1 $(cat policy.id).nft1&quot;+&quot;1 $(cat policy.id).nft2&quot; \
  --mint=&quot;1 $(cat policy.id).nft1&quot;+&quot;1 $(cat policy.id).nft2&quot; \
  --minting-script-file policy.json \
  --metadata-json-file metadata.json \
  --invalid-hereafter=41797828 \
  --out-file transaction.raw
</code></pre>
<p>And of course, modify your metadata to have all your assets.</p>
<p><strong>UPDATE</strong>
Consider that from <code>cardano-cli</code> v 1.31, your asset names should be  <a href="https://cardano.stackexchange.com/a/4635/1231">base16-encoded</a>, this is only for the <code>build-raw</code> command.</p>
<p>Your <code>metadata.json</code> should look like this:</p>
<pre><code>{
    &quot;721&quot;: {
        &quot;1573568cde0f3c340266e50f0d108795f5e4190de939081f15287a24&quot;: {
            &quot;nft1&quot;: {
                &quot;name&quot;: &quot;nft#00001&quot;,
                &quot;image&quot;: &quot;ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGAs&quot;,
                &quot;mediaType&quot;: &quot;image/gif&quot;,
                &quot;description&quot;: &quot;My TEST NFT 00001&quot;,
                &quot;propety1&quot;: &quot;Serie 1&quot;,
                &quot;propety2&quot;: &quot;Red&quot;
            },
            &quot;nft2&quot;: {
                &quot;name&quot;: &quot;nft#00002&quot;,
                &quot;image&quot;: &quot;ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGEs&quot;,
                &quot;mediaType&quot;: &quot;image/gif&quot;,
                &quot;description&quot;: &quot;My TEST NFT 00002&quot;,
                &quot;propety1&quot;: &quot;Serie 1&quot;,
                &quot;propety2&quot;: &quot;Black&quot;
            }
        }
    }
}
</code></pre>

CC BY-SA 4.0
2021-12-17T04:03:25.460Z
Can you include here an example of what metadata.json might look like for multiple nfts?
melchoir55
CC BY-SA 4.0
2021-12-17T05:07:59.307Z
Done, check my updated answer.
georgeos
CC BY-SA 4.0
2021-11-05T18:54:05.850Z
2021-12-17T05:06:58.317Z
2021-12-17T05:06:58.317Z
georgeos
<p>The developer guide doesn't cover this.</p>
<p>Here is an example of what I'm trying to do:
<a href="https://cardanoscan.io/transaction/e1c7bc707e56bf37b4325dc4b7fe524eafe8ca746e54746d60b321588ffebb6c?tab=tokenmint" rel="noreferrer">https://cardanoscan.io/transaction/e1c7bc707e56bf37b4325dc4b7fe524eafe8ca746e54746d60b321588ffebb6c?tab=tokenmint</a></p>
<p>I tried making the metadata look identical in structure but cardanoscan says my transaction only minted 1 coin.</p>
<p>I want my mint transaction to have multiple asset names.</p>

<nft><native-assets><metadata><minting><developers>
How to mint multiple NFT assets in the same transaction?
# How to mint multiple NFT assets in the same transaction?

(Asked by: username_0 on 2021-11-05)

The developer guide doesn't cover this.

Here is an example of what I'm trying to do:
<https://cardanoscan.io/transaction/e1c7bc707e56bf37b4325dc4b7fe524eafe8ca746e54746d60b321588ffebb6c?tab=tokenmint>

I tried making the metadata look identical in structure but cardanoscan says my transaction only minted 1 coin.

I want my mint transaction to have multiple asset names.

**Tags:** nft, native-assets, metadata, minting, developers

---

## 1 answers

### Answer by username_1 on 2021-11-05. Score: 6

The process is the same but you need to specify in your cardano-cli transaction build command, all your assets to mint. For example:
cardano-cli transaction build-raw \
  --fee 197797 \
  --tx-in 6af4fea10fe3fd7120ab7e3f5361ae15d898f4fa6ebddcf585a80865010722dd#0 \
  --tx-out $(cat key1/payment.addr)+15850022+"1 $(cat policy.id).nft1"+"1 $(cat policy.id).nft2" \
  --mint="1 $(cat policy.id).nft1"+"1 $(cat policy.id).nft2" \
  --minting-script-file policy.json \
  --metadata-json-file metadata.json \
  --invalid-hereafter=41797828 \
  --out-file transaction.raw

And of course, modify your metadata to have all your assets.
UPDATE
Consider that from cardano-cli v 1.31, your asset names should be  base16-encoded, this is only for the build-raw command.
Your metadata.json should look like this:
{
    "721": {
        "1573568cde0f3c340266e50f0d108795f5e4190de939081f15287a24": {
            "nft1": {
                "name": "nft#00001",
                "image": "ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGAs",
                "mediaType": "image/gif",
                "description": "My TEST NFT 00001",
                "propety1": "Serie 1",
                "propety2": "Red"
            },
            "nft2": {
                "name": "nft#00002",
                "image": "ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGEs",
                "mediaType": "image/gif",
                "description": "My TEST NFT 00002",
                "propety1": "Serie 1",
                "propety2": "Black"
            }
        }
    }
}

> **Comments:**
> **username_2**: Can you include here an example of what metadata.json might look like for multiple nfts?  
> **username_1**: Done, check my updated answer.  

---

