Features
Creating a Core Collection
Last updated April 8, 2026
The createCollection instruction creates a new Core Collection account on Solana with a name, metadata URI, and optional plugins.
What You'll Learn
- Create a simple Collection with a name and URI
- Create a Collection with the Royalties plugin attached
- Handle common creation errors
Summary
createCollection deploys a new Collection account that groups Core Assets under shared metadata and plugins.
- Requires a fresh keypair as the collection address — reusing an existing address will fail
- Accepts optional plugins at creation time
- Costs ~0.0015 SOL in rent
- The payer becomes the
updateAuthorityby default
Quick Start
- Install:
npm install @metaplex-foundation/mpl-core @metaplex-foundation/umi - Upload collection metadata JSON to get a URI
- Call
createCollection(umi, { collection, name, uri }) - Pass the collection address when creating Assets
Jump to: Simple Collection · With Plugins · Common Errors
Prerequisites
- Umi configured with a signer and RPC connection — see JavaScript SDK
- SOL for transaction fees (~0.002 SOL per collection)
- Metadata JSON uploaded to Arweave or IPFS with a collection image and name
Creating a Simple Collection
createCollection requires a name, a metadata uri, and a new keypair as the collection signer.
1import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
2import { createCollection } from '@metaplex-foundation/mpl-core'
3import { mplCore } from '@metaplex-foundation/mpl-core'
4import { generateSigner } from '@metaplex-foundation/umi'
5
6// Initialize UMI
7const umi = createUmi('https://api.devnet.solana.com')
8 .use(mplCore())
9
10// Generate a new keypair for the collection
11const collectionSigner = generateSigner(umi)
12
13// Create a new Collection
14await createCollection(umi, {
15 collection: collectionSigner,
16 name: 'My Collection',
17 uri: 'https://example.com/collection.json',
18}).sendAndConfirm(umi)
19
20console.log('Collection created:', collectionSigner.publicKey)
The collection parameter must be a fresh keypair each time. Reusing an existing address will fail with Collection account already exists.
Creating a Collection with Plugins
Pass a plugins array to createCollection to attach plugins at creation time. The example below attaches the Royalties plugin.
Create a Core Collection with the Royalties plugin
import { generateSigner, publicKey } from '@metaplex-foundation/umi'
import { createCollection, ruleSet } from '@metaplex-foundation/mpl-core'
const collectionSigner = generateSigner(umi)
const creator1 = publicKey('11111111111111111111111111111111')
const creator2 = publicKey('22222222222222222222222222222222')
await createCollection(umi, {
collection: collectionSigner,
name: 'My NFT',
uri: 'https://example.com/my-nft.json',
plugins: [
{
type: 'Royalties',
basisPoints: 500,
creators: [
{ address: creator1, percentage: 20 },
{ address: creator2, percentage: 80 },
],
ruleSet: ruleSet('None'),
},
],
}).sendAndConfirm(umi)
Common Errors
Collection account already exists
The collection keypair was already used on this network. Generate a new signer each time:
const collectionSigner = generateSigner(umi) // Must be a unique keypair
Insufficient funds
Your payer wallet needs ~0.002 SOL. Fund it on devnet with:
solana airdrop 1 <WALLET_ADDRESS> --url devnet
Notes
- Plugins added at creation can be updated later using
updateCollectionPlugin— see Update Collection - The
updateAuthoritydefaults to the payer — pass an explicitupdateAuthorityto set a different account - All plugins available to Assets can also be applied to Collections — see Plugins Overview
Quick Reference
| Item | Value |
|---|---|
| Instruction | CreateCollectionV1 |
| JS function | createCollection |
| Required accounts | collection (new keypair), payer |
| Optional accounts | updateAuthority, systemProgram |
| Required args | name, uri |
| Optional args | plugins |
| Rent cost | ~0.0015 SOL |
| Source | GitHub |
