{"service":"liberty-agent-settlement","version":"0","mode":"demo","money":false,"title":"Adapter examples","description":"Copy-ready request bodies for Agent Settlement. Demo only. Not real money. Live origin https://liberty-amber.vercel.app. Optional Authorization: Bearer <key> or X-Liberty-Key (mint on /). Missing keys still work (key_optional). Optional Idempotency-Key (or body idempotency_key) makes create ids stable for retries; Liberty does not replay stored responses. Release returns agent_credits_delta (same integer as agent_payout) for a client-held agent wallet. Liberty does not persist jobs, receipts, or balances.","origin":"https://liberty-amber.vercel.app","human_path":"/#adapters","auth":{"required":false,"headers":["Authorization: Bearer <key>","X-Liberty-Key"],"note":"Optional demo API key. Mint on /. Not production auth. Not an account. If omitted, the engine notes key_optional and still works."},"idempotency":{"header":"Idempotency-Key","body":"idempotency_key","persistence":false,"replay":false,"note":"Optional. Same key plus same create title/amount/criteria yields the same as_ + 10 hex id on transition create and simulate. Quote echoes the key only and stays dry-run. Liberty does not store or replay responses. Missing key keeps a random as_ + 10 hex id. No SSRF. No real money."},"surfaces":{"ui":"/#adapters","examples":"/api/examples.json","protocol":"/api/settlement.json","quote":"/api/v0/quote","transition":"/api/v0/transition","simulate":"/api/v0/simulate","verify":"/api/v0/verify"},"examples":[{"id":"quote","method":"POST","path":"/api/v0/quote","url":"https://liberty-amber.vercel.app/api/v0/quote","title":"Dry-run quote","note":"Same engine as transition. No state change. Create quote has no durable id. Optional client_ref echoes on the quoted job. Optional callback_url echoes the same way; Liberty never fetches it. Optional Idempotency-Key is echoed only.","body":{"action":"create","title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","client_ref":"agent-job-42","callback_url":"https://your-adapter.example/notify"}},{"id":"transition","method":"POST","path":"/api/v0/transition","url":"https://liberty-amber.vercel.app/api/v0/transition","title":"Create → fund → submit → release","note":"Stateless sketch. Each step is a separate POST. Thread the job from the previous response, or send the sample jobs below (the engine does not look jobs up). Or skip the walk and POST /api/v0/simulate. Optional Idempotency-Key on create keeps the as_ id stable for retries; Liberty does not replay stored responses. Optional client_ref (max 128) stamps the adapter’s correlation id on the job and later receipt; it is independent of the as_ id. Optional callback_url (notify_url alias, max 512, https) is stamped the same way. Liberty never HTTP-fetches or calls it. Optional proof_note on submit (max 400) lands on the job and later receipt. Optional release_note (max 400) lands on the receipt. Release returns agent_credits_delta (same as agent_payout). Apply it to a client-held agent wallet. Dispute returns 0.","steps":[{"action":"create","body":{"action":"create","title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","client_ref":"agent-job-42","callback_url":"https://your-adapter.example/notify"}},{"action":"fund","body":{"action":"fund","payer_credits":100,"job":{"id":"as_0123456789","title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","proofUrl":"","status":"open","createdAt":"2026-09-15T00:00:00.000Z","fundedAt":null,"submittedAt":null,"resolvedAt":null,"fee":0,"agentPayout":0}}},{"action":"submit","body":{"action":"submit","proof_url":"https://example.com/proof","proof_note":"Three-bullet brief attached.","job":{"id":"as_0123456789","title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","proofUrl":"","status":"funded","createdAt":"2026-09-15T00:00:00.000Z","fundedAt":"2026-09-15T00:00:00.000Z","submittedAt":null,"resolvedAt":null,"fee":0,"agentPayout":0}}},{"action":"release","note":"Response includes agent_credits_delta (same integer as agent_payout). Apply it locally. Optional release_note (max 400) lands on the receipt.","body":{"action":"release","release_note":"Proof matches the three-bullet brief.","job":{"id":"as_0123456789","title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","proofUrl":"https://example.com/proof","proofNote":"Three-bullet brief attached.","status":"submitted","createdAt":"2026-09-15T00:00:00.000Z","fundedAt":"2026-09-15T00:00:00.000Z","submittedAt":"2026-09-15T00:00:00.000Z","resolvedAt":null,"fee":0,"agentPayout":0}}}]},{"id":"simulate","method":"POST","path":"/api/v0/simulate","url":"https://liberty-amber.vercel.app/api/v0/simulate","title":"One-shot create → fund → submit → release","note":"Full walk through the same engine. Create assigns a real as_… id. Optional Idempotency-Key makes that create id stable for retries. Optional client_ref (max 128) lands on the job and receipt. Optional callback_url (notify_url alias) is stamped the same way; Liberty never fetches it. Default terminal is release. Set terminal to dispute for a refund walk. Optional proof_note (max 400) lands on the submit job and later receipt. Optional release_note or dispute_reason (max 400) lands on the receipt. Release returns agent_credits_delta.","body":{"title":"Summarize filings","amount":100,"criteria":"Three-bullet brief","payer_credits":100,"proof_url":"https://example.com/proof","proof_note":"Three-bullet brief attached.","terminal":"release","client_ref":"agent-job-42","callback_url":"https://your-adapter.example/notify","release_note":"Proof matches the three-bullet brief."}},{"id":"verify","method":"POST","path":"/api/v0/verify","url":"https://liberty-amber.vercel.app/api/v0/verify","title":"Verify a receipt","note":"Stateless. Recomputes fee / agent_payout / returned_to_payer. A wrong fee is 200 with valid:false. Liberty does not store the receipt.","body":{"receipt":{"job_id":"as_0123456789","title":"Summarize filings","status":"released","amount":100,"release_fee":5,"agent_payout":95,"returned_to_payer":0,"success_criteria":"Three-bullet brief","proof":"https://example.com/proof","created":"2026-09-15T00:00:00.000Z","funded":"2026-09-15T00:00:00.000Z","submitted":"2026-09-15T00:00:00.000Z","resolved":"2026-09-15T00:00:00.000Z"}}}]}