Blog
4 min readOctoPeeps team

Pin to Octopin from Kubo and IPFS Desktop with the Pinning Service API

Octopin now supports the standard IPFS Pinning Service API. Create an API key, connect Kubo or IPFS Desktop, and pin from the command line or any script.

Octopin now speaks the standard IPFS Pinning Service API. In practice that means you can pin to Octopin straight from the IPFS tools you already use: the ipfs command line (Kubo), IPFS Desktop, and any script that can send an HTTP request. No dashboard clicking required.

What is the Pinning Service API?

Every pinning provider used to have its own API, so every tool needed a custom integration per provider. The IPFS project fixed that with one shared spec for the basics: pin this CID, list my pins, remove this pin. Kubo and IPFS Desktop have it built in. Any provider that implements the spec works with them, and you can switch providers by changing one URL and one key.

What you can do with it

Step 1: create an API key

Sign in to Octopin, go to Settings and create a key under api keys. Give it a name you will recognise later, like "laptop" or "ci", and copy it right away. It is only shown once. If a key ever leaks, revoke it in the same place and it stops working immediately.

Step 2a: connect Kubo

Register Octopin once:

ipfs pin remote service add octopin https://api.octopin.app/psa <your-api-key>

Then pin anything by CID:

ipfs pin remote add --service=octopin --name=my-collection <CID>

Kubo waits until the pin is done. For big folders add --background and check on it later with ipfs pin remote ls --service=octopin --status=queued,pinning,pinned.

Step 2b: connect IPFS Desktop

  1. Open Settings and scroll to Pinning services.
  2. Click Add service, then Custom.
  3. Nickname octopin, API endpoint https://api.octopin.app/psa, and your API key as the secret access token.
  4. In the Files tab, open the menu on a file or folder, choose Set pinning and tick octopin.

Step 2c: use it from a script

curl -X POST https://api.octopin.app/psa/pins \
  -H "Authorization: Bearer $OCTOPIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"<CID>","name":"metadata"}'

The same key can also upload new files with POST https://upload.octopin.app/api/upload. All the options are in the API docs.

Good to know

Questions or something not working with your tool? Tell us on Discord or through the contact page.

Try Octopin for free

1 GB free. Unlimited bandwidth. No credit card.