{"uid":"cap_PjpiVm8x6mZfov1RNyL88","slug":"delx-commerce-array-first-element-extraction-100c4255","name":"Delx Commerce — Array First Element Extraction","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/arr-first?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"empty":false,"value":"alpha","schema":"delx/util-arr-first/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_KxOJZGwwcIJTbCTQ98bLQ","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 element of an input array, with a flag indicating whether the array was non-empty, payable per-call via USDC on Base or Solana.","exampleAgentPrompt":"I have an array like [\"alpha\", \"beta\", \"gamma\"] — can you get me the first element from it and tell me if the array was empty?","exampleUseCases":[{"title":"Head-of-queue task retrieval","prompt":"I have a queue of pending tasks represented as an array — grab the first one so I know what to work on next, and let me know if the queue is empty."},{"title":"First search result extraction","prompt":"I ran a search and got back a list of results like [\"result-A\", \"result-B\", \"result-C\"] — pull out the very first result for me."},{"title":"Default value selection from list","prompt":"I have a list of fallback options [\"option1\", \"option2\", \"option3\"] — fetch the first one as the default choice and confirm the list isn't empty."}],"resultDescription":"A JSON object with an `empty` boolean indicating whether the input array had any elements, a `value` field containing the first element of the array (if non-empty), and a `schema` field identifying the response format as `delx/util-arr-first/v1`.","failureModes":["Empty input — if items array is missing or null, behavior is undefined; check the `empty` flag in the response","Non-array input — passing a non-array type to items may result in an error or unexpected output","Payment failure — if USDC payment via x402 is not completed, the API returns a 402 status and no result is delivered","Malformed request — missing or invalid JSON body returns a 4xx error"],"whenToPreferThis":"Choose this endpoint when you need a simple, trustless, pay-per-call utility to extract the first element of an array without standing up your own infrastructure. It is ideal for AI agents that need lightweight array-head operations within a verifiable, blockchain-settled micropayment workflow (x402 on Base or Solana), especially when avoiding API key management or subscription overhead is a priority.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:03.955Z","isFirstParty":false,"canonicalSlug":"delx-commerce-array-first-element-extraction-100c4255"}