The Pinning Services API spec is a standardized specification for developers building on top of IPFS that allows an application to integrate a pinning service without needing to learn that pinning service's unique API.
Pinata users looking to utilize the IPFS Pinning Services API can do so from our dedicated API endpoint:
To authenticate with Pinata through the Pinning Services API spec, you'll first need to have an accessToken. You can create this API token on the Pinata Keys Page.
When you create a new API key, you'll need to take note of the JWT (JSON Web Token) token that's shown to you immediately after creation. This JWT is specific to the API key and shares the same permissions.
If you ever revoke the API key for this JWT, this JWT will no longer be valid for authenticating to the Pinning Services API.
The Pinning Services API Spec uses the Bearer Token method for authentication, and you'll provide an authentication header using your JWT in the following way:
Authorization: Bearer JWTForYourAPIKey
Configuring Pinata in the IPFS Desktop App
If you are running the IPFS desktop app, you can configure your pinning service of choice within the user interface. To do so, open the app, go to your Preferences, then click Add Service:
Select Pinata as the pinning service, and then configure with your secret access token (JWT):
Configuring Pinata in the IPFS CLI
You can also pin to Pinata directly from the IPFS CLI using the ipfs command.
To add Pinata credentials, use the following command (where YOUR_JWT is the JWT token described in the “Authentication” section above):
ipfs pin remote service add pinata https://api.pinata.cloud/psa YOUR_JWT
To pin a CID to Pinata under a human-readable name: