
Pinning an ERC-8004 Registration File to IPFS is the part of setting up an AI agent's on-chain identity that has nothing to do with Solidity or a wallet, it's a JSON file and a pin operation, the same workflow this blog has already covered for NFT metadata. This walks through building the file, pinning it with AIOZ Pin, verifying the pin resolved, and pointing the Identity Registry's register() call at the result.
TL;DR:
type, name, description, services, x402Support, active)pinFilesToIPFS() from the AIOZ Pin Node.js SDKgetPinByCID() before using it anywhereregister(agentURI, metadata) with agentURI set to ipfs://{cid}Start with the JSON document itself, following ERC-8004's defined schema:
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "Research Assistant Agent",
"description": "An agent that summarizes and cross-references academic papers",
"image": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
"services": [
{ "type": "A2A", "endpoint": "https://agent.example.com/a2a" }
],
"x402Support": true,
"active": true,
"registrations": []
}
Save this as a local file, registration.json, before moving to the pinning step. The registrations array stays empty until after you've actually called register() on-chain, since it needs the agentId that call returns, you'll come back and update this file with a second pin once you have it.
import AiozPinClient from '@aioznetwork/aioz-pin-sdk'
import fs from 'fs'
const client = new AiozPinClient('your-api-key', 'your-secret-key')
const result = await client.pinFilesToIPFS({
filePaths: ['./registration.json'],
options: {
name: 'agent-registration-v1',
keyvalues: { agentName: 'Research Assistant Agent' }
}
})
console.log(result.cid)
This is the exact same pinFilesToIPFS() method covered for general file pinning, a Registration File is just a JSON file as far as the pinning layer is concerned. The keyvalues metadata is optional but useful if you're managing pins for multiple agents and want to filter by agent name later through getPinList().
const pin = await client.getPinByCID(result.cid)
console.log(pin.status)
Don't skip this before wiring the CID into an on-chain transaction. A pin that's still processing or failed silently is a much cheaper problem to catch here than after you've spent gas registering a broken agentURI.
This step happens outside AIOZ Pin, through whatever web3 library your project already uses (ethers.js, viem, or similar) to call the Identity Registry contract's register() function:
const agentURI = `ipfs://${result.cid}`
const tx = await identityRegistry.register(agentURI, [])
const receipt = await tx.wait()
// the returned agentId is available in the transaction receipt's emitted event
AIOZ Pin's role ends at producing a working ipfs://{cid} reference, the actual on-chain registration is a standard contract call against whatever address hosts the Identity Registry you're using, not something AIOZ Pin's tooling handles directly.
If you want the Registration File itself to reference its own on-chain registration, update the registrations array with the agentId and registry address from step 4, then pin the updated file the same way as step 2. This produces a new CID, since changing the content changes the CID, so you'd call setAgentURI() on the Identity Registry to point at the updated file if you take this step.
What method do I use to pin an ERC-8004 Registration File? pinFilesToIPFS() from the AIOZ Pin Node.js SDK, the same method used for pinning any file, a Registration File is just a JSON document at the pinning layer.
Do I need to verify the pin before using the CID? Yes. Call getPinByCID() to confirm the pin resolved before referencing it in an on-chain register() transaction, catching a failed pin here is far cheaper than after spending gas on a broken reference.
Does AIOZ Pin handle the on-chain agent registration too? No. AIOZ Pin pins the Registration File and gives you a CID. The actual register() call to the Identity Registry contract happens through a separate web3 library like ethers.js or viem.
What goes in the registrations array of a Registration File? The agentId and registry address once you've completed on-chain registration. It's fine to leave this empty for the first pin, since you need the on-chain agentId before you can fill it in.
Can I update a Registration File after it's pinned? Not in place. Since a CID is derived from the file's content, any change produces a new CID. Pin the updated file separately, then call setAgentURI() on the Identity Registry to point at the new CID.
pinFilesToIPFS() reference used in step 2
AIOZ Pin billing runs on flat per-TB rates and a wallet balance, not subscription tiers. Here is exactly how storage, bandwidth, and pins get charged.

A hands-on guide to the AIOZ Pin Node.js SDK: the correct install command, pinning files and NFTs, checking pin status, and every method with real code.

AIOZ Pin for developers means 8 API sections, a Node.js SDK with 14 methods, and a CLI tool. See how scoped API keys tie all three together for real projects.

The IPFS Pinning Service API is a shared standard for pinning providers. Here is what it defines, and how AIOZ Pin and Pinata both implement it the same way.

4 real NFT.storage alternatives, AIOZ Pin, Pinata, Filebase, and Lighthouse, compared on price and features after NFT.storage stopped new uploads in 2024.

AIOZ Pin runs on three parts: Files Pinning, NFT Management, and Premium Gateways. Here is how each actually works, with real 2026 pricing and API details.