---
name: collection-launch
description: Prepare NFT collection images, IPFS uploads and token metadata for the Bazarr Create Collection ERC-721 flow. Use for creator launch preparation with Pinata, Filebase or another IPFS provider.
---

# Prepare a collection launch

Deliver a validated collection package and the exact values to paste into Create Collection. This skill is preparation guidance, not authorization to deploy a contract, sign a transaction or buy storage.

## Establish the token mapping

Confirm the source image location, collection name, description, intended supply, traits (if any), image order and storage provider. Current Create Collection supports 1–10,000 tokens, starting at ID 1. If order is unspecified, propose natural filename order and record it before renaming. Never invent traits or silently shuffle. Copy original images into a new output directory; preserve originals. Record token ID, source filename, output filename and SHA-256 in a manifest. Do not infer token IDs from filesystem enumeration order. Keep the manifest outside uploaded metadata.

## Upload images first

Choose either approach according to the provider's actual upload result:

- Directory CID: record each full URI, e.g. ipfs://<images-root>/1.png. Verify whether the root contains files directly or a nested images directory.
- Individual file CIDs: record token-to-image mapping, e.g. {"1":"ipfs://<file-cid>","2":"ipfs://<other-file-cid>"}. Never append /1.png to a raw file CID. This works with Filebase individual objects and Pinata Groups. A bucket, prefix or Group ID is not an IPFS directory CID.

Use public IPFS storage, not private or expiring download links. Without authorized upload tools/credentials, provide the exact directory to upload, the provider's documented route and the result to return (directory CID or filename-to-CID export). Resume from the manifest; never fabricate CIDs. Keep credentials out of generated files and browser code.

Pinata supports folder uploads as well as individual public files. For Filebase, separate S3 object uploads do not produce a shared directory root; its documented CAR directory upload can return one. Use a documented directory upload/CAR or pin a real IPFS directory root when a shared CID is needed. A ZIP upload alone is an archive, not a browsable IPFS directory. Verify current APIs before performing uploads:
- https://docs.pinata.cloud/
- https://filebase.com/docs/legacy/ipfs/pinning/pinning-files

## Build metadata after image URIs exist

Create metadata/1 through metadata/N as extensionless JSON files, plus metadata/collection. Token JSON includes name, description, image and optionally creator-supplied attributes [{"trait_type":"Background","value":"Blue"}] and external_url. Collection JSON includes name, description, image (the selected collection PFP) and optionally external_link. No placeholders or local paths in final URIs.

For basic collections, run the included standard-library Python helper:

```sh
python3 scripts/build_metadata.py --images image-uris.json --name "My Collection" --description "Description" --out prepared/metadata
```

image-uris.json is the explicit object mapping consecutive IDs starting at 1 to full ipfs:// or https:// image URIs. The helper uses token 1 as PFP; edit collection/image if the creator chooses another. Add supplied traits to the appropriate token files afterward; validate their mapping. The helper refuses to overwrite output. Never include keys, manifests or source files in metadata/.

## Upload metadata as a real directory

Even when images have individual CIDs, this Create Collection requires a common metadata base URI. Upload the metadata directory via Pinata's public folder upload, Filebase's documented directory CAR flow, or another provider that preserves an IPFS directory. If the chosen provider cannot produce a root, use a compatible directory provider for metadata with the creator's agreement. Separate JSON CIDs cannot be pasted as a base URI in this flow.

Verify via the actual public gateway: <base>/1, every token through <base>/N and <base>/collection return parseable JSON; all image URIs resolve to the intended media. Use bounded concurrency, report missing files and do not claim complete verification from a sample. Ensure no unintended nested directory or .json suffix. Supply must equal token file count. CID changes after edits; re-upload modified metadata and use the new root.

## Handoff

Provide: output directory, manifest, supply, storage method, image URI map, metadata root CID, public metadata folder gateway URL with trailing slash, collection JSON URL, PFP URL, verification results and any pending creator action. The UI appends decimal token IDs without .json and defaults collection URI to <base>/collection. Paste the metadata folder URL into Metadata folder link, the chosen square PFP into Collection PFP link, and token count into Total supply. Preserve a provider gateway when needed for availability. Stop at ready-to-review launch inputs unless deployment was separately requested. Do not use the app's Randomize action unless the creator requests a randomized order.
