{"uid":"cap_uydURDGOPVsLxT5kqRX6X","slug":"chunk-arrays-for-agents-0f3a84ff","name":"Chunk Arrays for Agents","description":"Chunk a JSON array. Use to batch tool calls, page results, or stay under payload limits. Returns array chunks with the requested size (bounded input). $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/list-chunk","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"size":{"type":"integer","maximum":64,"minimum":4,"description":"Optional NanoID length (4–64). Default 21 when omitted."},"items":{"type":"array","items":{},"maxItems":10000,"description":"JSON array to split into chunks. Cap 10k items per call."},"chunk_size":{"type":"integer","minimum":1,"description":"Optional chunk length for list_chunk (handler default when omitted)."}}},"responseSchema":{"type":"json","example":{"size":10,"chunks":[["alpha","beta","gamma","delta"]],"schema":"delx/list-chunk/v1","chunk_count":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fZ6VxYZLev5pBkmuXRXNa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits a JSON array into fixed-size chunks to support batching, pagination, and payload-limit compliance","exampleAgentPrompt":"Split this list of 500 product IDs into chunks of 25 so I can process them in batches without hitting the payload limit.","exampleUseCases":[{"title":"Batch API calls across large dataset","prompt":"I have an array of 3000 user IDs and need to call a downstream API that only accepts 50 at a time — can you chunk the array into groups of 50 for me?"},{"title":"Paginate results for display","prompt":"Take these 200 search results and break them into pages of 10 items each so I can show them one page at a time to the user."},{"title":"Parallel task queue partitioning","prompt":"I need to distribute this list of 120 tasks across 4 workers — split the array into chunks of 30 so each worker gets an equal share."}],"resultDescription":"An array of sub-arrays, each containing at most chunk_size items from the original input. The final chunk may be smaller if the total item count is not evenly divisible. Response is deterministic first-party JSON with no extra metadata.","failureModes":["items array exceeds 10,000 item cap — request rejected with a structured validation error (not billed)","chunk_size less than 1 — validation error returned","missing or malformed items field — structured validation error","payment not provided or insufficient — x402 payment required response"],"whenToPreferThis":"Choose this endpoint when your agent pipeline needs to batch tool calls, enforce pagination, or stay under downstream payload limits without implementing array-splitting logic in your own code. It is deterministic, requires no API key or subscription, costs $0.001 USDC per call via x402 on Base, and returns no side effects — ideal for lightweight preprocessing steps in agentic workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:25.684Z","isFirstParty":false}