Official TypeScript and Python clients plus a deterministic local Mock Server for the AI2Human Agent API.
npm install @ai2human/sdkimport { AI2Human } from "@ai2human/sdk";
const client = new AI2Human({ apiKey: process.env.AI2HUMAN_API_KEY! });
const task = await client.tasks.create({
title: "Reproduce a checkout error",
description: "Open the target three times and submit screenshot-backed notes.",
category: "digital_task",
funding_mode: "test_no_payout",
reward_usdc: 1,
deadline_hours: 24,
proof_requirements: ["screenshot", "timestamp", "notes"]
}, { idempotencyKey: "checkout-error-001" });pip install ai2humanfrom ai2human import AI2Human
client = AI2Human(api_key="...")
task = client.tasks.create({...}, idempotency_key="checkout-error-001")npm install
npm run dev:mockThe Mock Server listens on http://127.0.0.1:8787 and implements deterministic task creation, categories, task status, and proof responses. It never sends payments or touches production.
packages/typescript— typed fetch client.packages/python— sync and asynchttpxclients.packages/mock-server— offline contract-compatible server.fixtures— shared request and response vectors used by every language.
Canonical API description: openapi.yaml, mirrored from ai2human-network/protocol.