{"uid":"cap_LxN26VYhKqRf6sRbYrapR","slug":"delx-array-take-16afa32a","name":"Delx Array Take","description":"Take the first N elements. Call when you cap agent payloads before paid calls. Returns items prefix and count for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/arr-take","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","description":"Input field: n."},"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"count":2,"items":[1,2],"schema":"delx/util-arr-take/v1"}},"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_MPr3eYyAsNp9EF2JcVHn3","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":"Returns the first N elements of a JSON array along with the count of returned items","exampleAgentPrompt":"I have a big list of product IDs and I only want the first 10 — can you trim the array down to just those 10 items for me?","exampleUseCases":[{"title":"Cap agent payload before paid API call","prompt":"I'm about to send this list of 200 records to a paid API but I only want to pass the first 25 — can you slice the array down to 25 items before I send it?"},{"title":"Paginate large dataset for display","prompt":"I have a full results array from a search and I only want to show the first 5 items on the first page — take just those 5 from the front of this list."},{"title":"Limit recommendations list to top N","prompt":"My recommendation engine returned 50 items but I only want to surface the top 3 to the user — grab just the first 3 from this array."}],"resultDescription":"Returns a JSON object containing the prefix sub-array of the first N elements from the input array, along with a count of how many items were returned.","failureModes":["N exceeds array length — may return fewer items than requested or the full array","N is zero or negative — may return empty array or error","Input items is not a valid JSON array — validation error","N is not an integer — type error"],"whenToPreferThis":"Use this endpoint when you need a simple, stateless, key-free way to truncate a JSON array to its first N elements, especially before passing data to expensive or rate-limited downstream APIs. Prefer it over custom code when running in an agent context without a native runtime, or when you want a consistent, auditable array-slicing step in a workflow pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:50.393Z","isFirstParty":false}