{"uid":"cap_2iaiZ0_Thm-RFoHX4_mcU","slug":"agent-rest-stop-sizecap-document-byte-cap-fitter-b2094c49","name":"Agent Rest Stop – SizeCap (Document Byte-Cap Fitter)","description":"Fits a document under a byte cap.","url":"https://agent-gas-station.agent-gas-station.workers.dev/v1/SizeCap?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"doc":{"type":"string"},"max_bytes":{"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3fa-4S_HtP__ju-G3nIo_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Truncates or fits a document to a specified maximum byte size, returning a compacted version that does not exceed the byte cap.","exampleAgentPrompt":"Take this article and trim it down so it fits under 4096 bytes — keep as much content as possible but don't go over that limit.","exampleUseCases":[{"title":"Fitting text into LLM context window","prompt":"I need to pass this long document to another AI model but it can only handle 2048 bytes — can you cut it down to fit under that limit without going over?"},{"title":"Capping API payload size","prompt":"This user-generated comment is too big to send to the downstream API that has a 512-byte payload limit — trim it to fit under 512 bytes please."},{"title":"Truncating stored notes to size budget","prompt":"I need to archive this note but my storage slot only allows 1024 bytes — fit the document under that byte cap before I store it."}],"resultDescription":"A version of the input document that has been truncated or fitted to not exceed the specified max_bytes limit, returned as a string.","failureModes":["max_bytes value is not a valid number string, causing a parse error","doc is empty or null, resulting in an empty or error response","max_bytes is smaller than minimum viable content, returning nearly empty output","Very large documents may hit request size limits before being processed","Payment failure ($0.01 USDC) if x402 payment header is missing or invalid"],"whenToPreferThis":"Choose this endpoint when you need a simple, deterministic byte-cap on a document — especially in agentic pipelines where downstream services or LLM context windows have hard byte limits. It is distinct from general text summarization or compression: it enforces a strict byte ceiling rather than semantically condensing content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T19:32:24.837Z","isFirstParty":false,"canonicalSlug":"agent-rest-stop-sizecap-document-byte-cap-fitter-b2094c49"}