{"uid":"cap_ql5ajoubpOT-X8r5QrUGv","slug":"agent-exec-storage-object-replace-79401e50","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.45.67.221.128.sslip.io/storage/%7Bid%7D/replace?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"plan":{"enum":["small","medium","large"],"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"],"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_oy-MkoxPVP-J5Eu_m-NCL","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 by ID, updating its size, retention window, and optional label, with pay-per-use USDC micropayment via HTTP 402.","exampleAgentPrompt":"Replace the content of my existing storage object abc-123 with this new JSON payload — use the small plan and rename the label to 'checkpoint-v2'.","exampleUseCases":[{"title":"Agent checkpoint state update","prompt":"I've got a stored object with ID 'run-7f3a' that holds my agent's last checkpoint — overwrite it with this updated state blob using the small plan, and keep the existing label."},{"title":"Rename and refresh stored artifact","prompt":"Update the content of storage object 'result-99b2' with this new output data, switch the label to 'final-output', and pick whatever plan fits the new size."},{"title":"Early retention extension by replace","prompt":"I want to replace the body of storage object 'cache-delta-01' with a refreshed version of the same data using the medium plan — I'm replacing it early so I don't lose the retention window I already paid for."}],"resultDescription":"Returns a JSON object containing the object's ID, the new plan, the new content size in bytes, the previous content size, the new expiry timestamp (Unix ms), the previous expiry timestamp, the resulting label (unchanged, renamed, or cleared), and payment details including asset, payer wallet address, charged amount in atomic units, network, and on-chain transaction hash.","failureModes":["Object ID not found — returns 404 if the specified storage ID does not exist","Payment insufficient or invalid — HTTP 402 if the submitted payment doesn't cover the required plan price","Plan too small for new content — service auto-selects the smallest fitting plan and quotes the correct price via 402","Label parameter misuse — unexpected behavior if label parameter format is incorrect","Expired object — attempting to replace an already-expired object may return an error","Network or sandbox unavailable — transient 5xx errors if the service infrastructure is temporarily down"],"whenToPreferThis":"Use this endpoint when you already have a storage object ID and want to overwrite its content entirely rather than create a new object. It is the right choice when you need to update agent state, refresh a cached artifact, or rename a label while preserving the object's identity. Prefer this over a fresh store when you want the retention window to be the longer of old vs new, avoiding unintended shortening of previously paid retention. It requires no account or API key — only a valid USDC micropayment via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:30:39.267Z","isFirstParty":false,"canonicalSlug":"agent-exec-storage-object-replace-79401e50"}