{
  "openapi": "3.1.0",
  "info": {
    "title": "FabTally",
    "version": "0.2.0",
    "description": "Pay-per-call utilities for AI agents: slicer-accurate FDM 3D-printing quotes and signed point-in-time URL attestations. Settlement via x402 (USDC on Base).",
    "x-guidance": "Two paid endpoints, both x402 (USDC on Base). POST /agent/v1/quote takes a multipart body (file=STL/3MF/STEP, plus optional material and quantity) and returns print time, filament grams and a priced quote ($0.005). POST /agent/v1/attest takes JSON {url, check, needle?} and returns an ed25519-signed record of what the URL returned ($0.01). GET /agent/overview and GET /agent/v1/attest/schema are free discovery docs. Each paid call responds 402 with an x402 `accepts` challenge; pay and retry to receive the result. Bring your own pricing: POST /agent/v1/quote accepts optional material_cost_per_kg, machine_rate_per_hour, setup_fee, margin, markup_percent, minimum_price and currency — omit for hobbyist defaults, pass your own for business economics (config is free; call price unchanged). The quote echoes a `pricing_basis` object of default-vs-custom values.",
    "contact": {
      "email": "hello@fabtally.com"
    }
  },
  "servers": [
    {
      "url": "https://fabtally.com"
    }
  ],
  "paths": {
    "/agent/overview": {
      "get": {
        "operationId": "overview",
        "summary": "Service overview — description, pricing, live material profiles (free)",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Overview document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/agent/v1/quote": {
      "post": {
        "operationId": "quote",
        "summary": "Quote — slicer-accurate FDM 3D-printing quote (paid, $0.005 USDC on Base)",
        "tags": [
          "Quote"
        ],
        "description": "Real FDM 3D-printing quote from a real slicer. Upload an STL/3MF/STEP and get print time, filament grams and a priced quote (material + machine time + setup, volume discounts). Runs a production slicing engine against calibrated machine profiles — not an estimate.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "5000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/quote",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model file to quote (STL, 3MF, OBJ, STEP). Max 64 MB."
                  },
                  "material": {
                    "type": "string",
                    "description": "Material/profile id. One of: pla, pla-cf, petg, petg-cf, abs, abs-cf, asa, asa-cf, nylon, pc, pet, tpu. Default pla."
                  },
                  "quantity": {
                    "type": "string",
                    "description": "Number of parts, 1-10000. Volume discounts apply. Default 1."
                  },
                  "material_cost_per_kg": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): override material $/kg."
                  },
                  "machine_rate_per_hour": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): machine rate $/hour (default 2.00)."
                  },
                  "setup_fee": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): per-job setup fee (default 1.50)."
                  },
                  "margin": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): margin fraction on cost, 0.30=30% (default 0.30)."
                  },
                  "markup_percent": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): extra % markup on top of margin."
                  },
                  "minimum_price": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): per-job price floor (default 5.00)."
                  },
                  "currency": {
                    "type": "string",
                    "description": "Bring your own pricing (optional): currency label echoed back (default USD)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Priced quote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "string"
                    },
                    "material": {
                      "type": "string"
                    },
                    "print_time_sec": {
                      "type": "integer"
                    },
                    "print_time_human": {
                      "type": "string"
                    },
                    "filament_g": {
                      "type": "number"
                    },
                    "quote": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "material_cost": {
                              "type": "number"
                            },
                            "machine_cost": {
                              "type": "number"
                            },
                            "setup_fee": {
                              "type": "number"
                            },
                            "price": {
                              "type": "number"
                            }
                          }
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "quantity_discount": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        }
                      }
                    },
                    "quoted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "example": {
                    "model": "bracket.stl",
                    "material": "pla",
                    "print_time_sec": 988,
                    "print_time_human": "16m28s",
                    "filament_g": 4.16,
                    "quote": {
                      "currency": "USD",
                      "unit": {
                        "material_cost": 0.1,
                        "machine_cost": 0.69,
                        "setup_fee": 1.5,
                        "price": 5
                      },
                      "quantity": 1,
                      "quantity_discount": 0,
                      "total": 5
                    },
                    "quoted_at": "2026-07-30T16:40:00Z"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/analyze": {
      "post": {
        "operationId": "analyze",
        "summary": "Analyze — model geometry only, no slice (paid, $0.002 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "Bounding box (mm), volume (cm³), triangle count, watertight flag, fits-on-bed. No slice — fast + cheap.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "2000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/analyze",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, PLY). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id for the fits-on-bed check (optional)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Model geometry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/preview": {
      "post": {
        "operationId": "preview",
        "summary": "Preview — base64 PNG render of the model, no slice (paid, $0.005 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "A base64-encoded PNG render of the uploaded model. No slice.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "5000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/preview",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 120
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, PLY). Max 64 MB."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "PNG render",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/slice": {
      "post": {
        "operationId": "slice",
        "summary": "Slice — print time, filament, layers, geometry (paid, $0.005 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "Slice — print time, filament, layers, geometry (paid, $0.005 USDC on Base)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "5000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/slice",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, STEP). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, pla-cf, petg, petg-cf, abs, abs-cf, asa, asa-cf, nylon, pc, pet, tpu. Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Sparse infill density 0–100."
                  },
                  "supports": {
                    "type": "string",
                    "description": "auto | none | tree."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/slice/preview": {
      "post": {
        "operationId": "slice_preview",
        "summary": "Slice + preview PNG (paid, $0.01 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "Slice + preview PNG (paid, $0.01 USDC on Base)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "10000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/slice/preview",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, STEP). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, pla-cf, petg, petg-cf, abs, abs-cf, asa, asa-cf, nylon, pc, pet, tpu. Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Sparse infill density 0–100."
                  },
                  "supports": {
                    "type": "string",
                    "description": "auto | none | tree."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/slice/gcode": {
      "post": {
        "operationId": "slice_gcode",
        "summary": "Slice + sliced g-code gzip+base64 (paid, $0.015 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "Slice + sliced g-code gzip+base64 (paid, $0.015 USDC on Base)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "15000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/slice/gcode",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, STEP). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, pla-cf, petg, petg-cf, abs, abs-cf, asa, asa-cf, nylon, pc, pet, tpu. Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Sparse infill density 0–100."
                  },
                  "supports": {
                    "type": "string",
                    "description": "auto | none | tree."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/slice/full": {
      "post": {
        "operationId": "slice_full",
        "summary": "Slice + preview + g-code (paid, $0.02 USDC on Base)",
        "tags": [
          "Slice"
        ],
        "description": "Slice + preview + g-code (paid, $0.02 USDC on Base)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "20000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/slice/full",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, STEP). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, pla-cf, petg, petg-cf, abs, abs-cf, asa, asa-cf, nylon, pc, pet, tpu. Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Sparse infill density 0–100."
                  },
                  "supports": {
                    "type": "string",
                    "description": "auto | none | tree."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/dfm-preview": {
      "post": {
        "operationId": "dfm_preview",
        "summary": "DFM preview — geometry-only printability check, no slice (FREE)",
        "tags": [
          "DFM"
        ],
        "security": [],
        "description": "Free teaser. Geometry-only DFM: printable-so-far verdict, watertight/manifold, wall-thickness estimate vs nozzle, and an overhang heuristic — no slice. For the exact support-material and material-saving deltas, pay for POST /agent/v1/dfm.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, PLY). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, petg, abs, asa, tpu, pc, nylon, pet (+ -cf variants). Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Baseline infill density 0–100 (default 15)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Geometry DFM report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/agent/v1/dfm": {
      "post": {
        "operationId": "dfm",
        "summary": "DFM report — printability verdict + exact support/material deltas (paid, $0.01 USDC on Base)",
        "tags": [
          "DFM"
        ],
        "description": "Structured DFM / printability report. Geometry checks (fits-on-bed, watertight, wall-thickness estimate, overhang analysis) PLUS exact support-material and infill material-saving deltas from real slices, and a definitive printable verdict (yes/with-warnings/no). Every field labelled `basis: exact | heuristic`.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "10000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/dfm",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, PLY). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, petg, abs, asa, tpu, pc, nylon, pet (+ -cf variants). Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Baseline infill density 0–100 (default 15)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DFM report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/orient": {
      "post": {
        "operationId": "orient",
        "summary": "Orientation optimiser — least-support orientation from real slices (paid, $0.02 USDC on Base)",
        "tags": [
          "DFM"
        ],
        "description": "Really slices up to 4 candidate orientations (with automatic supports) and recommends the one using the least support material. Exact, slice-derived; the candidate set is a bounded axis-aligned sampling, not a global optimum.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "20000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/orient",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 300
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "3D model (STL, 3MF, OBJ, PLY). Max 64 MB."
                  },
                  "printer": {
                    "type": "string",
                    "description": "Printer id from GET /agent/overview `fleet`. Default elegoo-neptune4-max."
                  },
                  "material": {
                    "type": "string",
                    "description": "pla, petg, abs, asa, tpu, pc, nylon, pet (+ -cf variants). Default pla."
                  },
                  "quality": {
                    "type": "string",
                    "description": "draft (0.28mm) | standard (0.20mm) | fine (0.12mm)."
                  },
                  "layer_height": {
                    "type": "string",
                    "description": "Explicit layer height mm (0.04–0.6); overrides quality."
                  },
                  "infill_percent": {
                    "type": "string",
                    "description": "Baseline infill density 0–100 (default 15)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Orientation ranking + recommendation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/v1/attest/schema": {
      "get": {
        "operationId": "attest_schema",
        "summary": "Attestation schema + ed25519 verification key (free)",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Attestation I/O schema, limits, and public verification key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/agent/v1/attest": {
      "post": {
        "operationId": "attest",
        "summary": "Attest — signed point-in-time URL observation (paid, $0.01 USDC on Base)",
        "tags": [
          "Attest"
        ],
        "description": "Independent point-in-time observation of a public URL, signed with ed25519. Fetches the URL from a neutral third-party host and returns HTTP status, final URL after redirects, sha256 of the exact bytes received, size, and cache headers — plus your chosen check (exists / contains a string / content hash). Useful when an agent needs a durable, verifiable record that a page said something at a specific moment.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "10000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://fabtally.com/agent/v1/attest",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "check"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Absolute http(s) URL to observe. Must resolve to a public IP; private/loopback/link-local ranges are refused at every redirect hop."
                  },
                  "check": {
                    "type": "string",
                    "enum": [
                      "exists",
                      "contains",
                      "hash"
                    ],
                    "description": "What to assert: \"exists\", \"contains\" (needs needle), or \"hash\"."
                  },
                  "needle": {
                    "type": "string",
                    "description": "Substring to look for when check=\"contains\". 1024 chars max."
                  }
                }
              },
              "example": {
                "url": "https://example.com/pricing",
                "check": "contains",
                "needle": "$49/mo"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed attestation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The URL as requested (normalized)."
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "UTC ISO-8601 timestamp of the observation."
                    },
                    "check": {
                      "type": "string",
                      "enum": [
                        "exists",
                        "contains",
                        "hash"
                      ]
                    },
                    "needle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "httpStatus": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Status of the final hop; null if the fetch failed."
                    },
                    "finalUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL after following redirects."
                    },
                    "redirects": {
                      "type": "array",
                      "description": "Every redirect hop taken, in order.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "type": "string"
                          },
                          "status": {
                            "type": "integer"
                          },
                          "to": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "result": {
                      "type": [
                        "boolean",
                        "string",
                        "null"
                      ],
                      "description": "Boolean for exists/contains; sha256 hex string for hash; null if unobtainable."
                    },
                    "sha256": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "sha256 (hex) of the exact response bytes received."
                    },
                    "bodyBytes": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "headersSubset": {
                      "type": "object",
                      "properties": {
                        "content-type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last-modified": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "etag": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "error": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Set when the observation could not be completed as a 2xx fetch (DNS failure, timeout, blocked address, non-2xx status, oversized body). The attestation is still returned and still signed — 'the URL did not respond at time T' is itself an observation.",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "attestor": {
                      "type": "string",
                      "enum": [
                        "attest.fabtally.com/v0"
                      ]
                    },
                    "disclaimer": {
                      "type": "string",
                      "enum": [
                        "point-in-time observation, not a legal attestation"
                      ]
                    },
                    "signature": {
                      "type": "object",
                      "description": "ed25519 signature over the canonical JSON of this object with the `signature` field removed and keys serialized in the documented order. Verify with the public key from GET /agent/v1/attest/schema.",
                      "properties": {
                        "alg": {
                          "type": "string"
                        },
                        "keyId": {
                          "type": "string"
                        },
                        "publicKeySpkiB64": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string",
                          "description": "base64 signature"
                        },
                        "canonicalization": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "example": {
                    "url": "https://example.com/pricing",
                    "fetchedAt": "2026-07-30T19:05:00.000Z",
                    "check": "contains",
                    "needle": "$49/mo",
                    "httpStatus": 200,
                    "finalUrl": "https://example.com/pricing",
                    "redirects": [],
                    "result": true,
                    "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
                    "bodyBytes": 18422,
                    "headersSubset": {
                      "content-type": "text/html; charset=utf-8",
                      "last-modified": null,
                      "etag": "W/\"47f0-x\""
                    },
                    "error": null,
                    "attestor": "attest.fabtally.com/v0",
                    "disclaimer": "point-in-time observation, not a legal attestation",
                    "signature": {
                      "alg": "ed25519",
                      "keyId": "…",
                      "publicKeySpkiB64": "…",
                      "value": "…",
                      "canonicalization": "…"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/agent/health": {
      "get": {
        "operationId": "health_check",
        "summary": "Health check (free)",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}