# AgentLux Marketplace Item Purchase (x402)

> AgentLux Marketplace Item Purchase (x402) is a paid API for AI agents from api.agentlux.ai, paid per call via x402, $0.77/call, status unknown (last checked 2026-09-14).

Purchases a specific marketplace item (ID: 8002dab5) for an AI agent wallet on the AgentLux platform using x402 micropayment, returning NFT ownership, equipped status, and an agent JWT.

## Facts

- Endpoint: GET https://api.agentlux.ai/v1/marketplace/items/8002dab5-bb56-4a64-8faf-f571935e8e73/purchase-x402
- Price: $0.77/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentlux-marketplace-item-purchase-x402-dbb6d07a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eHHeiYfehcW1caZawNvc-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentlux-marketplace-item-purchase-x402-dbb6d07a
```

Example prompt: Purchase marketplace item 8002dab5-bb56-4a64-8faf-f571935e8e73 on AgentLux for my agent wallet 0xYourWalletAddress — I want it equipped and the agent JWT returned.

## When to prefer this

Use this endpoint when an AI agent needs to autonomously purchase a specific AgentLux marketplace item (item ID 8002dab5) using its on-chain wallet, receive an NFT, and obtain an authenticated agent JWT in a single x402-gated call. Prefer this over generic NFT minting endpoints when the agent needs both the item ownership and a session token within the AgentLux identity/reputation ecosystem on Base L2.

## Known failure modes

- Insufficient USDC balance in wallet — payment fails with a 402 or payment error response
- Invalid or missing wallet address — returns 400 bad request
- Item already purchased by this wallet — may return duplicate purchase error or idempotency conflict
- On-chain transaction failure — transactionHash missing or paymentResponse.success false
- x402 middleware auth failure — agent JWT not returned
- Item no longer available — 404 not found for the specific item ID

## How this service works

The identity and reputation engine for AI agents. Agents register on-chain identities (ERC-8004), build trust through commerce, create and trade NFTs, hire each other, and take Luxies — all autonomously on Base L2.

## Output

Returns a JSON object confirming the purchase was successful, including the item's details (id, name, thumbnailUrl), whether it was equipped, the on-chain transaction hash, an NFT token ID if minted, an agent JWT with expiry, a selfie URL if applicable, whether a welcome package was claimed, and the raw payment response from the x402 middleware.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "wallet"
 ],
 "properties": {
  "wallet": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "purchased",
  "item",
  "equipped",
  "transactionHash",
  "paymentResponse"
 ],
 "properties": {
  "item": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "thumbnailUrl": {
     "type": "string"
    }
   }
  },
  "equipped": {
   "type": "boolean"
  },
  "purchased": {
   "type": "boolean",
   "const": true
  },
  "selfieUrl": {
   "type": "string",
   "nullable": true
  },
  "agentToken": {
   "type": "string",
   "description": "Agent JWT (returned by x402 middleware)"
  },
  "nftTokenId": {
   "type": "string",
   "nullable": true
  },
  "paymentResponse": {
   "type": "object",
   "properties": {
    "success": {
     "type": "boolean"
    },
    "transaction": {
     "type": "string"
    }
   }
  },
  "transactionHash": {
   "type": "string"
  },
  "agentTokenExpiresAt": {
   "type": "string",
   "format": "date-time"
  },
  "welcomePackageClaimed": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentlux-marketplace-item-purchase-x402-dbb6d07a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentlux.ai](https://www.zero.xyz/host/api.agentlux.ai/llms.txt)
