{"uid":"cap_vh_PQFo24p79Q6J-XXdCb","slug":"agent-exec-storage-object-replace-ddcd772c","name":"agent-exec Storage Object Replace","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.448c.org/storage/%7Bid%7D/replace?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"plan":{"enum":["small","medium","large","year"],"type":"string","description":"Optional; omitted, misspelled or too small for the new body, you get the smallest plan it fits, and the 402 quotes exactly that. Which plan to buy. Priced as a fresh store, because the content is entirely new. Its byte allowance must cover the NEW body, and its window is compared against what the object already has -- the longer of the two wins, so replacing early never shortens your retention."},"label":{"type":"string","description":"Three-way. OMIT it to keep the object's current label (the usual case -- you are re-parking state under a name you already know). Send `?label=name` to rename. Send it empty (`?label=`) to clear it."}}},"responseSchema":{"type":"object","required":["id","expiresAt","previousExpiresAt","size","previousSize","plan","label","payment"],"properties":{"id":{"type":"string"},"plan":{"enum":["small","medium","large","year"],"type":"string"},"size":{"type":"integer","description":"The new content size, in bytes."},"label":{"type":["string","null"],"description":"The resulting label -- unchanged, renamed, or cleared, per the `?label=` sent."},"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."}}},"expiresAt":{"type":"integer","description":"Unix ms the object is free again, after this replacement."},"previousSize":{"type":"integer","description":"The size of the content that was overwritten, in bytes."},"previousExpiresAt":{"type":"integer","description":"Unix ms the object would have expired before this replacement."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0051","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.0051/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0051","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0051","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YhGlNh11OcUHmUQ9s4tAz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0051","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Replaces the content of an existing storage object in-place, extending or preserving its retention window, with pay-per-use USDC micropayment and no account required.","exampleAgentPrompt":"Overwrite the stored object with ID 'abc123' in agent-exec storage with my updated script content, using the small plan, and keep the existing label — just pay for it with USDC.","exampleUseCases":[{"title":"Update agent checkpoint state","prompt":"My agent has been running and needs to update its saved checkpoint — replace the content at storage ID 'chk-007' with the new JSON state blob using the medium plan, and keep the label 'checkpoint-v2'."},{"title":"Renew stored code before expiry","prompt":"The code object at ID 'run-456' is about to expire — overwrite it with the same updated source and use the small plan so it gets the longest possible retention window."},{"title":"Rename a stored artifact during update","prompt":"Replace the content of storage object 'artifact-99' with the new build output, upgrade to the large plan to fit the bigger file, and rename the label to 'build-final'."}],"resultDescription":"Returns the storage object's new ID, selected plan, new size in bytes, new expiry timestamp (Unix ms), the previous size and expiry before replacement, the resulting label, and a payment object containing the asset, payer wallet address, amount charged in atomic USDC units, network, and on-chain transaction hash.","failureModes":["Plan too small for new body — service auto-selects smallest fitting plan and returns 402 quoting exact required plan","Invalid or expired object ID — object not found","Payment failure — insufficient funds or invalid x402 payment header","Malformed request body — missing or invalid content","Network or sandbox unavailability — 5xx error"],"whenToPreferThis":"Use this endpoint when you already have an existing storage object ID and want to overwrite its content in place, preserving the same ID and optionally extending retention — rather than creating a brand-new object. It is the right choice when an agent needs to update checkpoint state, replace code artifacts, or re-park data under a known identifier without re-registering or signing up for an account.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:33:37.689Z","isFirstParty":false,"canonicalSlug":"agent-exec-storage-object-replace-ddcd772c"}