The official JavaScript client library for the Kubo RPC API is kubo-rpc-client (formerly js-kubo-rpc-client). It allows Node.js and browser applications to control a running Kubo IPFS daemon via HTTP.

Installation and Setup

Install via npm:

npm install kubo-rpc-client

Basic Usage

Create a client instance and call API methods:

import { create } from 'kubo-rpc-client';

// Connect to local daemon (default: http://localhost:5001)
const client = create();

// Example: Add content
const { cid } = await client.add('Hello world!');
console.log(cid.toString());

Configuration

The create() function accepts a URL string, Multiaddr, or an options object:

  • URL: create('http://127.0.0.1:5001/api/v0')

  • Options: { host: 'localhost', port: 5001, protocol: 'http' }

  • Custom Headers: Pass { headers: { authorization: 'Bearer <token>' } } for nodes with API authorizations enabled.

Browser Usage

Load via CDN script tag, exposing KuboRpcClient in the global namespace:

<script src="https://unpkg.com/kubo-rpc-client/dist/index.min.js"></script>
<script>
  const client = KuboRpcClient.create({ host: 'localhost', port: 5001 });
</script>

Key Notes

  • Not Core API: This library implements the HTTP RPC API only, not the full IPFS Core API (which is available via Helia or js-ipfs).

  • Daemon Required: A local or remote Kubo daemon must be running and accessible on the specified port (default 5001).

  • Utilities: Includes helpers like globSource and urlSource for adding files.

AI-generated answer. Please verify critical facts.
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client
GitHub - ipfs/js-kubo-rpc-client: A client library for the Kubo RPC API
options can be a String, a URL or a Multiaddr which will be interpreted as the address of the IPFS node we wish to use the API of. Alternatively it can be an object which may have the following keys: ... import { create } from 'kubo-rpc-client' // connect to the default API address http://localhost:5001 const client = create() // connect to a different API const client = create({ url: "http://127.0.0.1:5002/api/v0" }); // connect using a URL const client = create(new URL('http://127.0.0.1:5002')) // call Core API methods const { cid } = await client.add('Hello world!')
Starred by 50 users
Forked by 16 users
Languages   TypeScript 99.6% | JavaScript 0.4% | TypeScript 99.6% | JavaScript 0.4%
🌐
IPFS
docs.ipfs.tech › reference › js › api
IPFS in JS | IPFS Docs
@helia/verified-fetch (opens new window): A fetch (opens new window)-like API for obtaining verified & trustless IPFS content on the web · js-kubo-rpc-client (opens new window): A JS client library for the Kubo RPC API
🌐
npm
npmjs.com › package › kubo-rpc-client
kubo-rpc-client - npm
Call this on your client instance to return an object containing the host, port, protocol and api-path. Aside from the default export, kubo-rpc-client exports various types and utilities that are included in the bundle:
      » npm install kubo-rpc-client
    
