{"title":"PathCourse Health — Developer Integration Guide","version":"2.1.0","overview":"PCH is an AI token gateway and agent commerce infrastructure. Pay USDC on Base, get an API key, make inference requests using a standard REST API.","quick_start":{"steps":["1. Send POST to /v1/chat/completions — you’ll get a 402 with payment instructions","2. Send 25+ USDC on Base to the treasury wallet","3. Resend your request with X-PAYMENT-PROOF header","4. Receive your API key in X-API-KEY header + inference response","5. Use the API key for all future requests"]},"endpoints":{"inference":{"url":"https://gateway.pathcoursehealth.com/v1/chat/completions","method":"POST","auth":"Bearer {api_key}","body":{"model":"pch-fast | pch-coder | pch-pro | claude-haiku | claude-sonnet","messages":[{"role":"user","content":"your prompt"}],"max_tokens":500},"response_headers":{"X-PCH-Routed-Model":"model that handled the request","X-PCH-Tier":"your certification tier","X-PCH-Balance-Remaining":"your USDC balance"}},"payment_402":{"description":"Returned when no API key is present","status":402,"fields":{"pay_to":"treasury wallet address","amount_usdc":"minimum deposit (25)","payment_context_id":"unique ID for this payment session","chain_id":8453,"network":"base","asset":"USDC"}},"handshake":{"url":"https://agents.pathcoursehealth.com/negotiator/handshake","method":"POST","body":{"agent_id":"your-agent-id","endpoint":"https://your-agent.com"}},"capabilities":"https://agents.pathcoursehealth.com/registry/capabilities","certification":"https://gateway.pathcoursehealth.com/v1/cert/submit","agent_card":"https://gateway.pathcoursehealth.com/.well-known/agent.json","mcp_server":"https://gateway.pathcoursehealth.com/mcp"},"pricing":{"billing_model":"two_path","owned_models":{"pch-fast":{"rate":"$0.44 per million tokens","description":"Best for high-volume, low-complexity tasks like classification, summarization, routing decisions, and quick agent responses where speed and cost matter most."},"pch-coder":{"rate":"$3.50 per million tokens","description":"Best for agentic coding tasks, repository-scale code generation, function calling, browser automation, and any workload where the agent is writing, debugging, or analyzing code."},"pch-pro":{"rate":"$1.96 per million tokens","description":"Best for general-purpose autonomous agent reasoning, multi-step planning, tool use, and production workloads that require strong instruction following and reliable output quality."}},"third_party":{"rate":"Common rate","models":["claude-haiku","claude-sonnet"]},"uncertified_surcharge":"15% on all requests","notice":"PCH model tiers are powered by third-party inference infrastructure. The underlying model configuration is proprietary to PathCourse Health and subject to change without notice."},"certification_tiers":[{"tier":"uncertified","deposit":25,"models":["pch-fast","pch-coder"]},{"tier":"bronze","deposit":75,"models":["pch-fast","pch-coder","pch-pro"]},{"tier":"silver","deposit":250,"models":["pch-fast","pch-coder","pch-pro","claude-haiku"]},{"tier":"gold","deposit":750,"models":["pch-fast","pch-coder","pch-pro","claude-haiku","claude-sonnet"]}],"code_examples":{"python":"https://github.com/pathcourse-health/pch-integration-examples/blob/main/python/pch_client.py","javascript":"https://github.com/pathcourse-health/pch-integration-examples/blob/main/javascript/pch_client.js"},"payment_proof_format":{"header":"X-PAYMENT-PROOF","accepts":["base64-encoded JSON","plain JSON"],"fields":{"payment_context_id":"from the 402 response","tx_hash":"your USDC transfer transaction hash","buyer_wallet":"your wallet address"},"example":"{\"payment_context_id\":\"abc-123\",\"tx_hash\":\"0x...\",\"buyer_wallet\":\"0x...\"}"}}