{"uid":"cap_JXiRtn4Bg_RmNHdu9_3hm","slug":"delx-array-first-f1b5b163","name":"Delx Array First","description":"Return the first list element. Call when you need head of an agent-held array safely. Returns value and empty flag 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-first","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_tZGZYKO87HKsqw8Sw093I","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 along with an empty flag, safely handling edge cases.","exampleAgentPrompt":"I have this array [\"apple\", \"banana\", \"cherry\"] — can you safely get me the first element and tell me if the list was empty?","exampleUseCases":[{"title":"Safely peek at queue head","prompt":"I have a task queue stored as a JSON array like [\"task-001\", \"task-002\", \"task-003\"] — grab the first item so I know what to process next, and also tell me if the queue is empty."},{"title":"Pipeline first-result extraction","prompt":"My agent collected a list of search results as an array and I just need the top result: [\"https://example.com\", \"https://other.com\"] — pull the first one out safely."},{"title":"Defensive head-of-list check","prompt":"I'm not sure if my list of pending notifications is empty or not — the array is []. Can you get the first element and flag whether the list was empty so I don't crash my workflow?"}],"resultDescription":"Returns the first element of the provided array and a boolean empty flag indicating whether the array had no items. If the array is empty, the value field will be absent or null and the empty flag will be true.","failureModes":["Missing or null 'items' field returns a validation error","Non-array value for 'items' causes a type error","Payment failure or insufficient USDC balance results in 402 response","Network timeout if the x402 payment handshake stalls"],"whenToPreferThis":"Choose this endpoint when you need a reliable, safe way to retrieve the first element of an agent-held array without writing custom index logic, especially when you need an explicit empty-array signal to guard downstream workflow steps. Ideal for lightweight agentic pipelines that already use x402 micropayments on Base and want a stateless, no-retention utility call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:52:29.925Z","isFirstParty":false}