Quick Start
Get started with the Pinarkive API in four steps. You'll create an account, get an API key, upload a file, and receive a content identifier (CID) to access your file.
Base URL
All API requests use this base URL:
https://api.pinarkive.com/api/v3Authentication
All requests require an API key. Send it in the header:
Authorization: Bearer YOUR_API_KEYOr use the alternative header:
X-API-Key: YOUR_API_KEYStep 1 — Create account
Sign up at pinarkive.com (opens in a new tab) or your Pinarkive dashboard. Confirm your email if required.
Step 2 — Generate API key
- Log in to the Pinarkive dashboard (opens in a new tab).
- Go to Settings or API Keys.
- Create a new API key and assign the scope
files:write(andfiles:readif you want to list uploads). - Copy the key and store it securely. You won't be able to see it again.
You can also generate keys via the API: POST /api/v3/tokens/generate (see Authentication and Tokens).
Step 3 — Upload a file
Send a single file with a POST request to /files using multipart form data.
Request
curl -X POST https://api.pinarkive.com/api/v3/files \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@example.png"Use either Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY. Replace YOUR_API_KEY with your key and example.png with your file path.
Step 4 — Get CID / file identifier
The API responds with the IPFS content identifier and metadata.
Response
{
"cid": "bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
"clusterId": "cl0-global",
"expiresAt": null
}| Field | Description |
|---|---|
cid | IPFS content identifier — use this to access or share the file |
clusterId | Cluster where the file was pinned |
expiresAt | Expiration time if a timelock was set; otherwise null |
View your file: Open the URL in a browser or use it in your app:
https://gateway.pinarkive.com/ipfs/<cid>Replace <cid> with the cid value from the response.
Next steps
- Authentication — Base URL, headers, API keys, and scopes
- Upload file — Full request/response reference with cURL, fetch, and Axios
- Error handling — Error codes and how to handle them
- Rate limits — Limits and response headers