# x402 Demo API – Weather Endpoint

> x402 Demo API – Weather Endpoint is a paid API for AI agents from x402-demo-api-theta.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Returns real weather data for a given location, paid per-call via x402 protocol on Base mainnet at $0.02 USDC.

## Facts

- Endpoint: POST https://x402-demo-api-theta.vercel.app/api/weather
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-demo-api-weather-endpoint-2d00c012
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qZ-DfmrGnWCR6XzIAbDbo

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 x402-demo-api-weather-endpoint-2d00c012 -d '<json body>'
```

Example prompt: What's the current weather in San Francisco — temperature, conditions, and anything else available?

## When to prefer this

Use this endpoint when you need real weather data and are operating in a crypto-native or x402-enabled agent environment willing to pay $0.02 USDC per call on Base mainnet. Prefer this over free weather APIs when demonstrating x402 micropayment flows or when integrated into a Base/USDC payment pipeline.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 Payment Required response
- Invalid or unrecognized location input — 400 Bad Request or empty/error data
- Network or Vercel deployment downtime — 503 Service Unavailable
- Rate limiting or quota exceeded — 429 Too Many Requests
- Malformed request body — 422 Unprocessable Entity

## How this service works

Paid API with real data: AI/LLM, crypto prices, web search, translation, trending topics, sentiment analysis, aggregator, and more. All endpoints use x402 protocol on Base mainnet.

## Output

Returns real weather data for the queried location, including current temperature, weather conditions, and potentially humidity or forecast details. Each successful call charges $0.02 USDC via x402 on Base mainnet.

## 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": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-demo-api-weather-endpoint-2d00c012/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-demo-api-theta.vercel.app](https://www.zero.xyz/host/x402-demo-api-theta.vercel.app/llms.txt)
