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-labs/client 0.2.1 (npm): list models and run chat completions against the public gateway.
- @flop-labs/contracts 0.1.1 (npm): validate public HTTP API payloads with types, JSON Schema and assertions.
- @flop-labs/sdk 0.4.0 (npm): build on the chain from TypeScript, with agent wallets, sessions, HTLCs, PoUI and x402.
- @flop-labs/pi 0.3.1 (npm): use FLOP verified inference as a Pi provider, including
flop/autorouting. - @flop-labs/cli 0.4.0 (npm): the
flopcommand for keys, networks, miners, validators and models. - flop-sdk 0.2.0 (PyPI): build on the chain from Python, with an async client, signed transactions and agent wallets.
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?
- Call a model from an app or agent:
@flop-labs/client. It speaks the OpenAI-style gateway API and needs only an API key. - Check gateway responses in your own client:
@flop-labs/contracts. - Work with accounts, spending limits and settlement on chain:
@flop-labs/sdk(TypeScript) orflop-sdk(Python). - Use FLOP from the Pi coding agent:
@flop-labs/pi. - Operate a miner or validator, or script against a network:
@flop-labs/cli. The operator hub has the role manuals.
@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
FlopClient: node health, balances, account info, HTLC creation and status, settlement waits, PoUI submission, compute tasks and TEE quotes.- Agent wallet functions:
createAgentWallet,fundAgentWallet,agentTransfer,ownerWithdraw,createSession,executeViaSession. x402FetchandparsePaymentHeadersfor HTTP 402 payments.runDirectSessionfor a session with a named miner, with identity and receipt checks.computeChannel.estimateSessionand related helpers to size a compute-channel session off chain before opening it.- Subpath exports:
@flop-labs/sdk/react(optional hooks),/browser,/a2a,/tonand/experimental.
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()
FlopClient: async HTTP client for health, HTLC status and settlement waits.SubstrateClient: signed transactions such as creating and redeeming HTLCs.- Wallet functions for agent wallets, funding, transfers, withdrawals and session keys.
- Utilities such as
generate_htlc_secrets, amount formatting and address helpers.
Other public surfaces
- Public gateway API:
https://api.flop.network/v1, the default for@flop-labs/client. - Hosted read-only MCP server:
https://mcp.flop.network/mcp(streamable HTTP). - The official links page lists every official domain and account.
All of these target the development network today. No FLOP token exists yet, and no package here sells or claims one.