# PayAI API Key Vending Endpoint

> PayAI API Key Vending Endpoint is a paid API for AI agents from merchant.payai.network, paid per call via x402, $1/call, status unknown (last checked 2026-10-12).

Issues a new PayAI API key with purchased credits for a specified USD amount, paid via USDC

## Facts

- Endpoint: POST https://merchant.payai.network/api/v1/keys/vend?utm_source=zero.xyz
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-api-key-vending-endpoint-34137e1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1cmjxvjFb-gReCl0WN9Hi

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 payai-api-key-vending-endpoint-34137e1e -d '<json body>'
```

Example prompt: Can you buy me a PayAI API key with $10 worth of credits? Name the key 'my-agent-key' and use recovery email dev@example.com.

## When to prefer this

Use this endpoint when you need to programmatically purchase and provision a new PayAI API key funded with a specific USD-denominated credit balance in a single atomic call, especially in agentic or automated workflows that need fresh credentials on demand. Prefer this over manual dashboard key creation when operating in agent pipelines that require self-funded API access.

## Known failure modes

- Insufficient USDC payment — payment of exactly $1 USDC per call is required via x402 protocol
- Invalid amount format — query param must match pattern ^\d+(\.\d{1,2})?$
- Invalid recovery email format — must match standard email pattern
- Key name too long — maximum 64 characters
- Payment not confirmed — USDC transaction may fail or timeout
- Missing required fields — type, method, bodyType, and body must all be present

## How this service works

PayAI facilitator API key + credits for the requested USD amount

## Output

Returns a JSON object containing the newly created API key details, account information, purchased credit balance, and next-step guidance for using the key.

## 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": {
      "keyName": {
       "type": "string",
       "maxLength": 64
      },
      "recoveryEmail": {
       "type": "string",
       "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
       "maxLength": 254
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "amount": {
       "type": "string",
       "pattern": "^\\d+(\\.\\d{1,2})?$",
       "description": "USD amount"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "credits",
      "account",
      "next"
     ],
     "properties": {
      "next": {
       "type": "object"
      },
      "apiKey": {
       "type": "object"
      },
      "account": {
       "type": "object"
      },
      "credits": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payai-api-key-vending-endpoint-34137e1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from merchant.payai.network](https://www.zero.xyz/host/merchant.payai.network/llms.txt)
