{"uid":"cap_orK86V4SGo92MxPcwcex8","slug":"delx-commerce-array-last-element-f19b6f07","name":"Delx Commerce — Array Last Element","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-last?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":"gamma","schema":"delx/util-arr-last/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_mF12x3UGI4scDXEvczEz3","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 last element of an input array, with empty-state handling, via a pay-per-call API using USDC micropayments.","exampleAgentPrompt":"Get me the last element from this array: ['alpha', 'beta', 'gamma'] — I need to know what the final value is and whether the list was empty.","exampleUseCases":[{"title":"Pipeline tail extraction","prompt":"I have a processing queue that looks like ['step1', 'step2', 'step3'] — can you grab the last step from it so I know where the pipeline left off?"},{"title":"Latest log entry retrieval","prompt":"Here's an array of log entries: ['boot', 'init', 'ready', 'error'] — pull out the last one so I can see the most recent status."},{"title":"Empty array guard check","prompt":"I've got an array that might be empty: [] — can you check if it has a last element and tell me what it is, or flag it as empty?"}],"resultDescription":"A JSON object containing: 'empty' (boolean indicating whether the input array was empty), 'value' (the last element of the array if non-empty), and 'schema' (a schema identifier string 'delx/util-arr-last/v1').","failureModes":["Missing or malformed 'items' field returns an error response","Empty array returns {empty: true} with no value field","Payment failure via x402 (insufficient USDC balance) results in 402 Payment Required","Non-array input type may cause a validation error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, no-signup, pay-per-call utility to extract the last element of an array within an agent workflow, especially when you want verifiable delivery and USDC micropayment billing on Base or Solana. Ideal for agents that already use x402 payment infrastructure and need stateless array utility functions without managing API keys or subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:54.422Z","isFirstParty":false,"canonicalSlug":"delx-commerce-array-last-element-f19b6f07"}