# HostDeFi API Key Provisioning via x402

> HostDeFi API Key Provisioning via x402 is a paid API for AI agents from hostdefi.com, paid per call via x402, $5/call, status unknown (last checked 2026-09-15).

Issues a paid API key for the HostDeFi DeFi platform by accepting a $5 USDC x402 micropayment, returning a one-time-shown API key with a 5,000-call quota.

## Facts

- Endpoint: POST https://hostdefi.com/api/v1/x402/keys
- Price: $5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hostdefi-api-key-provisioning-via-x402-fca67e21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G2pLhF6-qwrSLKrwbaUKR

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 hostdefi-api-key-provisioning-via-x402-fca67e21 -d '<json body>'
```

Example prompt: I need programmatic access to HostDeFi's Solana DEX and swap APIs — can you pay the $5 USDC fee using x402 and get me an API key with the x402agent plan?

## When to prefer this

Use this endpoint when you need programmatic access to HostDeFi's Solana DEX, Jupiter swap routing, EVM multi-chain trading, bridging, or token risk grade APIs and want to pay with USDC via the x402 protocol without creating an account or undergoing KYC. Prefer this over traditional API key sign-up flows when operating in a crypto-native, agent-driven environment where x402 micropayments are the preferred auth mechanism.

## Known failure modes

- Payment not received or x402 payment verification fails — key not issued
- Malformed request body missing required fields — 400 error
- Duplicate or replayed x402 payment token rejected — key not issued
- Downstream payment processor unavailable — 503 or timeout
- Quota exhausted on previously issued key — requires new provisioning call

## How this service works

HostDeFi is a non-custodial Solana DEX. Best-route swaps through Jupiter, EVM trading across 7 chains, native bridging, and live token risk grades. No KYC, no accounts, no custody.

## Output

Returns a JSON object with ok: true, the plan name ('x402agent'), a quota of 5,000 API calls, and the API key string — displayed only once at provisioning time and not retrievable afterward.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "plan": "x402agent",
  "quota": 5000,
  "apiKey": "…shown once…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hostdefi-api-key-provisioning-via-x402-fca67e21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hostdefi.com](https://www.zero.xyz/host/hostdefi.com/llms.txt)
