Operator hub

SDK and package references

devnet · next · development

Last updated 2026-10-30

SDK and package references

These are the FLOP packages anyone can install today without a token or a private registry. Each name links to its registry page, which carries the full reference README for the published version. Versions below are the current releases as of 2026-10-30; the registry is authoritative if they differ.

FLOP has not published Rust crates, a Go module, or the agent SDK, gateway core, x402 types or Hermes plugin packages. A package with one of those names on a public registry is not FLOP's.

Which one do I need?

@flop-labs/client

A small ESM Fetch client for browsers and Node.js 22 or later. Its only runtime dependency is @flop-labs/contracts.

npm install @flop-labs/client
import { FlopClient } from "@flop-labs/client";

const client = new FlopClient({ apiKey: process.env.FLOP_API_KEY });
const models = await client.listModels();
const completion = await client.createChatCompletion({
  model: models.data[0].id,
  messages: [{ role: "user", content: "Hello" }],
});

The default base URL is https://api.flop.network/v1. Model discovery needs no key; chat completions do. Methods: listModels, getModel, createChatCompletion, and streaming chat completions. Errors surface as FlopHTTPError. The README also covers caller-owned replay identity, recovering an ambiguous request, and task correlation.

@flop-labs/contracts

Structural types, JSON Schema exports and assert* validators for the public HTTP API: model listing, model lookup, and JSON chat completion requests, responses and stream frames. Node.js 22 or later.

npm install @flop-labs/contracts
import { assertModelList } from "@flop-labs/contracts";

const value: unknown = await fetch("https://api.flop.network/v1/models").then((r) => r.json());
assertModelList(value);

@flop-labs/sdk

The TypeScript SDK for chain-level work.

npm install @flop-labs/sdk

HTLC creation requires a registered TEE appraisal profile; the README explains the tee_requirements value. SUPPORTED_SPEC_VERSIONS lists the exact runtime versions the SDK admits; both SDKs document theirs in the registry README.

@flop-labs/pi

A Pi package that adds a flop provider, with one model per offer the gateway lists, and the flop/auto virtual model, which picks a FLOP model for each request. Requires Pi 1.4 or later.

pi install npm:@flop-labs/pi

Set FLOP_GATEWAY_URL and FLOP_API_KEY. Use a bounded child credential with a spend cap rather than an owner key. Applications that import the /durable, /memory or /memory/paid-storage subpaths install it with npm install @flop-labs/pi instead.

@flop-labs/cli

The flop command. The full CLI needs Node.js 22 or later. Run a pinned release without a global install:

npx --yes --package @flop-labs/cli@0.4.0 flop --version

A container image, ghcr.io/flop-labs/flop-core/cli, needs only Docker. For a reproducible digest pin, use flop.network/releases.json. Commands cover role onboarding, networks and the faucet, health, balances, GPU detection, staking, session keys, named-miner inference, models, gateway configuration, keys and air-gapped signing, and wallets. Add --network <name> to target a network.

flop-sdk (Python)

The Python SDK, for Python 3.10 or later.

pip install flop-sdk
from flop_sdk import FlopClient

async with FlopClient() as client:
    health = await client.health()

Other public surfaces

All of these target the development network today. No FLOP token exists yet, and no package here sells or claims one.