Back

Blog details

AIOZ Pin for Developers: API, SDK, and CLI Explained

AIOZ Network
4 min readJuly 29, 2026
aioz-pindeveloperpillar
Holographic hexagon tiles representing AIOZ Pin's IPFS storage network

AIOZ Pin for developers breaks down into three layers: a REST API with 8 distinct sections, an official Node.js SDK that wraps the most common calls into 14 methods, and a standalone CLI tool for scripting from the terminal. All three authenticate the same way, through a scoped API key you generate from your account. This guide covers how the pieces fit together, so you can pick the right layer for what you're building instead of guessing.

TL;DR:
  • AIOZ Pin's API covers 8 sections: Users, ApiKeys, Pinning, Nft, Gateways, Pinning Services API, Billing, Image Optimization
  • The Node.js SDK (@aioznetwork/aioz-pin-sdk) wraps common operations into methods like pinFilesToIPFS() and pinNft()
  • API keys carry granular scopes, so you can issue a key that can only pin, not delete or manage billing

AIOZ Pin's API Surface, Section by Section

The REST API is organized into 8 sections, each covering a distinct area:

Section Covers
Users Account info (GET /users/me), profile updates (PUT /users/editProfile)
ApiKeys Generating, listing, and revoking scoped API keys
Pinning Core pin, list, and unpin operations
Nft NFT-specific pinning and metadata operations
Gateways Managing dedicated gateway configuration
Pinning Services API The standard-compliant endpoint, covered in full in our IPFS Pinning Service API guide
Billing Usage history, top-ups, and current-month spend
Image Optimization On-the-fly image transforms served through the gateway

Every request authenticates with Authorization: Bearer <access_token>. If you're building a script that only needs to pin files and never touch billing or user settings, you don't need the full picture, just the Pinning and ApiKeys sections.

Scoped API Keys, Not One Master Secret

Generating a key is a POST to /apiKeys with a scopes object, and the scopes are genuinely granular: admin (boolean, full access), data (with pin_list and nft_list read permissions), pinning (with unpin, pin_by_hash, and pin_file_to_ipfs permissions), and pin_nft (with unpin_nft and pin_nft_to_ipfs permissions). AIOZ Pin's docs specify that when setting permissions, you need to include all properties, admin keys are the one exception where sub-properties can be omitted.

In practice, this means a key handed to a CI pipeline that only uploads build artifacts can be scoped to pinning alone, with no ability to unpin existing content or touch NFT operations, meaningfully different from generating one admin key and using it everywhere.

The Node.js SDK: 14 Methods Over the Same API

The official SDK, @aioznetwork/aioz-pin-sdk (currently v1.0.1), wraps the REST API into a client object:

import AiozPinClient from '@aioznetwork/aioz-pin-sdk'
const client = new AiozPinClient('api-key', 'secret-key')

From there, the SDK covers pinning (pinFilesToIPFS(), pinFolderToIPFS(), pinByHash(), unpin()), NFTs (pinNft(), pinNftByStreamMetadata(), pinNftByHash(), pinNftByHashAndMetadataStream(), unpinNft()), and retrieval (getPinList(), getPinByID(), getPinByCID(), optimizeImage()), plus testAuthentication() to verify your keys work before you build anything on top of them. One naming note worth flagging: AIOZ's own quick-start guide writes the file-pinning method as the singular pinFileToIPFS, but the actual published package ships the plural pinFilesToIPFS(), which takes an array of file paths. Use the plural form, it's what the real package exports.

The CLI: Scripting Without Node.js

A separate command-line tool lives on the AIOZNetwork GitHub org for pinning from a shell script or CI pipeline without pulling in the Node.js SDK:

pinning login --key "your_key" --secret "your_secret"
pinning pin --file afile.txt
pinning list-pins
pinning unpin --id=00000000-0000-0000-0000-000000000000

This is the right layer if you're pinning from a build step, a cron job, or any environment where adding a Node.js dependency is more overhead than it's worth.

Choosing a Layer

Use the REST API directly if you're not in a Node.js environment, or you need an endpoint the SDK doesn't wrap yet, the Pinning Services API standard endpoint covered separately is a good example since it's meant to be called directly by IPFS-compliant tooling. Use the SDK if you're building a Node.js application and want typed, higher-level methods instead of raw HTTP calls, particularly for NFT pinning where pinNft() handles asset and metadata together in one call. Use the CLI for scripts and pipelines where you want pinning without adding a dependency.

Frequently Asked Questions

What are the 8 sections of AIOZ Pin's API? Users, ApiKeys, Pinning, Nft, Gateways, Pinning Services API, Billing, and Image Optimization, each covering a distinct area of functionality.

What is the correct Node.js SDK package name? @aioznetwork/aioz-pin-sdk. The unscoped name aioz-pin-sdk shown in some AIOZ documentation does not exist as a real package.

Are AIOZ Pin API keys scoped, or is it all-or-nothing access? Scoped. You can generate a key limited to specific permissions, like pinning without unpin or billing access, rather than one master key with full access to everything.

Should I use the SDK or call the REST API directly? Use the SDK if you're in Node.js and want higher-level methods. Call the REST API directly for other languages, or for endpoints like the Pinning Services API standard that are meant to be called directly by IPFS tooling.

Does AIOZ Pin have a command-line tool? Yes, a separate CLI on the AIOZNetwork GitHub org, useful for pinning from shell scripts or CI pipelines without adding a Node.js dependency.

What's the exact method name for pinning multiple files in the SDK? pinFilesToIPFS({filePaths, options}). AIOZ's own quick-start guide shows this as the singular pinFileToIPFS, but the real published package uses the plural form.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

How AIOZ Pin Billing Works: Storage, Bandwidth, Pins

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.

4 min readAugust 07, 2026
blog thumbnail

Getting Started with the AIOZ Pin Node.js SDK: A Guide

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.

4 min readAugust 06, 2026
blog thumbnail

AIOZ Pin for Developers: API, SDK, and CLI Explained

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.

4 min readAugust 05, 2026
blog thumbnail

IPFS Pinning Service API: What It Is, Why It Matters

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 min readAugust 04, 2026
blog thumbnail

Best NFT.storage Alternatives in 2026 (Featuring AIOZ Pin)

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

5 min readAugust 03, 2026
blog thumbnail

How AIOZ Pin Works: Pinning, Gateways, and NFT Tools

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.

5 min readAugust 02, 2026