Content Pinning
Pinning ensures your content stays available in the IPFS network indefinitely. Bio-AI DIDs sequencer offers reliable pinning services with flexible options for different content types and storage durations.
What is Pinning?
In IPFS, content is stored in a distributed network of nodes. By default, this content might be removed during garbage collection if no node is actively keeping it. Pinning is the process of telling IPFS nodes to keep specific content, ensuring it remains available.
Why Pinning Matters: Without pinning, your content might disappear from the network if no nodes are keeping it cached, making links to your content break over time.
Pinning with Bio-AI DIDs sequencer
Pinning is automatic
There is no separate "pin" call. Anything you upload through POST /api/upload is pinned as part of the write - content is durable the moment the upload returns a CID.
# Uploading pins. Nothing else to do.
curl -X POST https://api.ekayana.com/api/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@dataset.csv"Listing what you have pinned
curl https://api.ekayana.com/api/pins -H "Authorization: Bearer $TOKEN"Unpinning is reference-counted
POST /api/delete with { "cid": "…" } drops your claim on the content. Because a CID is a hash, two users who upload identical bytes share one object - so the content is only unpinned from IPFS once the last owner releases it. Your delete never destroys a colleague's copy.
Pin Management
- List pins - View all your pinned content
- Check pin status - Monitor the replication status of your pins
- Unpin content - Remove pins when no longer needed
- Repin content - Refresh pin duration
Pin Options
| Option | Description |
|---|---|
name | A human readable name for the pin |
expires | When the pin should expire (e.g., '30d', '1y') |
replicas | Number of nodes to replicate content across |
metadata | Custom metadata to associate with the pin |
Example with Options
const pinOptions = {
name: 'Project Logo',
expires: '365d',
replicas: 3,
metadata: {
project: 'My App',
version: '1.0'
}
};
const result = await client.pin('QmExampleCID123456789', pinOptions);Pinning from Upload
When uploading content, it's automatically pinned:
const result = await client.upload('/path/to/file.png', {
name: 'Product Image',
expires: '180d'
});
console.log('Content CID:', result.cid);
console.log('Pin ID:', result.pinId);