Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kleros-mintlify-changelog-2026-05-12-1778458371.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.


title: “API Reference” description: “HTTP API reference for the Kleros IPFS gateway — upload and retrieve dispute templates, evidence, and policy documents”

Every Kleros integration that involves jurors needs off-chain content: dispute templates that tell jurors what question to answer, evidence files that parties submit, and policy documents that define ruling criteria. All of this content is stored on IPFS and referenced on-chain by its CID. The Kleros IPFS gateway at cdn.kleros.link is the recommended gateway for uploading and serving this content.

Base URL

https://cdn.kleros.link

Endpoints

Upload to IPFS

Upload dispute templates, evidence files, and policy documents

Fetch from IPFS

Retrieve content by IPFS CID hash

Common content types

ContentWhere it’s usedSchema
Dispute template JSONDisputeTemplateRegistry.setDisputeTemplate()Dispute Templates
Evidence file JSONEvidenceModule — submitted by parties during a disputeEvidence Format
Policy document JSONpolicyURI field in dispute templatesPolicy Format
Item attachmentCurate V2 item metadataColumn-based JSON schema

Uploading content — SDK

The @kleros/kleros-sdk wraps the gateway upload in a typed helper:
import { uploadToIPFS } from "@kleros/kleros-sdk";

const evidence = {
  name: "Transaction Screenshot",
  description: "Shows the buyer confirmed delivery on 2024-01-15.",
  fileURI: "/ipfs/QmImageHash...",
  evidenceType: "Image"
};

const { cids } = await uploadToIPFS(JSON.stringify(evidence));
const evidenceURI = cids[0]; // "/ipfs/Qm..."

Redundant pinning

Content uploaded to the Kleros gateway is pinned by Kleros infrastructure. For production integrations, also pin with a secondary provider so your content stays available if the Kleros gateway is temporarily unreachable:
// Example: pin with Pinata in addition to Kleros gateway
const pinataRes = await pinata.pinJSONToIPFS(evidence);
// Both pins point to the same CID
Unpinned IPFS content can disappear if no node is serving it. Always pin from at least two independent sources in production.