{"uid":"cap_1SJxBhv27b7awydgdqKbj","slug":"agent-exec-distributed-lock-key-claim-post-claim-b036f4c4","name":"agent-exec Distributed Lock / Key Claim (POST /claim)","description":"Accountless, pay-per-use code execution for software agents: submit source code, get stdout, stderr and exit code back from an isolated, network-less sandbox. No account, no API key -- possession of valid payment is sufficient.","url":"https://agent-exec.45.67.221.128.sslip.io/claim","method":"POST","headers":{},"bodySchema":{"type":"object","required":["key","plan","holder"],"properties":{"key":{"type":"string","description":"1..256 UTF-8 bytes, no '/' character -- the name you want to hold, scoped to your own paying wallet."},"plan":{"enum":["hour","day","week"],"type":"string","description":"Which plan to buy -- see x-payment-info.pricing for each plan's hold duration and price."},"holder":{"type":"string","description":"1..256 UTF-8 bytes -- an id identifying which of your own processes is claiming it."}}},"responseSchema":{"type":"object","required":["outcome","plan","claim"],"properties":{"mine":{"type":"boolean","description":"Only present when `outcome` is \"held\": true when the existing holder is YOU -- a crash-resume or duplicated retry, the exact signal this product is sold to give."},"plan":{"enum":["hour","day","week","free"],"type":"string","description":"One of the paid plans (hour/day/week) from POST /claim, or \"free\" from POST /claim/free."},"claim":{"type":"object","required":["key","holder","acquiredAt","expiresAt"],"properties":{"key":{"type":"string"},"holder":{"type":"string"},"expiresAt":{"type":"integer","description":"Unix ms the hold is free again."},"acquiredAt":{"type":"integer","description":"Unix ms the hold was granted, from the server clock at the commit that granted it."}},"description":"The current hold on this key -- yours if `outcome` is \"acquired\", or the existing holder's if `outcome` is \"held\". Never carries a wallet: the caller already knows its own."},"outcome":{"enum":["acquired","held"],"type":"string","description":"\"acquired\": you won the key (201). \"held\": somebody already holds it (200) -- NOT an error, see `mine`."},"payment":{"type":"object","properties":{"asset":{"type":"string"},"payer":{"type":"string","description":"The paying wallet's address."},"amount":{"type":"string","description":"Atomic units of the settlement asset that were charged."},"network":{"type":"string"},"transaction":{"type":"string","description":"On-chain settlement transaction hash."}},"description":"Present on both outcomes of the PAID `POST /claim` -- the attempt is billed whether or not you won the key, so a \"held\" response still carries the receipt for the charge you incurred. Absent only from `POST /claim/free`, which never settles a payment."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0052","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0052/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0052","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0052","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JuBfFuG6_C-aSDi5mR9PP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0052","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Acquires a named, time-bounded exclusive lock (key claim) scoped to a paying wallet, with payment settled per attempt via x402 regardless of win/loss.","exampleAgentPrompt":"Claim an exclusive lock on the key 'pipeline/ingest/job-42' for one hour using holder ID 'worker-node-7' — I need to make sure no other agent steals this job while mine is running.","exampleUseCases":[{"title":"Crash-safe agent job deduplication","prompt":"Try to claim the key 'jobs/render/batch-99' for a day with holder 'renderer-alpha' — if it comes back saying I already hold it, that means my last run crashed and I can safely resume without starting over."},{"title":"Weekly exclusive namespace reservation","prompt":"Grab a week-long hold on the key 'reports/weekly-summary' for holder 'scheduler-main' so no other scheduled agent touches that report while mine is generating it."},{"title":"Hourly coordination lock for multi-agent pipeline","prompt":"Claim the key 'pipeline/step-3/lock' for one hour with holder 'stage-coordinator-2' — I need the other agents in my fleet to back off while this pipeline stage runs."}],"resultDescription":"Returns an outcome ('acquired' if you won the lock, 'held' if someone else has it), the full claim record showing key, holder, acquiredAt and expiresAt timestamps, an optional 'mine' boolean (true if you already hold it — useful for crash-resume), and a payment receipt with payer address, amount, asset, network and transaction hash. The attempt is billed whether you win or lose.","failureModes":["Key already held by another wallet — outcome is 'held', payment still charged, claim record shows competitor's hold expiry","Invalid plan value (not hour/day/week) — validation error before payment","Key or holder exceeds 256 bytes or contains '/' — rejected with input validation error","Payment failure or insufficient USDC balance — transaction not settled, lock not granted","Network or server error — uncertain lock state, agent should retry with idempotency in mind"],"whenToPreferThis":"Choose this endpoint when you need accountless, pay-per-use distributed locking with no prior registration, and your agent infrastructure already handles x402 crypto micropayments. It is especially valuable for crash-resume detection (the 'mine' flag), multi-agent coordination, and scenarios where you want the simplicity of payment-as-authentication rather than API keys or OAuth.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:30:06.949Z","isFirstParty":false}