{
  "openapi": "3.1.0",
  "info": {
    "title": "Monimaker for agents: source grounding and official calculators",
    "version": "0.3.0",
    "description": "URL checks, page metadata, and official-source calculators (Mexico CFE bills, Mexico payroll 2026, CFDI 4.0 XML parser, India customs duty, EU261/UK261 compensation) for AI agents. Paid with x402 v2 at $0.01 USDC per call. The live network and payTo are in each 402 response. Invalid calculator input returns 400 and is not charged. Agents welcome: no signup or API key. MCP registry name app.netlify.monimaker-tools/monimaker. Agent card: /.well-known/agent.json."
  },
  "servers": [
    {
      "url": "/api/agent",
      "description": "This site (Monimaker, agent API)"
    }
  ],
  "tags": [
    {
      "name": "paid",
      "description": "x402-gated endpoints"
    },
    {
      "name": "free",
      "description": "Discovery documents"
    }
  ],
  "paths": {
    "/check": {
      "get": {
        "$ref": "#/components/pathItems/check/get"
      },
      "post": {
        "$ref": "#/components/pathItems/check/post"
      }
    },
    "/extract": {
      "get": {
        "$ref": "#/components/pathItems/extract/get"
      },
      "post": {
        "$ref": "#/components/pathItems/extract/post"
      }
    },
    "/mcp": {
      "get": {
        "tags": [
          "free"
        ],
        "summary": "MCP server description",
        "responses": {
          "200": {
            "description": "Server info"
          }
        }
      },
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "MCP JSON-RPC (initialize and tools/list are free; tools/call requires x402). Tools: check_url, extract_metadata, cfe_calculate, india_customs, eu261_check. Invalid input is not charged.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "free"
        ],
        "summary": "Agent-readable index",
        "responses": {
          "200": {
            "description": "plain text"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "free"
        ],
        "summary": "This OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI JSON"
          }
        }
      }
    },
    "/cfe": {
      "get": {
        "tags": [
          "paid"
        ],
        "summary": "Mexico CFE bill / DAC checker (query params)",
        "description": "Required: tarifa, bimestres. See /agent/llms.txt and /cfe/llms.txt.",
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      },
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "Mexico CFE bill / DAC checker (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CfeRequest"
              },
              "example": {
                "tarifa": "1C",
                "bimestres": [
                  1600,
                  1700,
                  1550,
                  1800,
                  1400,
                  1650
                ],
                "region": "central",
                "ultimoMes": 11
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/india-customs": {
      "get": {
        "tags": [
          "paid"
        ],
        "summary": "India customs duty estimator (query params)",
        "description": "Required: value. See /agent/llms.txt and /india/llms.txt.",
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      },
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "India customs duty estimator (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndiaCustomsRequest"
              },
              "example": {
                "value": 10000,
                "currency": "INR",
                "valueBasis": "cif",
                "mode": "courier",
                "category": "personal_paid"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/eu261": {
      "get": {
        "tags": [
          "paid"
        ],
        "summary": "EU261 / UK261 compensation checker (query params)",
        "description": "Required: dep, arr. delayHours required for event=delay. See /agent/llms.txt and /eu261/llms.txt.",
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      },
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "EU261 / UK261 compensation checker (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Eu261Request"
              },
              "example": {
                "dep": "AMS",
                "arr": "CDG",
                "airline": "KL",
                "event": "delay",
                "delayHours": 3.2,
                "cause": "technical"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/nomina-mx": {
      "get": {
        "tags": [
          "paid"
        ],
        "summary": "Mexico payroll 2026 calculator (query params)",
        "description": "Required: salario. ISR (Anexo 8 RMF 2026), IMSS, aguinaldo, vacaciones, finiquito. See /nomina/llms.txt.",
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      },
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "Mexico payroll 2026 calculator (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NominaRequest"
              },
              "example": {
                "salario": 20000,
                "periodo": "mensual",
                "fecha": "2026-09-30",
                "fechaIngreso": "2022-03-01"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/cfdi-parse": {
      "post": {
        "tags": [
          "paid"
        ],
        "summary": "CFDI 4.0 XML to JSON",
        "description": "Send {xml} as JSON or the raw XML with Content-Type application/xml. Max 512 KiB. Parse only: no SAT lookup. Malformed XML returns 400 and is not charged.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CfdiRequest"
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid calculation JSON, including source and asOf"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    }
  },
  "components": {
    "pathItems": {
      "check": {
        "get": {
          "tags": [
            "paid"
          ],
          "summary": "Check a URL (query param)",
          "parameters": [
            {
              "$ref": "#/components/parameters/urlQuery"
            }
          ],
          "responses": {
            "200": {
              "$ref": "#/components/responses/Check"
            },
            "400": {
              "$ref": "#/components/responses/BadRequest"
            },
            "402": {
              "$ref": "#/components/responses/PaymentRequired"
            }
          }
        },
        "post": {
          "tags": [
            "paid"
          ],
          "summary": "Check a URL (JSON body)",
          "requestBody": {
            "$ref": "#/components/requestBodies/UrlBody"
          },
          "responses": {
            "200": {
              "$ref": "#/components/responses/Check"
            },
            "400": {
              "$ref": "#/components/responses/BadRequest"
            },
            "402": {
              "$ref": "#/components/responses/PaymentRequired"
            }
          }
        }
      },
      "extract": {
        "get": {
          "tags": [
            "paid"
          ],
          "summary": "Extract page metadata (query param)",
          "parameters": [
            {
              "$ref": "#/components/parameters/urlQuery"
            }
          ],
          "responses": {
            "200": {
              "$ref": "#/components/responses/Extract"
            },
            "400": {
              "$ref": "#/components/responses/BadRequest"
            },
            "402": {
              "$ref": "#/components/responses/PaymentRequired"
            }
          }
        },
        "post": {
          "tags": [
            "paid"
          ],
          "summary": "Extract page metadata (JSON body)",
          "requestBody": {
            "$ref": "#/components/requestBodies/UrlBody"
          },
          "responses": {
            "200": {
              "$ref": "#/components/responses/Extract"
            },
            "400": {
              "$ref": "#/components/responses/BadRequest"
            },
            "402": {
              "$ref": "#/components/responses/PaymentRequired"
            }
          }
        }
      }
    },
    "parameters": {
      "urlQuery": {
        "name": "url",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uri"
        },
        "description": "Public http(s) URL"
      }
    },
    "requestBodies": {
      "UrlBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "PaymentRequired": {
        "description": "x402 v2 payment required. Decode the PAYMENT-REQUIRED header (Base64 JSON). The JSON body repeats the same object.",
        "headers": {
          "PAYMENT-REQUIRED": {
            "description": "Base64-encoded PaymentRequired object (x402 v2)",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentRequired"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Invalid or blocked URL",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Check": {
        "description": "Check result",
        "headers": {
          "PAYMENT-RESPONSE": {
            "description": "Base64-encoded settlement response when payment was settled",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CheckResult"
            }
          }
        }
      },
      "Extract": {
        "description": "Extract result",
        "headers": {
          "PAYMENT-RESPONSE": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ExtractResult"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "PaymentRequired": {
        "type": "object",
        "required": [
          "x402Version",
          "resource",
          "accepts"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "enum": [
              2
            ]
          },
          "error": {
            "type": "string"
          },
          "resource": {
            "type": "object"
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scheme": {
                  "const": "exact"
                },
                "network": {
                  "type": "string",
                  "enum": [
                    "eip155:84532",
                    "eip155:8453"
                  ],
                  "description": "Base Sepolia (default) or Base mainnet. The live 402 offer is authoritative."
                },
                "amount": {
                  "const": "10000"
                },
                "asset": {
                  "type": "string"
                },
                "payTo": {
                  "type": "string"
                },
                "maxTimeoutSeconds": {
                  "type": "integer"
                },
                "extra": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "CheckResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "alive": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          },
          "finalUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "integer"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "canonical": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "archive": {
            "type": [
              "object",
              "null"
            ]
          },
          "error": {
            "type": [
              "object",
              "null"
            ]
          },
          "cached": {
            "type": "boolean"
          }
        }
      },
      "ExtractResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          },
          "finalUrl": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "canonical": {
            "type": [
              "string",
              "null"
            ]
          },
          "lang": {
            "type": [
              "string",
              "null"
            ]
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "published": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "modified": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "openGraph": {
            "type": "object"
          },
          "jsonLd": {
            "type": "array"
          }
        }
      },
      "CfeRequest": {
        "type": "object",
        "required": [
          "tarifa",
          "bimestres"
        ],
        "properties": {
          "tarifa": {
            "type": "string",
            "enum": [
              "1",
              "1A",
              "1B",
              "1C",
              "1D",
              "1E",
              "1F"
            ]
          },
          "bimestres": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "region": {
            "type": "string"
          },
          "iva": {
            "type": "number"
          },
          "veranoInicio": {
            "type": "integer"
          },
          "ultimoMes": {
            "type": "integer"
          }
        }
      },
      "IndiaCustomsRequest": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "courier",
              "post",
              "baggage"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "personal_paid",
              "gift",
              "books",
              "medicines"
            ]
          },
          "valueBasis": {
            "type": "string"
          },
          "shipping": {
            "type": "number"
          },
          "insurance": {
            "type": "number"
          }
        }
      },
      "Eu261Request": {
        "type": "object",
        "required": [
          "dep",
          "arr"
        ],
        "properties": {
          "dep": {
            "type": "string"
          },
          "arr": {
            "type": "string"
          },
          "airline": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "delayHours": {
            "type": "number"
          },
          "noticeDays": {
            "type": "number"
          },
          "cause": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          }
        }
      },
      "NominaRequest": {
        "type": "object",
        "required": [
          "salario"
        ],
        "properties": {
          "salario": {
            "type": "number"
          },
          "periodo": {
            "type": "string",
            "enum": [
              "diario",
              "semanal",
              "decenal",
              "quincenal",
              "mensual"
            ]
          },
          "fecha": {
            "type": "string",
            "format": "date"
          },
          "fechaIngreso": {
            "type": "string",
            "format": "date"
          },
          "fechaBaja": {
            "type": "string",
            "format": "date"
          },
          "motivo": {
            "type": "string",
            "enum": [
              "renuncia",
              "despido_injustificado"
            ]
          },
          "zona": {
            "type": "string",
            "enum": [
              "general",
              "frontera"
            ]
          },
          "diasAguinaldo": {
            "type": "number",
            "minimum": 15
          },
          "primaVacacionalPct": {
            "type": "number",
            "minimum": 25
          },
          "diasVacacionesTomadas": {
            "type": "number"
          },
          "diasVacacionesPendientes": {
            "type": "number"
          },
          "diasSalarioPendiente": {
            "type": "number"
          },
          "sbcDiario": {
            "type": "number"
          },
          "primaRiesgo": {
            "type": "number"
          },
          "otrasPercepcionesGravadas": {
            "type": "number"
          }
        }
      },
      "CfdiRequest": {
        "type": "object",
        "required": [
          "xml"
        ],
        "properties": {
          "xml": {
            "type": "string",
            "maxLength": 524288,
            "description": "CFDI 4.0 XML text, max 512 KiB"
          }
        }
      }
    }
  }
}