Published   Jan 23, 2026
Version   6.1.0
🌐
CodeSandbox
codesandbox.io › examples › package › kubo-rpc-client
kubo-rpc-client examples - CodeSandbox
AboutA client library for the Kubo RPC API20,182Weekly Downloads · Latest version6.1.0 · LicenseApache-2.0 OR MIT · External Links · github.com/ipfs/js-kubo-rpc-client#readme · github.com/ipfs/js-kubo-rpc-client · github.com/ipfs/js-kubo-rpc-client/issues ·
🌐
SourceForge
sourceforge.net › projects › kubo-rpc-client.mirror
kubo-rpc-client download | SourceForge.net
A client library for the Kubo RPC API. Loading this module through a script tag will make it's exports available as KuboRpcClient in the global namespace. This client is still a work in progress and in active development.
🌐
IPFS
ipfs.github.io › js-kubo-rpc-client
kubo-rpc-client
Call this on your client instance to return an object containing the host, port, protocol and api-path. Aside from the default export, kubo-rpc-client exports various types and utilities that are included in the bundle:
🌐
Metamask
docs.metamask.io › services › reference › ipfs › quickstart
IPFS quickstart | MetaMask developer documentation
import { create } from "kubo-rpc-client" const projectId = "<YOUR-API-KEY>"; const projectSecret = "<YOUR-API-KEY-SECRET>"; const auth = "Basic " + Buffer.from(projectId + ":" + projectSecret).toString("base64"); const client = create({ host: "ipfs.infura.io", port: 5001, protocol: "https", headers: { authorization: auth, }, }); client.pin.add("QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn").then((res) => { console.log(res); });
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client › milestone › 1
ipfs/js-kubo-rpc-client
A client library for the Kubo RPC API. Contribute to ipfs/js-kubo-rpc-client development by creating an account on GitHub.
Author   ipfs
🌐
IPFS
docs.ipfs.tech › reference › kubo › rpc
Kubo RPC API v0 reference - IPFS Docs
24 April 2026 - This document was autogenerated from v0.41.0 (opens new window). For issues and support, check out the http-api-docs (opens new window) generator on GitHub. When a Kubo IPFS node is running as a daemon, it exposes an HTTP RPC API that allows you to control the node and run the same commands ...
🌐
npm
npmjs.com › package › js-kubo-rpc-client
js-kubo-rpc-client - npm
19 August 2022 - options can be a String, a URL or a Multiaddr which will be interpreted as the address of the IPFS node we wish to use the API of. Alternatively it can be an object which may have the following keys: import { create } from 'js-kubo-rpc-client' // connect to the default API address http://localhost:5001 const client = create() // connect to a different API const client = create({ url: "http://127.0.0.1:5002/api/v0" }); // connect using a URL const client = create(new URL('http://127.0.0.1:5002')) // call Core API methods const { cid } = await client.add('Hello world!')
      » npm install js-kubo-rpc-client
    
Published   Aug 19, 2022
Version   1.0.0
Find elsewhere
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client › activity
Activity · ipfs/js-kubo-rpc-client
30 January 2025 - A client library for the Kubo RPC API. Contribute to ipfs/js-kubo-rpc-client development by creating an account on GitHub.
Author   ipfs
🌐
GitHub
github.com › ipfs › kubo › issues › 9125
Create js-kubo-rpc-client library · Issue #9125 · ipfs/kubo
19 July 2022 - ETA: 2022-12-16 Part of #8959 – based on discussions from IPFS Thing 2022 GO counterpart: #9124 Current state Kubo shares RPC client with JS-IPFS: https://www.npmjs.com/package/ipfs-http-client Aft...
Author   ipfs
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client › blob › main › package.json
js-kubo-rpc-client/package.json at main · ipfs/js-kubo-rpc-client
A client library for the Kubo RPC API. Contribute to ipfs/js-kubo-rpc-client development by creating an account on GitHub.
Author   ipfs
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client › issues
Issues · ipfs/js-kubo-rpc-client
A client library for the Kubo RPC API. Contribute to ipfs/js-kubo-rpc-client development by creating an account on GitHub.
Author   ipfs
🌐
GitHub
github.com › ipfs › js-kubo-rpc-client › blob › main › tsconfig.json
js-kubo-rpc-client/tsconfig.json at main · ipfs/js-kubo-rpc-client
A client library for the Kubo RPC API. Contribute to ipfs/js-kubo-rpc-client development by creating an account on GitHub.
Author   ipfs
🌐
IPFS Blog & News
blog.ipfs.tech › state-of-ipfs-in-js
State of IPFS in JS | IPFS Blog & News
16 March 2026 - IPFS-in-JS - This refers broadly to the development of IPFS using the JavaScript and TypeScript languages. It doesn’t mean the “js-ipfs” project or “Helia”. Delegate nodes - These are nodes that expose the /api/v0/dht/* endpoints of the Kubo RPC API (opens new window) for delegated ...
🌐
SourceForge
sourceforge.net › home › open source software › communications › file sharing › kubo-rpc-client › files
kubo-rpc-client - Browse /v6.0.1 at SourceForge.net
This is an exact mirror of the kubo-rpc-client project, hosted at https://github.com/ipfs/js-kubo-rpc-client. SourceForge is not affiliated with kubo-rpc-client.