IPFS Files API

The Files API from IPFS — 10 operation(s) for files.

Operations 10

POST /api/v0/files/chcid Files/chcid #
POST /api/v0/files/cp Files/cp #
POST /api/v0/files/flush Files/flush #
POST /api/v0/files/ls Files/ls #
POST /api/v0/files/mkdir Files/mkdir #
POST /api/v0/files/mv Files/mv #
POST /api/v0/files/read Files/read #
POST /api/v0/files/rm Files/rm #
POST /api/v0/files/stat Files/stat #
POST /api/v0/files/write Files/write #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ipfs-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ipfs-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IPFS RPC Files API
  version: v0
  description: 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 you can from the command line.
  x-providerName: IPFS
  x-logo:
    url: https://raw.githubusercontent.com/ipfs/ipfs-docs/55fe8bc6a53ba3b9023951fb4b432efbbc81fba5/docs/.vuepress/public/images/ipfs-logo.svg
servers:
- description: Local IPFS node
  url: http://localhost:5001
- description: Local IPFS node
  url: http://127.0.0.1:5001
- description: Infura hosted IPFS node
  url: https://ipfs.infura.io:5001
tags:
- name: Files
paths:
  /api/v0/files/chcid:
    post:
      operationId: files/chcid
      description: Change the CID version or hash function of the root node of a given path.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-chcid
      parameters:
      - name: arg
        in: query
        description: Path to change.
        schema:
          type: string
          default: '''/'''
      - name: cid-version
        in: query
        description: Cid version to use. (experimental).
        x-experimental: true
        schema:
          type: integer
      - name: hash
        in: query
        description: Hash function to use. Will set Cid version to 1 if used. (experimental).
        x-experimental: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/chcid
      x-summary-source: derived
  /api/v0/files/cp:
    post:
      operationId: files/cp
      description: Add references to IPFS files and directories in MFS (or copy within MFS).
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-cp
      parameters:
      - name: arg
        in: query
        description: 'arg0: Source IPFS or MFS path to copy.


          arg1: Destination within MFS.'
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: parents
        in: query
        description: Make parent directories as needed.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/cp
      x-summary-source: derived
  /api/v0/files/flush:
    post:
      operationId: files/flush
      description: Flush a given path's data to disk.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-flush
      parameters:
      - name: arg
        in: query
        description: Path to flush.
        schema:
          type: string
          default: '''/'''
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Cid: <string>
      tags:
      - Files
      summary: Files/flush
      x-summary-source: derived
  /api/v0/files/ls:
    post:
      operationId: files/ls
      description: List directories in the local mutable namespace.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-ls
      parameters:
      - name: arg
        in: query
        description: Path to show listing for. Defaults to '/'.
        schema:
          type: string
      - name: long
        in: query
        description: Use long listing format.
        schema:
          type: boolean
      - name: U
        in: query
        description: Do not sort; list entries in directory order.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Entries:
                - Hash: <string>
                  Name: <string>
                  Size: <int64>
                  Type: <int>
      tags:
      - Files
      summary: Files/ls
      x-summary-source: derived
  /api/v0/files/mkdir:
    post:
      operationId: files/mkdir
      description: Make directories.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-mkdir
      parameters:
      - name: arg
        in: query
        description: Path to dir to make.
        required: true
        schema:
          type: string
      - name: parents
        in: query
        description: No error if existing, make parent directories as needed.
        schema:
          type: boolean
      - name: cid-version
        in: query
        description: Cid version to use. (experimental).
        x-experimental: true
        schema:
          type: integer
      - name: hash
        in: query
        description: Hash function to use. Will set Cid version to 1 if used. (experimental).
        x-experimental: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/mkdir
      x-summary-source: derived
  /api/v0/files/mv:
    post:
      operationId: files/mv
      description: Move files.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-mv
      parameters:
      - name: arg
        in: query
        description: 'arg0: Source file to move.


          arg1: Destination path for file to be moved to.'
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/mv
      x-summary-source: derived
  /api/v0/files/read:
    post:
      operationId: files/read
      description: Read a file from MFS.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-read
      parameters:
      - name: arg
        in: query
        description: Path to file to be read.
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: Byte offset to begin reading from.
        schema:
          type: integer
      - name: count
        in: query
        description: Maximum number of bytes to read.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/read
      x-summary-source: derived
  /api/v0/files/rm:
    post:
      operationId: files/rm
      description: Remove a file from MFS.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-rm
      parameters:
      - name: arg
        in: query
        description: File to remove.
        required: true
        schema:
          type: string
      - name: recursive
        in: query
        description: Recursively remove directories.
        schema:
          type: boolean
      - name: force
        in: query
        description: Forcibly remove target at path; implies -r for directories.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/rm
      x-summary-source: derived
  /api/v0/files/stat:
    post:
      operationId: files/stat
      description: Display file status.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-stat
      parameters:
      - name: arg
        in: query
        description: Path to node to stat.
        required: true
        schema:
          type: string
      - name: format
        in: query
        description: 'Print statistics in given format. Allowed tokens: <hash> <size> <cumulsize> <type> <childs>. Conflicts with other format options.'
        schema:
          type: string
          default: '<hash>

            Size: <size>

            CumulativeSize: <cumulsize>

            ChildBlocks: <childs>

            Type: <type>'
      - name: hash
        in: query
        description: Print only hash. Implies '--format=<hash>'. Conflicts with other format options.
        schema:
          type: boolean
      - name: size
        in: query
        description: Print only size. Implies '--format=<cumulsize>'. Conflicts with other format options.
        schema:
          type: boolean
      - name: with-local
        in: query
        description: Compute the amount of the dag that is local, and if possible the total size.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Blocks: <int>
                CumulativeSize: <uint64>
                Hash: <string>
                Local: <bool>
                Size: <uint64>
                SizeLocal: <uint64>
                Type: <string>
                WithLocality: <bool>
      tags:
      - Files
      summary: Files/stat
      x-summary-source: derived
  /api/v0/files/write:
    post:
      operationId: files/write
      description: Append to (modify) a file in MFS.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-write
      parameters:
      - name: arg
        in: query
        description: Path to write to.
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: Byte offset to begin writing at.
        schema:
          type: integer
      - name: create
        in: query
        description: Create the file if it does not exist.
        schema:
          type: boolean
      - name: parents
        in: query
        description: Make parent directories as needed.
        schema:
          type: boolean
      - name: truncate
        in: query
        description: Truncate the file to size zero before writing.
        schema:
          type: boolean
      - name: count
        in: query
        description: Maximum number of bytes to read.
        schema:
          type: integer
      - name: raw-leaves
        in: query
        description: Use raw blocks for newly created leaf nodes. (experimental).
        x-experimental: true
        schema:
          type: boolean
      - name: cid-version
        in: query
        description: Cid version to use. (experimental).
        x-experimental: true
        schema:
          type: integer
      - name: hash
        in: query
        description: Hash function to use. Will set Cid version to 1 if used. (experimental).
        x-experimental: true
        schema:
          type: string
      requestBody:
        description: Argument `data` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'.
        content: {}
      responses:
        '200':
          description: Successful response
      tags:
      - Files
      summary: Files/write
      x-summary-source: derived
externalDocs:
  url: https://docs.ipfs.tech/reference/kubo/rpc/