# x402 Fun Joke API

> x402 Fun Joke API is a paid API for AI agents from fun.kagurazaka.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Returns a random family-friendly joke with separate setup and punchline fields, optionally filtered by category or fetched by ID

## Facts

- Endpoint: GET https://fun.kagurazaka.dev/v1/joke?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-fun-joke-api-b7396a34
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cvwbImU0csIQyXPnCqSpZ

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-fun-joke-api-b7396a34
```

Example prompt: Tell me a random programming joke — give me the setup and punchline separately.

## When to prefer this

Choose this endpoint when you need a structured joke with setup and punchline as separate fields — ideal for templated displays, chatbot responses, or newsletters. Prefer it over generic joke APIs when you want category filtering across niche topics like crypto, AI, or programming, or when you need to reliably re-fetch a specific joke by ID. Best for lightweight, family-friendly humor in agentic or automated workflows.

## Known failure modes

- Invalid category value returns an error — only the nine specified enum values are accepted
- Invalid or non-existent joke ID returns an error or empty result
- No jokes available matching filters (unlikely given fixed pool of 133)
- Payment failure results in 402 response before any joke is returned

## How this service works

A random family-friendly joke with setup and punchline as separate fields, written for this service (133 jokes), optionally from one category: dad, programming, ai, science, math, animals, food, work, crypto. Give id to get one joke again.

## Output

A JSON object containing a unique joke ID (e.g. 'programming-1'), the full joke text, the setup line, the punchline, and the category it belongs to.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "id": {
       "type": "string",
       "description": "a joke's id, such as programming-1, to get it again"
      },
      "category": {
       "enum": [
        "dad",
        "programming",
        "ai",
        "science",
        "math",
        "animals",
        "food",
        "work",
        "crypto"
       ],
       "type": "string",
       "description": "only this category"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "id": {},
      "text": {},
      "setup": {},
      "category": {},
      "punchline": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "programming-1",
  "text": "Why do programmers prefer dark mode? Because light attracts bugs.",
  "setup": "Why do programmers prefer dark mode?",
  "category": "programming",
  "punchline": "Because light attracts bugs."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-fun-joke-api-b7396a34/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fun.kagurazaka.dev](https://www.zero.xyz/host/fun.kagurazaka.dev/llms.txt)
