{
  "openapi": "3.1.0",
  "info": {
    "title": "All AI LLC API: documents, calculators and data",
    "version": "0.1.10.9",
    "description": "One-time prepaid credits (no subscriptions). Paid tools charge only after a successful result. Keyless callers get 3 free trial calls a day. Same tools on MCP at https://allai-api.allaihq.workers.dev/mcp.",
    "x-operator": "All AI LLC",
    "x-subscriptions": false,
    "x-support": "ops@allaiforms.com",
    "contact": {
      "email": "ops@allaiforms.com"
    },
    "termsOfService": "https://allai-api.allaihq.workers.dev/terms",
    "x-logo": {
      "url": "https://allai-api.allaihq.workers.dev/logo.svg"
    }
  },
  "servers": [
    {
      "url": "https://allai-api.allaihq.workers.dev",
      "description": "Live"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/offers.json": {
      "get": {
        "summary": "Cross-brand offer feed",
        "responses": {
          "200": {
            "description": "Offers"
          }
        }
      }
    },
    "/v1/brands": {
      "get": {
        "summary": "Participating brands",
        "responses": {
          "200": {
            "description": "Brands"
          }
        }
      }
    },
    "/v1/pricing": {
      "get": {
        "summary": "Live prepaid prices and pack payment links",
        "responses": {
          "200": {
            "description": "Pricing"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Agent-oriented description",
        "responses": {
          "200": {
            "description": "text"
          }
        }
      }
    },
    "/index.json": {
      "get": {
        "summary": "Machine-readable endpoint index, including /mcp and /graphql",
        "responses": {
          "200": {
            "description": "Index"
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "summary": "MCP discovery (no key needed)",
        "responses": {
          "200": {
            "description": "Descriptor"
          }
        }
      },
      "post": {
        "summary": "Streamable HTTP MCP JSON-RPC: initialize, tools/list, tools/call. Free tools need no key; paid tools take a Bearer key (or X-Api-Key) and spend prepaid credits only on success. Not advice.",
        "security": [
          {
            "bearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/graphql": {
      "get": {
        "summary": "GraphQL schema docs, or run a query via ?query=",
        "responses": {
          "200": {
            "description": "Docs or result"
          }
        }
      },
      "post": {
        "summary": "Read-only GraphQL over the ALL AI Forms catalog. Clients request exact fields. Depth and size limits apply. No auth. Not advice.",
        "responses": {
          "200": {
            "description": "GraphQL result"
          },
          "400": {
            "description": "Query error"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/v1/workflows": {
      "get": {
        "summary": "Workflow registry index (free, read-only)",
        "responses": {
          "200": {
            "description": "Index"
          }
        }
      }
    },
    "/v1/workflows/search": {
      "get": {
        "summary": "Search 1,000 workflows (free).",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "form",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results"
          },
          "400": {
            "description": "Query or filter required"
          }
        }
      }
    },
    "/v1/workflows/{id}": {
      "get": {
        "summary": "One workflow record (free). checkout_url is null until files can be delivered.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/v1/workflows/compose": {
      "post": {
        "summary": "Combine 2-10 workflows into a free plan outline with the strictest approval gates kept. Does not run anything.",
        "responses": {
          "200": {
            "description": "Plan"
          },
          "400": {
            "description": "Bad ids"
          }
        }
      }
    },
    "/v1/workflows/schema.json": {
      "get": {
        "summary": "mwf-1.0 JSON Schema",
        "responses": {
          "200": {
            "description": "Schema"
          }
        }
      }
    },
    "/v1/registry/{id}": {
      "get": {
        "summary": "Registry entry: URN, version, sha256 fingerprint (free)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entry"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/v1/registry/verify": {
      "get": {
        "summary": "Check id + sha256 against the registry (free)",
        "responses": {
          "200": {
            "description": "match true/false"
          }
        }
      },
      "post": {
        "summary": "Check a full record or id + sha256 (free)",
        "responses": {
          "200": {
            "description": "match true/false"
          }
        }
      }
    },
    "/v1/navigators/precheck": {
      "post": {
        "summary": "Free pre-action check (illustrations, not predictions). Funnel to $2.99 guides on the existing shared payment link. Not advice.",
        "responses": {
          "200": {
            "description": "Checklist and matching guides"
          },
          "400": {
            "description": "Invalid body"
          },
          "413": {
            "description": "Body too large"
          }
        }
      },
      "get": {
        "summary": "Describe the free precheck",
        "responses": {
          "200": {
            "description": "Docs"
          }
        }
      }
    },
    "/v1/credits": {
      "get": {
        "operationId": "credits",
        "summary": "Remaining credits",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/data/offer_match": {
      "get": {
        "summary": "Match a request to buyable offers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked offers"
          },
          "402": {
            "description": "Credits required or insufficient"
          }
        }
      }
    },
    "/v1/data/catalog_query": {
      "get": {
        "summary": "Query owned product metadata",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Matches"
          },
          "402": {
            "description": "Credits required or insufficient"
          }
        }
      }
    },
    "/v1/data/offers/{id}": {
      "get": {
        "summary": "Look up one offer",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Offer"
          },
          "402": {
            "description": "Credits required or insufficient"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/v1/tools/generate_job_hazard_analysis": {
      "post": {
        "operationId": "tool_generate_job_hazard_analysis",
        "summary": "Job Hazard Analysis (PDF and Word)",
        "description": "Break a job into steps, list the hazards of each step, and record the controls, using the task-step-hazard-control method in OSHA Publication 3071. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/job-hazard-analysis/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "job": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Job or task"
                      },
                      "loc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Location"
                      },
                      "jha_no": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "JHA number"
                      },
                      "date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "rev": {
                        "type": "string",
                        "enum": [
                          "New",
                          "Revised"
                        ],
                        "description": "New or revised"
                      },
                      "analyst": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Analyzed by (name or job title)"
                      },
                      "supervisor": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Supervisor"
                      },
                      "workers": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employees who took part"
                      },
                      "tools": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Tools, equipment and materials"
                      },
                      "ppe": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Hard hat",
                            "Safety glasses",
                            "Face shield",
                            "Hearing protection",
                            "Gloves",
                            "Safety-toe footwear",
                            "High-visibility apparel",
                            "Fall protection",
                            "Respirator",
                            "FR clothing"
                          ]
                        },
                        "description": "Required PPE"
                      },
                      "ppe_other": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Other PPE"
                      },
                      "reviewer": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reviewed and approved by"
                      },
                      "next": {
                        "type": "string",
                        "description": "Next review date. YYYY-MM-DD."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "steps": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Job steps, hazards and controls. Each row is an object keyed by column id (step = Job step; hazard = Hazards; conseq = What could happen; controls = Controls (eliminate, substitute, engineer, admin, PPE); who = Who) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "description": "Job step"
                                },
                                "hazard": {
                                  "type": "string",
                                  "description": "Hazards"
                                },
                                "conseq": {
                                  "type": "string",
                                  "description": "What could happen"
                                },
                                "controls": {
                                  "type": "string",
                                  "description": "Controls (eliminate, substitute, engineer, admin, PPE)"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Who"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "crew": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Crew review. Each row is an object keyed by column id (name = Name; sig = Signature; date = Date) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name"
                                },
                                "sig": {
                                  "type": "string",
                                  "description": "Signature"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_emergency_action_plan": {
      "post": {
        "operationId": "tool_generate_emergency_action_plan",
        "summary": "Emergency Action Plan (PDF and Word)",
        "description": "Write a site-specific emergency action plan organized around the six minimum elements in OSHA 29 CFR 1910.38(c): reporting, evacuation, critical operations, accounting for employees, rescue and medical duties, and who to contact. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/emergency-action-plan/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company"
                      },
                      "site": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Site name and address"
                      },
                      "emp": {
                        "type": "string",
                        "description": "Number of employees on site. Number as text, e.g. \"1200\"."
                      },
                      "eff": {
                        "type": "string",
                        "description": "Plan effective date. YYYY-MM-DD."
                      },
                      "coord": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Plan coordinator (name or job title)"
                      },
                      "coord_ph": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Coordinator phone"
                      },
                      "report": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "How employees report an emergency (Example: call 911, then tell the supervisor; pull the nearest fire alarm station.)"
                      },
                      "alarm": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Alarm system and how it sounds (Example: horn and strobe; PA announcement; text alert.)"
                      },
                      "evac": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Evacuation procedures and type (full, partial, shelter in place)"
                      },
                      "routes": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Exit routes and where the route maps are posted"
                      },
                      "assist": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Help for visitors and people who need assistance"
                      },
                      "critical": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Who stays briefly to shut down equipment or processes, and when they must leave"
                      },
                      "account": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "How the head count is taken and reported"
                      },
                      "rescue": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Employees assigned rescue or medical duties (only if trained), or state that none are assigned"
                      },
                      "train": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "How and when employees are trained on this plan"
                      },
                      "review": {
                        "type": "string",
                        "description": "Last review date. YYYY-MM-DD."
                      },
                      "next": {
                        "type": "string",
                        "description": "Next review date. YYYY-MM-DD."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "assembly": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Assembly areas. Each row is an object keyed by column id (area = Area or building; point = Assembly point; lead = Head-count lead) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "area": {
                                  "type": "string",
                                  "description": "Area or building"
                                },
                                "point": {
                                  "type": "string",
                                  "description": "Assembly point"
                                },
                                "lead": {
                                  "type": "string",
                                  "description": "Head-count lead"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "contacts": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "6. Who to contact for more information. Each row is an object keyed by column id (role = Role; name = Name or job title; phone = Phone) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "description": "Role"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name or job title"
                                },
                                "phone": {
                                  "type": "string",
                                  "description": "Phone"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "types": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Emergency types and response. Each row is an object keyed by column id (type = Emergency; resp = What employees do) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Emergency"
                                },
                                "resp": {
                                  "type": "string",
                                  "description": "What employees do"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_fire_prevention_plan": {
      "post": {
        "operationId": "tool_generate_fire_prevention_plan",
        "summary": "Fire Prevention Plan (PDF and Word)",
        "description": "A fire prevention plan organized around the elements in OSHA 29 CFR 1910.39, plus a monthly portable fire extinguisher check log and a housekeeping checklist. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/fire-prevention-plan/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company"
                      },
                      "site": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Site name and address"
                      },
                      "eff": {
                        "type": "string",
                        "description": "Plan effective date. YYYY-MM-DD."
                      },
                      "coord": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Plan coordinator (name or job title)"
                      },
                      "house": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Housekeeping procedures for flammable and combustible waste"
                      },
                      "maint": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Maintenance of heat-producing equipment"
                      },
                      "train": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "How employees are told about the fire hazards of their jobs"
                      },
                      "review": {
                        "type": "string",
                        "description": "Last review date. YYYY-MM-DD."
                      },
                      "next": {
                        "type": "string",
                        "description": "Next review date. YYYY-MM-DD."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "hazards": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Major fire hazards, handling and storage, and ignition control. Each row is an object keyed by column id (hazard = Fire hazard or fuel; where = Where; store = Handling and storage; ign = Ignition sources and control; equip = Fire protection equipment) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "hazard": {
                                  "type": "string",
                                  "description": "Fire hazard or fuel"
                                },
                                "where": {
                                  "type": "string",
                                  "description": "Where"
                                },
                                "store": {
                                  "type": "string",
                                  "description": "Handling and storage"
                                },
                                "ign": {
                                  "type": "string",
                                  "description": "Ignition sources and control"
                                },
                                "equip": {
                                  "type": "string",
                                  "description": "Fire protection equipment"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "resp": {
                        "type": "array",
                        "maxItems": 15,
                        "description": "People responsible. Each row is an object keyed by column id (duty = Duty; who = Name or job title) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "duty": {
                                  "type": "string",
                                  "description": "Duty"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Name or job title"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "house_chk": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Housekeeping checklist. Each row is an object keyed by column id (item = Item; st = Status; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "OK",
                                    "Needs attention",
                                    "N/A"
                                  ],
                                  "description": "Status"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "ext": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Monthly portable fire extinguisher check log. Each row is an object keyed by column id (loc = Location; type = Type / size; date = Date checked; ok = Charged, sealed, unblocked; init = Initials) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "type": {
                                  "type": "string",
                                  "description": "Type / size"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date checked"
                                },
                                "ok": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No",
                                    "N/A"
                                  ],
                                  "description": "Charged, sealed, unblocked"
                                },
                                "init": {
                                  "type": "string",
                                  "description": "Initials"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_equipment_inspection_checklist": {
      "post": {
        "operationId": "tool_generate_equipment_inspection_checklist",
        "summary": "Equipment Inspection Checklist (PDF and Word)",
        "description": "A pre-use or periodic inspection checklist with starter items for forklifts, aerial lifts, ladders, compressors, vehicles and general machinery. The inspector records each item and decides whether the equipment stays in service. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/equipment-inspection-checklist/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "preset": {
                        "type": "string",
                        "enum": [
                          "Forklift (powered industrial truck)",
                          "Aerial lift or scissor lift",
                          "Portable ladder",
                          "Air compressor",
                          "Fleet vehicle",
                          "General machinery"
                        ],
                        "description": "Equipment type"
                      },
                      "equip": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Make, model and description"
                      },
                      "unit": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Unit or asset number"
                      },
                      "loc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Location"
                      },
                      "meter": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Hours or mileage"
                      },
                      "insp": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector"
                      },
                      "date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "freq": {
                        "type": "string",
                        "enum": [
                          "Pre-use / daily",
                          "Weekly",
                          "Monthly",
                          "Annual",
                          "After repair"
                        ],
                        "description": "Inspection type"
                      },
                      "result": {
                        "type": "string",
                        "enum": [
                          "OK for use",
                          "Removed from service until repaired"
                        ],
                        "description": "Inspector decision"
                      },
                      "defects": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Defects reported to and repair work order"
                      },
                      "sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector signature"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 60,
                        "description": "Inspection items. Each row is an object keyed by column id (item = Item; st = Status; note = Notes or defect found) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "OK",
                                    "Needs attention",
                                    "N/A"
                                  ],
                                  "description": "Status"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes or defect found"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_hot_work_permit": {
      "post": {
        "operationId": "tool_generate_hot_work_permit",
        "summary": "Hot Work Permit (PDF and Word)",
        "description": "A one-job, one-shift hot-work permit with a precautions checklist, fire watch record and closeout, following the permit approach in OSHA 29 CFR 1910.252 and NFPA 51B. Your Permit Authorizing Individual completes and signs it. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/hot-work-permit/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "pno": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Permit number"
                      },
                      "date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "from": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Valid from (time)"
                      },
                      "to": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Valid to (time)"
                      },
                      "loc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Building, floor and exact location"
                      },
                      "work": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Work to be done"
                      },
                      "kind": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Welding",
                            "Cutting",
                            "Brazing",
                            "Soldering",
                            "Grinding",
                            "Torch-applied roofing",
                            "Thawing pipe"
                          ]
                        },
                        "description": "Type of hot work"
                      },
                      "avoid": {
                        "type": "string",
                        "enum": [
                          "No, permit needed",
                          "Yes, moved (no permit needed)"
                        ],
                        "description": "Could the work be avoided or moved to a designated hot-work area?"
                      },
                      "operator": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Hot-work operator"
                      },
                      "contractor": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Contractor (if any)"
                      },
                      "watch": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Fire watch"
                      },
                      "fw_min": {
                        "type": "string",
                        "description": "Fire watch time after work ends (minutes) (OSHA 1910.252 sets at least 30; your NFPA 51B edition or insurer may require longer). Number as text, e.g. \"1200\"."
                      },
                      "end": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Work finished at (time)"
                      },
                      "fw_end": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Fire watch ended at (time)"
                      },
                      "final": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Final check of area at (time) and by"
                      },
                      "pai": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Permit Authorizing Individual (PAI)"
                      },
                      "pai_sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "PAI signature"
                      },
                      "op_sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Operator signature"
                      },
                      "fw_sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Fire watch signature"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "prec": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Required precautions. Each row is an object keyed by column id (item = Precaution; st = Done; init = Initials) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Precaution"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No",
                                    "N/A"
                                  ],
                                  "description": "Done"
                                },
                                "init": {
                                  "type": "string",
                                  "description": "Initials"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_incident_investigation": {
      "post": {
        "operationId": "tool_generate_incident_investigation",
        "summary": "Workplace Incident Investigation (PDF and Word)",
        "description": "Document what happened, the timeline, witness accounts, contributing factors, root causes and corrective actions, following the approach in OSHA's incident investigation guide for employers. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/incident-investigation/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "case": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Case or report number"
                      },
                      "dt": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Date and time of incident"
                      },
                      "loc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Exact location"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Injury or illness",
                          "Property damage",
                          "Near miss",
                          "Vehicle",
                          "Environmental release",
                          "Other"
                        ],
                        "description": "Type"
                      },
                      "people": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "People involved (names or job titles)"
                      },
                      "desc": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "What happened, in plain words"
                      },
                      "immed": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Immediate actions taken"
                      },
                      "team": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Investigation team"
                      },
                      "start": {
                        "type": "string",
                        "description": "Investigation started. YYYY-MM-DD."
                      },
                      "f_people": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "People and training"
                      },
                      "f_equip": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Equipment and tools"
                      },
                      "f_env": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Environment and conditions"
                      },
                      "f_proc": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Procedures and work methods"
                      },
                      "f_mgmt": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Management systems (planning, staffing, supervision)"
                      },
                      "root": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Root cause or causes found"
                      },
                      "lead": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Investigation lead"
                      },
                      "closed": {
                        "type": "string",
                        "description": "Date closed. YYYY-MM-DD."
                      },
                      "mgr": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reviewed by management"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "timeline": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Timeline of events. Each row is an object keyed by column id (time = Time; event = Event) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "time": {
                                  "type": "string",
                                  "description": "Time"
                                },
                                "event": {
                                  "type": "string",
                                  "description": "Event"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "witness": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Witnesses. Each row is an object keyed by column id (name = Name; contact = Contact; summary = Statement summary (their own words)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name"
                                },
                                "contact": {
                                  "type": "string",
                                  "description": "Contact"
                                },
                                "summary": {
                                  "type": "string",
                                  "description": "Statement summary (their own words)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "whys": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Root cause (5 whys). Each row is an object keyed by column id (q = Why?; a = Because) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "q": {
                                  "type": "string",
                                  "description": "Why?"
                                },
                                "a": {
                                  "type": "string",
                                  "description": "Because"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "actions": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Corrective actions. Each row is an object keyed by column id (act = Action; level = Control level; owner = Owner; due = Due; st = Status) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "act": {
                                  "type": "string",
                                  "description": "Action"
                                },
                                "level": {
                                  "type": "string",
                                  "enum": [
                                    "Eliminate",
                                    "Substitute",
                                    "Engineering",
                                    "Administrative",
                                    "PPE"
                                  ],
                                  "description": "Control level"
                                },
                                "owner": {
                                  "type": "string",
                                  "description": "Owner"
                                },
                                "due": {
                                  "type": "string",
                                  "description": "Due"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "Open",
                                    "In progress",
                                    "Done"
                                  ],
                                  "description": "Status"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_near_miss_report": {
      "post": {
        "operationId": "tool_generate_near_miss_report",
        "summary": "Near-Miss Report and Log (PDF and Word)",
        "description": "A quick near-miss report (what happened, what could have happened, suggested fix) plus a running log so you can track follow-up and spot patterns before someone gets hurt. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/near-miss-report/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "dt": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Date and time"
                      },
                      "loc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Location"
                      },
                      "by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reported by (optional; reports can be anonymous)"
                      },
                      "cat": {
                        "type": "string",
                        "enum": [
                          "Slip, trip or fall",
                          "Struck by or caught in",
                          "Vehicle or forklift",
                          "Electrical",
                          "Fire or hot work",
                          "Chemical",
                          "Ergonomic",
                          "Other"
                        ],
                        "description": "Category"
                      },
                      "what": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "What happened"
                      },
                      "could": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "What could have happened"
                      },
                      "pot": {
                        "type": "string",
                        "enum": [
                          "Minor",
                          "Serious",
                          "Could have been life-threatening"
                        ],
                        "description": "How serious could it have been (reporter's view)"
                      },
                      "fix_now": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "What was done right away"
                      },
                      "suggest": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Suggested fix"
                      },
                      "owner": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Follow-up owner"
                      },
                      "action": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Action taken"
                      },
                      "closed": {
                        "type": "string",
                        "description": "Closed on. YYYY-MM-DD."
                      },
                      "shared": {
                        "type": "string",
                        "description": "Shared with the crew on. YYYY-MM-DD."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "log": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Near-miss log. Each row is an object keyed by column id (date = Date; loc = Location; sum = Summary; act = Action; owner = Owner; st = Status) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "sum": {
                                  "type": "string",
                                  "description": "Summary"
                                },
                                "act": {
                                  "type": "string",
                                  "description": "Action"
                                },
                                "owner": {
                                  "type": "string",
                                  "description": "Owner"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "Open",
                                    "Done"
                                  ],
                                  "description": "Status"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_root_cause_analysis": {
      "post": {
        "operationId": "tool_generate_root_cause_analysis",
        "summary": "Root-Cause Analysis (PDF and Word)",
        "description": "Work a problem down to its root causes with 5 whys and a fishbone (6M) breakdown, then record corrective and preventive actions and how you will check they worked. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/root-cause-analysis/ . This tool helps qualified, competent people organize their own safety paperwork. It does not certify compliance with OSHA, NFPA, state-plan, insurer or local fire-code requirements, and it does not replace a site-specific review by a qualified person. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or team"
                      },
                      "ref": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reference number"
                      },
                      "date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "problem": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Problem statement (what, where, when, how big)"
                      },
                      "team": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Team members"
                      },
                      "contain": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Containment already in place"
                      },
                      "m_people": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "People"
                      },
                      "m_machine": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Machine and equipment"
                      },
                      "m_method": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Method and procedure"
                      },
                      "m_material": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Material"
                      },
                      "m_measure": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Measurement"
                      },
                      "m_env": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Environment"
                      },
                      "root": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Root cause statement"
                      },
                      "verify": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "How and when effectiveness will be checked"
                      },
                      "result": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Result"
                      },
                      "closed": {
                        "type": "string",
                        "description": "Closed on. YYYY-MM-DD."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "whys": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "5 whys. Each row is an object keyed by column id (q = Why?; a = Because; ev = Evidence) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "q": {
                                  "type": "string",
                                  "description": "Why?"
                                },
                                "a": {
                                  "type": "string",
                                  "description": "Because"
                                },
                                "ev": {
                                  "type": "string",
                                  "description": "Evidence"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "capa": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Corrective and preventive actions. Each row is an object keyed by column id (act = Action; kind = Type; owner = Owner; due = Due) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "act": {
                                  "type": "string",
                                  "description": "Action"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "Corrective",
                                    "Preventive"
                                  ],
                                  "description": "Type"
                                },
                                "owner": {
                                  "type": "string",
                                  "description": "Owner"
                                },
                                "due": {
                                  "type": "string",
                                  "description": "Due"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_independent_contractor_agreement_organizer": {
      "post": {
        "operationId": "tool_generate_independent_contractor_agreement_organizer",
        "summary": "Independent Contractor Agreement Worksheet (PDF and Word)",
        "description": "Organize the terms of an independent contractor agreement before you sign one: scope, deliverables, fee, payment timing, ownership of work, confidentiality and ending the work, with general state notes. It does not decide whether someone is an employee or a contractor. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/independent-contractor-agreement-organizer/ . This is a template and organizer, not legal advice. ALL AI Forms is not a law firm. State notes are general information that can change; check the official sources and consider having a lawyer review your agreement.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "client": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Client (business name)"
                      },
                      "contractor": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Contractor (name or business name)"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "State where the work is done"
                      },
                      "start": {
                        "type": "string",
                        "description": "Start date. YYYY-MM-DD."
                      },
                      "end": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "End date or \"until the project is done\""
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Services and scope"
                      },
                      "deliver": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Deliverables and deadlines"
                      },
                      "method": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Who controls how, when and where the work is done (Contractors usually set their own methods, hours and tools.)"
                      },
                      "fee": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Fee (fixed, hourly or per deliverable)"
                      },
                      "pay": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Invoice and payment timing (Example: invoice on delivery, paid within 30 days)"
                      },
                      "exp": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Expenses (who pays, and approval needed)"
                      },
                      "w9": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Tax forms (Example: contractor provides IRS Form W-9; client issues 1099-NEC if required)"
                      },
                      "ip": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Who owns the work product"
                      },
                      "conf": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Confidentiality"
                      },
                      "ins": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Insurance the contractor carries"
                      },
                      "term": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "How either side can end the agreement"
                      },
                      "dispute": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Disputes (governing state, mediation)"
                      },
                      "cls": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "The contractor decides how, when and where the work is done",
                            "The contractor uses their own tools and equipment",
                            "The contractor can work for other clients",
                            "The contractor is paid per project or invoice, not a salary",
                            "The contractor has their own business (license, website, other clients)",
                            "The work is outside the client's usual line of business"
                          ]
                        },
                        "description": "Classification questions to discuss (not a test result)"
                      },
                      "sig_c": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Client signature and date"
                      },
                      "sig_k": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Contractor signature and date"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {},
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_profit_margin_break_even_calculator": {
      "post": {
        "operationId": "tool_generate_profit_margin_break_even_calculator",
        "summary": "Profit Margin and Break-Even Report (PDF and Word)",
        "description": "Enter your price, costs and expected sales to see your margin, markup, break-even point and the sales you need for a profit goal. The calculator is free. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/profit-margin-break-even-calculator/ . Estimates from the numbers you enter. Not tax, accounting or financial advice.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business or product"
                      },
                      "price": {
                        "type": "string",
                        "description": "Selling price per unit ($). Number as text, e.g. \"1200\"."
                      },
                      "vc": {
                        "type": "string",
                        "description": "Variable cost per unit ($) (Materials, packaging, shipping, payment fees per sale). Number as text, e.g. \"1200\"."
                      },
                      "fixed": {
                        "type": "string",
                        "description": "Fixed costs per month ($) (Rent, software, insurance, salaries). Number as text, e.g. \"1200\"."
                      },
                      "units": {
                        "type": "string",
                        "description": "Expected units sold per month. Number as text, e.g. \"1200\"."
                      },
                      "target": {
                        "type": "string",
                        "description": "Profit goal per month ($). Number as text, e.g. \"1200\"."
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Assumptions and notes"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {},
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_llc_operating_agreement_organizer": {
      "post": {
        "operationId": "tool_generate_llc_operating_agreement_organizer",
        "summary": "LLC Operating Agreement Term Sheet (owners' draft) (PDF and Word)",
        "description": "Record the decisions the owners make about running their LLC (members and ownership, contributions, management, voting, distributions, transfers, departures and dissolution) and get a term-sheet draft, an ownership and voting table, and a list of open items. Anything the owners have not decided prints as UNDECIDED. It does not recommend terms. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/llc-operating-agreement-organizer/ . This is an organizer, not legal or tax advice. ALL AI Forms is not a law firm. It records the owners' own decisions and does arithmetic on them; it does not recommend terms or say that an agreement is enforceable or protects anyone. Each state's LLC law controls. Review by a licensed attorney is recommended before anyone signs.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "LLC name (exactly as on the state filing)"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "State of formation"
                      },
                      "filed": {
                        "type": "string",
                        "enum": [
                          "Not filed yet",
                          "Filed",
                          "Not sure"
                        ],
                        "description": "Formation filing status"
                      },
                      "formed": {
                        "type": "string",
                        "description": "Formation date. YYYY-MM-DD."
                      },
                      "office": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Principal office address"
                      },
                      "agent": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Registered agent name and address"
                      },
                      "ein": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "EIN (optional)"
                      },
                      "duration": {
                        "type": "string",
                        "enum": [
                          "Perpetual",
                          "Ends on a fixed date",
                          "Undecided"
                        ],
                        "description": "Duration"
                      },
                      "end_date": {
                        "type": "string",
                        "description": "End date (only if fixed). YYYY-MM-DD."
                      },
                      "purpose": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Business purpose (the owners' words)"
                      },
                      "derive": {
                        "type": "string",
                        "enum": [
                          "The % typed in the member table",
                          "Contribution values (worked out for you)"
                        ],
                        "description": "Ownership % comes from"
                      },
                      "mgmt": {
                        "type": "string",
                        "enum": [
                          "Member-managed",
                          "Manager-managed",
                          "Undecided"
                        ],
                        "description": "Management"
                      },
                      "managers": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Managers (only if manager-managed): names, and whether each is a member"
                      },
                      "vote": {
                        "type": "string",
                        "enum": [
                          "By ownership %",
                          "One vote per member",
                          "Unanimous",
                          "Custom (describe below)",
                          "Undecided"
                        ],
                        "description": "Voting basis"
                      },
                      "vote_custom": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Custom voting terms"
                      },
                      "thr": {
                        "type": "string",
                        "description": "Ordinary decisions pass with more than this % of the votes (Example: 50). Number as text, e.g. \"1200\"."
                      },
                      "thr_major": {
                        "type": "string",
                        "description": "Major decisions pass with at least this % of the votes (Example: 75). Number as text, e.g. \"1200\"."
                      },
                      "major": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Selling all or most assets",
                            "Borrowing above an agreed amount",
                            "Admitting a new member",
                            "Amending the agreement",
                            "Merging or converting the LLC",
                            "Dissolving the LLC"
                          ]
                        },
                        "description": "Decisions that need the major-decision vote"
                      },
                      "major_other": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Other major decisions"
                      },
                      "dist_time": {
                        "type": "string",
                        "enum": [
                          "When the managers or members decide",
                          "Monthly",
                          "Quarterly",
                          "Annually",
                          "Undecided"
                        ],
                        "description": "Distribution timing"
                      },
                      "dist_basis": {
                        "type": "string",
                        "enum": [
                          "Pro rata to ownership %",
                          "Custom (describe below)",
                          "Undecided"
                        ],
                        "description": "Distribution basis"
                      },
                      "dist_custom": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Custom distribution terms"
                      },
                      "capital": {
                        "type": "string",
                        "enum": [
                          "Voluntary only",
                          "Required if approved by the major-decision vote",
                          "Undecided"
                        ],
                        "description": "Additional capital"
                      },
                      "capital_note": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Additional capital notes"
                      },
                      "tax": {
                        "type": "string",
                        "enum": [
                          "Default for the number of members",
                          "Partnership",
                          "S corporation election",
                          "C corporation election",
                          "Undecided"
                        ],
                        "description": "Intended federal tax classification (record only)"
                      },
                      "transfer": {
                        "type": "string",
                        "enum": [
                          "Free transfer",
                          "Consent of the other members required",
                          "Right of first refusal for the other members",
                          "Undecided"
                        ],
                        "description": "Transfers of a membership interest"
                      },
                      "admit": {
                        "type": "string",
                        "enum": [
                          "By the major-decision vote",
                          "Unanimous consent",
                          "Undecided"
                        ],
                        "description": "Admitting new members"
                      },
                      "depart": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Voluntary withdrawal",
                            "Death",
                            "Disability",
                            "Bankruptcy",
                            "Expulsion by vote"
                          ]
                        },
                        "description": "Departure events the agreement covers"
                      },
                      "buyout": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Buy-out terms in the owners' words (price method, payment timing)"
                      },
                      "dissolve": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Vote of the members",
                            "A fixed end date",
                            "Sale of all or substantially all assets",
                            "Other (describe)"
                          ]
                        },
                        "description": "Dissolution triggers"
                      },
                      "dissolve_note": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Dissolution notes"
                      },
                      "dispute": {
                        "type": "string",
                        "enum": [
                          "Negotiation first",
                          "Mediation",
                          "Arbitration",
                          "Court",
                          "Undecided"
                        ],
                        "description": "Disputes"
                      },
                      "law": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "Governing law (state)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "members": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Members, contributions and ownership. Each row is an object keyed by column id (name = Member legal name; addr = Address; ctype = Contribution type; cval = Contribution value ($, owners' figure); pct = Ownership %) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Member legal name"
                                },
                                "addr": {
                                  "type": "string",
                                  "description": "Address"
                                },
                                "ctype": {
                                  "type": "string",
                                  "enum": [
                                    "Cash",
                                    "Property",
                                    "Services",
                                    "Promise to contribute"
                                  ],
                                  "description": "Contribution type"
                                },
                                "cval": {
                                  "type": "string",
                                  "description": "Contribution value ($, owners' figure)"
                                },
                                "pct": {
                                  "type": "string",
                                  "description": "Ownership %"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "sign": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Signatures (when the final agreement is signed). Each row is an object keyed by column id (name = Member; sig = Signature; date = Date) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Member"
                                },
                                "sig": {
                                  "type": "string",
                                  "description": "Signature"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_business_plan_generator": {
      "post": {
        "operationId": "tool_generate_business_plan_generator",
        "summary": "Business Plan (PDF and Word)",
        "description": "Write your business plan in the section order the SBA describes and enter your own revenue, cost, payroll and loan assumptions. The tool builds monthly profit and loss, cash flow, loan payments, break-even and a sensitivity grid from your numbers. Every projection is labeled as your assumption, not a forecast. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/business-plan-generator/ . This is an organizer and calculator, not financial, investment, lending or tax advice. Every number is the owner's own assumption, not a forecast or promise, and nothing here says a lender or investor will accept the plan.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business name"
                      },
                      "owners": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Owner names"
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "Traditional plan",
                          "Lean (one-page) plan"
                        ],
                        "description": "Plan format"
                      },
                      "structure": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Legal structure (as you have chosen it)"
                      },
                      "exec": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Executive summary"
                      },
                      "company": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Company description"
                      },
                      "market": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Market analysis (your own research)"
                      },
                      "team": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Organization and management"
                      },
                      "products": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Products or services"
                      },
                      "marketing": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Marketing and sales"
                      },
                      "request": {
                        "type": "string",
                        "description": "Amount you are asking for ($, leave blank if none). Number as text, e.g. \"1200\"."
                      },
                      "request_note": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Terms you are seeking"
                      },
                      "start": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "First month of the model (YYYY-MM) (Example: 2027-01)"
                      },
                      "horizon": {
                        "type": "string",
                        "enum": [
                          "12",
                          "24",
                          "36"
                        ],
                        "description": "Months to project"
                      },
                      "cash0": {
                        "type": "string",
                        "description": "Opening cash ($). Number as text, e.g. \"1200\"."
                      },
                      "cogs_m": {
                        "type": "string",
                        "enum": [
                          "Percent of revenue",
                          "Cost per unit (from the revenue table)"
                        ],
                        "description": "Cost of goods method"
                      },
                      "cogs_pct": {
                        "type": "string",
                        "description": "Cost of goods, % of revenue (percent method). Number as text, e.g. \"1200\"."
                      },
                      "draws": {
                        "type": "string",
                        "description": "Owner draws per month ($). Number as text, e.g. \"1200\"."
                      },
                      "taxr": {
                        "type": "string",
                        "description": "Placeholder tax rate on positive pre-tax income (%), your placeholder and not a tax estimate. Number as text, e.g. \"1200\"."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "competitors": {
                        "type": "array",
                        "maxItems": 15,
                        "description": "Competitors. Each row is an object keyed by column id (name = Competitor; str = Strengths; weak = Weaknesses) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Competitor"
                                },
                                "str": {
                                  "type": "string",
                                  "description": "Strengths"
                                },
                                "weak": {
                                  "type": "string",
                                  "description": "Weaknesses"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "uses": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Use of funds. Each row is an object keyed by column id (label = Use; amt = Amount ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Use"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "rev": {
                        "type": "array",
                        "maxItems": 15,
                        "description": "Revenue lines. Each row is an object keyed by column id (name = Product or service; u0 = Units sold in month 1; price = Price per unit ($); g = Monthly unit growth %; uc = Cost per unit ($, per-unit method)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Product or service"
                                },
                                "u0": {
                                  "type": "string",
                                  "description": "Units sold in month 1"
                                },
                                "price": {
                                  "type": "string",
                                  "description": "Price per unit ($)"
                                },
                                "g": {
                                  "type": "string",
                                  "description": "Monthly unit growth %"
                                },
                                "uc": {
                                  "type": "string",
                                  "description": "Cost per unit ($, per-unit method)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "fixed": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Fixed expenses. Each row is an object keyed by column id (label = Expense; amt = Per month ($); inc = Annual increase %) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Expense"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Per month ($)"
                                },
                                "inc": {
                                  "type": "string",
                                  "description": "Annual increase %"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "roles": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Team and payroll. Each row is an object keyed by column id (role = Role; name = Name (optional); cost = Monthly cost ($); from = Starts in model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "description": "Role"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name (optional)"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Monthly cost ($)"
                                },
                                "from": {
                                  "type": "string",
                                  "description": "Starts in model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "startup": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Startup costs. Each row is an object keyed by column id (label = Item; amt = Amount ($); m = Model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "m": {
                                  "type": "string",
                                  "description": "Model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "loans": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Loans. Each row is an object keyed by column id (label = Lender or loan; amt = Amount ($); apr = APR %; term = Term (months); m = Received in model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Lender or loan"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "apr": {
                                  "type": "string",
                                  "description": "APR %"
                                },
                                "term": {
                                  "type": "string",
                                  "description": "Term (months)"
                                },
                                "m": {
                                  "type": "string",
                                  "description": "Received in model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_employee_onboarding_package": {
      "post": {
        "operationId": "tool_generate_employee_onboarding_package",
        "summary": "Employee Onboarding Package (PDF and Word)",
        "description": "A new-hire paperwork and first-90-days package for a small employer: a dated checklist built from the first day of work (Form I-9 and W-4 steps, state new-hire report, accounts, training, 30-60-90 check-ins), policy acknowledgments, an equipment issue record and a 30-60-90 plan. It links the official forms and does not fill them in. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/employee-onboarding-package/ . This is an organizer, not legal, tax or immigration advice. It points to the official forms and does not complete or interpret Form W-4 or Form I-9, and it does not decide classification, exempt status, pay, leave or benefits eligibility. State rules vary; check your state's pages. Finishing the checklist does not make an employer compliant.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employer name"
                      },
                      "addr": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employer address"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "Work state"
                      },
                      "nh_days": {
                        "type": "string",
                        "description": "State new-hire report due within (days) (20 (federal rule); your state may set fewer). Number as text, e.g. \"1200\"."
                      },
                      "position": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Position title"
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employee name (optional)"
                      },
                      "start": {
                        "type": "string",
                        "description": "First day of work. YYYY-MM-DD."
                      },
                      "supervisor": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Supervisor"
                      },
                      "pay": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Pay as decided by the employer (basis and amount)"
                      },
                      "schedule": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Schedule (hours per week, days)"
                      },
                      "where": {
                        "type": "string",
                        "enum": [
                          "On-site",
                          "Remote",
                          "Hybrid"
                        ],
                        "description": "Work location"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "benefits": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Health insurance",
                            "Dental",
                            "Vision",
                            "Retirement plan",
                            "Paid time off",
                            "Paid holidays",
                            "Life insurance",
                            "Disability insurance"
                          ]
                        },
                        "description": "Benefits"
                      },
                      "benefits_note": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Benefit notes (waiting periods, enrollment dates, other benefits)"
                      },
                      "posters": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Employee Rights Under the FLSA (minimum wage)",
                            "Employee Rights Under the FMLA",
                            "Employee Polygraph Protection Act",
                            "USERRA",
                            "Know Your Rights: Workplace Discrimination is Illegal (EEOC)",
                            "Job Safety and Health: It's the Law (OSHA)"
                          ]
                        },
                        "description": "Federal posters you display"
                      },
                      "posters_state": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "State and local posters (from your state labor department)"
                      },
                      "g30": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "First 30 days"
                      },
                      "g60": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Days 31 to 60"
                      },
                      "g90": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Days 61 to 90"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "policies": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Policies to acknowledge. Each row is an object keyed by column id (policy = Policy; date = Date delivered; sig = Employee signature) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "policy": {
                                  "type": "string",
                                  "description": "Policy"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date delivered"
                                },
                                "sig": {
                                  "type": "string",
                                  "description": "Employee signature"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "equipment": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Equipment issued. Each row is an object keyed by column id (item = Item; cost = Cost ($); serial = Serial or asset #; date = Date issued) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Cost ($)"
                                },
                                "serial": {
                                  "type": "string",
                                  "description": "Serial or asset #"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date issued"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "accounts": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Accounts to set up (names only, never passwords). Each row is an object keyed by column id (sys = System; who = Set up by; off = Days after first day) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sys": {
                                  "type": "string",
                                  "description": "System"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Set up by"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Days after first day"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "training": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Training plan. Each row is an object keyed by column id (topic = Topic; off = Days after first day; who = Trainer) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "topic": {
                                  "type": "string",
                                  "description": "Topic"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Days after first day"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Trainer"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_independent_contractor_onboarding_checklist": {
      "post": {
        "operationId": "tool_generate_independent_contractor_onboarding_checklist",
        "summary": "Independent Contractor Onboarding Record (PDF and Word)",
        "description": "Bring a contractor on board in order: request the W-9 before the first payment, record the agreed scope and payment terms, track the insurance or license documents they supply, keep a running payment total against the 1099-NEC threshold you enter, log system access and run an off-boarding list. It does not decide whether anyone is an employee or a contractor. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/independent-contractor-onboarding-checklist/ . This is an organizer, not legal or tax advice. It does not decide whether a worker is an employee or an independent contractor and does not say whether a Form 1099-NEC is required for a payee. It does not verify insurance, licenses or identity. Follow the IRS and Department of Labor pages and ask a qualified adviser.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Your business name"
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Contractor (name or business name)"
                      },
                      "entity": {
                        "type": "string",
                        "enum": [
                          "Individual or sole proprietor",
                          "LLC",
                          "Partnership",
                          "C corporation",
                          "S corporation",
                          "Other",
                          "W-9 not received yet"
                        ],
                        "description": "Entity type as reported on the W-9"
                      },
                      "start": {
                        "type": "string",
                        "description": "Start date. YYYY-MM-DD."
                      },
                      "end": {
                        "type": "string",
                        "description": "End date. YYYY-MM-DD."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "Hourly",
                          "Fixed fee",
                          "Milestones"
                        ],
                        "description": "Payment terms"
                      },
                      "rate": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Rate or amount"
                      },
                      "invoice": {
                        "type": "string",
                        "enum": [
                          "Weekly",
                          "Every two weeks",
                          "Monthly",
                          "Per milestone",
                          "On completion"
                        ],
                        "description": "Invoice frequency"
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Scope of work"
                      },
                      "w9": {
                        "type": "string",
                        "enum": [
                          "Not requested yet",
                          "Requested",
                          "Received"
                        ],
                        "description": "Form W-9"
                      },
                      "w9_date": {
                        "type": "string",
                        "description": "W-9 received on. YYYY-MM-DD."
                      },
                      "agr": {
                        "type": "string",
                        "enum": [
                          "Not signed",
                          "Signed"
                        ],
                        "description": "Written agreement"
                      },
                      "agr_date": {
                        "type": "string",
                        "description": "Agreement signed on. YYYY-MM-DD."
                      },
                      "nda": {
                        "type": "string",
                        "enum": [
                          "Yes",
                          "No",
                          "Not sure"
                        ],
                        "description": "Confidentiality and work-ownership terms in the agreement"
                      },
                      "ins": {
                        "type": "string",
                        "enum": [
                          "Not requested",
                          "Requested",
                          "Received"
                        ],
                        "description": "Insurance certificate"
                      },
                      "ins_exp": {
                        "type": "string",
                        "description": "Insurance expires on. YYYY-MM-DD."
                      },
                      "lic": {
                        "type": "string",
                        "enum": [
                          "Not applicable",
                          "Requested",
                          "Received"
                        ],
                        "description": "License or registration (as supplied; not verified)"
                      },
                      "lic_exp": {
                        "type": "string",
                        "description": "License expires on. YYYY-MM-DD."
                      },
                      "lic_desc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "License or registration description"
                      },
                      "warn_days": {
                        "type": "string",
                        "description": "Warn me this many days before a document expires (30). Number as text, e.g. \"1200\"."
                      },
                      "thr": {
                        "type": "string",
                        "description": "Reporting threshold you are tracking ($) (2000). Number as text, e.g. \"1200\"."
                      },
                      "expected": {
                        "type": "string",
                        "description": "Expected payments this year ($). Number as text, e.g. \"1200\"."
                      },
                      "offboard": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Final invoice received",
                            "Last payment made and logged",
                            "System access removed (dates in the access log)",
                            "Equipment and materials returned",
                            "Confidential materials returned or destroyed",
                            "Records kept (agreement, W-9, invoices, payments)"
                          ]
                        },
                        "description": "Off-boarding"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "payments": {
                        "type": "array",
                        "maxItems": 120,
                        "description": "Payments. Each row is an object keyed by column id (date = Date paid; inv = Invoice #; amt = Amount ($); note = Note) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date paid"
                                },
                                "inv": {
                                  "type": "string",
                                  "description": "Invoice #"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Note"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "access": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "System access (names only, never passwords). Each row is an object keyed by column id (sys = System; on = Access granted; off = Access removed) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sys": {
                                  "type": "string",
                                  "description": "System"
                                },
                                "on": {
                                  "type": "string",
                                  "description": "Access granted"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Access removed"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "facts": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Facts about the working relationship (your answers). Each row is an object keyed by column id (cat = Category or factor; q = Question; a = Answer; n = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "cat": {
                                  "type": "string",
                                  "description": "Category or factor"
                                },
                                "q": {
                                  "type": "string",
                                  "description": "Question"
                                },
                                "a": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No",
                                    "N/A"
                                  ],
                                  "description": "Answer"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_business_expense_report_generator": {
      "post": {
        "operationId": "tool_generate_business_expense_report_generator",
        "summary": "Expense Report (PDF and Word)",
        "description": "Build a clean expense report from your receipts: line items by category, mileage at the IRS business rate for the trip date (or your own rate), per diem you enter, advances, and the amount owed to you or back to the company, with flags for missing receipts, possible duplicates and dates outside the period. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/business-expense-report-generator/ . This is an organizer that adds up your entries. It does not decide what is deductible, reimbursable under any plan, or taxable, and it is not an accounting system or a substitute for your employer's expense policy. Rates shown come from the IRS page on the date noted; confirm them before you submit.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employee or report owner"
                      },
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business or department"
                      },
                      "p0": {
                        "type": "string",
                        "description": "Period start. YYYY-MM-DD."
                      },
                      "p1": {
                        "type": "string",
                        "description": "Period end. YYYY-MM-DD."
                      },
                      "purpose": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Purpose of the report"
                      },
                      "rthr": {
                        "type": "string",
                        "description": "Your policy: receipt needed at or above ($). Number as text, e.g. \"1200\"."
                      },
                      "othr": {
                        "type": "string",
                        "description": "Flag 'Other' items above ($). Number as text, e.g. \"1200\"."
                      },
                      "fx": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Currency note (convert foreign amounts to USD before entering)"
                      },
                      "sig_e": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Submitted by (signature and date)"
                      },
                      "sig_a": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Approved by (signature and date)"
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Notes"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Expenses. Each row is an object keyed by column id (date = Date; cat = Category; vendor = Vendor; desc = Description; amt = Amount ($); paid = Paid by; rcpt = Receipt reference; why = Business purpose and attendees) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "cat": {
                                  "type": "string",
                                  "enum": [
                                    "Lodging",
                                    "Airfare",
                                    "Ground transport",
                                    "Parking and tolls",
                                    "Meals",
                                    "Client entertainment",
                                    "Supplies",
                                    "Software",
                                    "Communications",
                                    "Other"
                                  ],
                                  "description": "Category"
                                },
                                "vendor": {
                                  "type": "string",
                                  "description": "Vendor"
                                },
                                "desc": {
                                  "type": "string",
                                  "description": "Description"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "paid": {
                                  "type": "string",
                                  "enum": [
                                    "Out of pocket",
                                    "Company card"
                                  ],
                                  "description": "Paid by"
                                },
                                "rcpt": {
                                  "type": "string",
                                  "description": "Receipt reference"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "Business purpose and attendees"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "miles": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Mileage. Each row is an object keyed by column id (date = Date; trip = From and to; why = Business purpose; mi = Miles; rate = Your rate ($ per mile, optional)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "trip": {
                                  "type": "string",
                                  "description": "From and to"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "Business purpose"
                                },
                                "mi": {
                                  "type": "string",
                                  "description": "Miles"
                                },
                                "rate": {
                                  "type": "string",
                                  "description": "Your rate ($ per mile, optional)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "perdiem": {
                        "type": "array",
                        "maxItems": 120,
                        "description": "Per diem (rate you enter from GSA or your employer). Each row is an object keyed by column id (date = Date; loc = Location; rate = Daily rate ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "rate": {
                                  "type": "string",
                                  "description": "Daily rate ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "adv": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Advances received. Each row is an object keyed by column id (date = Date; amt = Amount ($); note = Note) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Note"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_customer_complaint_resolution_workflow": {
      "post": {
        "operationId": "tool_generate_customer_complaint_resolution_workflow",
        "summary": "Customer Complaint Resolution Workflow (PDF and Word)",
        "description": "A complaint log with deadlines and a written procedure built from your own rules: you set the acknowledgment and resolution targets, categories and escalation words; the tool works out due dates, flags overdue and repeat issues, summarizes results, and drafts acknowledgment, status, resolution and closing letters for you to edit. It sends nothing. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/customer-complaint-resolution-workflow/ . This is an operational template. It does not give legal, insurance, medical or financial advice, does not decide fault or what a customer is owed, and does not guarantee that following it satisfies any law, contract or standard. Complaints in regulated settings follow that regulator's rules.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business name"
                      },
                      "channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Email",
                            "Phone",
                            "Web form",
                            "In person",
                            "Mail",
                            "Social media"
                          ]
                        },
                        "description": "Channels you accept complaints through"
                      },
                      "ack_h": {
                        "type": "string",
                        "description": "Acknowledge within (hours) (Example: 24). Number as text, e.g. \"1200\"."
                      },
                      "res_d": {
                        "type": "string",
                        "description": "Resolve within (business days) (Example: 10). Number as text, e.g. \"1200\"."
                      },
                      "days": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Monday",
                            "Tuesday",
                            "Wednesday",
                            "Thursday",
                            "Friday",
                            "Saturday",
                            "Sunday"
                          ]
                        },
                        "description": "Business days (none checked = Monday to Friday)"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "rep_n": {
                        "type": "string",
                        "description": "Repeat issue: this many complaints in one category (3). Number as text, e.g. \"1200\"."
                      },
                      "rep_d": {
                        "type": "string",
                        "description": "within this many days (30). Number as text, e.g. \"1200\"."
                      },
                      "triggers": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Escalation words or phrases (comma-separated) that flag a complaint for a qualified person (Example: injury, lawyer, regulator, chargeback)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "cats": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Categories. Each row is an object keyed by column id (c = Category) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "c": {
                                  "type": "string",
                                  "description": "Category"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "remedy": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Your remedy policy (you decide; the tool applies none). Each row is an object keyed by column id (sit = Situation; rem = Remedy you offer; appr = Approver; lim = Limit ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sit": {
                                  "type": "string",
                                  "description": "Situation"
                                },
                                "rem": {
                                  "type": "string",
                                  "description": "Remedy you offer"
                                },
                                "appr": {
                                  "type": "string",
                                  "description": "Approver"
                                },
                                "lim": {
                                  "type": "string",
                                  "description": "Limit ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "log": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Complaint log. Each row is an object keyed by column id (rcv = Received (date and time); ch = Channel; cust = Customer or contact; ref = Order reference; cat = Category; desc = Description; sev = Severity (your scale); own = Owner; st = Status; ack = Acknowledged (date and time); done = Resolved or closed on; cause = Root cause and corrective action; rem = Remedy given; amt = Credit or refund ($); resp = Customer response) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "rcv": {
                                  "type": "string",
                                  "description": "Received (date and time)"
                                },
                                "ch": {
                                  "type": "string",
                                  "enum": [
                                    "Email",
                                    "Phone",
                                    "Web form",
                                    "In person",
                                    "Mail",
                                    "Social media"
                                  ],
                                  "description": "Channel"
                                },
                                "cust": {
                                  "type": "string",
                                  "description": "Customer or contact"
                                },
                                "ref": {
                                  "type": "string",
                                  "description": "Order reference"
                                },
                                "cat": {
                                  "type": "string",
                                  "description": "Category"
                                },
                                "desc": {
                                  "type": "string",
                                  "description": "Description"
                                },
                                "sev": {
                                  "type": "string",
                                  "enum": [
                                    "Low",
                                    "Medium",
                                    "High"
                                  ],
                                  "description": "Severity (your scale)"
                                },
                                "own": {
                                  "type": "string",
                                  "description": "Owner"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "New",
                                    "Acknowledged",
                                    "Investigating",
                                    "Awaiting customer",
                                    "Resolved",
                                    "Closed",
                                    "Escalated"
                                  ],
                                  "description": "Status"
                                },
                                "ack": {
                                  "type": "string",
                                  "description": "Acknowledged (date and time)"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Resolved or closed on"
                                },
                                "cause": {
                                  "type": "string",
                                  "description": "Root cause and corrective action"
                                },
                                "rem": {
                                  "type": "string",
                                  "description": "Remedy given"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Credit or refund ($)"
                                },
                                "resp": {
                                  "type": "string",
                                  "enum": [
                                    "Accepted",
                                    "Declined",
                                    "No response"
                                  ],
                                  "description": "Customer response"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_preventive_maintenance_generator": {
      "post": {
        "operationId": "tool_generate_preventive_maintenance_generator",
        "summary": "Preventive Maintenance Schedule (PDF and Word)",
        "description": "Turn your equipment list and the service tasks and intervals from your manuals into a dated maintenance schedule with overdue and due-soon lists, weekly workload against your technician hours, a parts and labor cost forecast, and a completion log. No intervals are preloaded: you enter them and their source. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/preventive-maintenance-generator/ . This is a scheduling aid. It ships with no service intervals: every interval comes from you or the equipment manual and is labeled with its source. It does not decide what maintenance a machine needs, and it does not say any equipment is safe, inspected, certified or compliant. It does not replace qualified people or the manufacturer's instructions.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "from": {
                        "type": "string",
                        "description": "Schedule starts on (blank = today). YYYY-MM-DD."
                      },
                      "months": {
                        "type": "string",
                        "description": "Months to schedule (1 to 24) (3). Number as text, e.g. \"1200\"."
                      },
                      "soon": {
                        "type": "string",
                        "description": "Due soon window (days) (14). Number as text, e.g. \"1200\"."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "Completion-based (next due = last done + interval)",
                          "Fixed calendar (keep the original grid)"
                        ],
                        "description": "Scheduling basis"
                      },
                      "roll": {
                        "type": "string",
                        "enum": [
                          "Move to the next workday",
                          "Move to the previous workday"
                        ],
                        "description": "If a due date falls on a non-workday"
                      },
                      "days": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Monday",
                            "Tuesday",
                            "Wednesday",
                            "Thursday",
                            "Friday",
                            "Saturday",
                            "Sunday"
                          ]
                        },
                        "description": "Workdays (none checked = Monday to Friday)"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "cap": {
                        "type": "string",
                        "description": "Technician hours available per week. Number as text, e.g. \"1200\"."
                      },
                      "shift": {
                        "type": "string",
                        "description": "Tasks may move earlier by up to (days) to level the workload. Number as text, e.g. \"1200\"."
                      },
                      "rate": {
                        "type": "string",
                        "description": "Labor rate ($ per hour). Number as text, e.g. \"1200\"."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "assets": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Equipment. Each row is an object keyed by column id (id = Asset ID; name = Name; loc = Location; mms = Make, model, serial; crit = Criticality (your scale); mt = Meter; cur = Current meter; use = Average use per day; loto = Has a written lockout/tagout procedure) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "mms": {
                                  "type": "string",
                                  "description": "Make, model, serial"
                                },
                                "crit": {
                                  "type": "string",
                                  "enum": [
                                    "1 (low)",
                                    "2",
                                    "3 (high)"
                                  ],
                                  "description": "Criticality (your scale)"
                                },
                                "mt": {
                                  "type": "string",
                                  "enum": [
                                    "None",
                                    "Hours",
                                    "Miles",
                                    "Cycles"
                                  ],
                                  "description": "Meter"
                                },
                                "cur": {
                                  "type": "string",
                                  "description": "Current meter"
                                },
                                "use": {
                                  "type": "string",
                                  "description": "Average use per day"
                                },
                                "loto": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Has a written lockout/tagout procedure"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "tasks": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Maintenance tasks (intervals from your manual or policy). Each row is an object keyed by column id (aid = Asset ID; task = Task; unit = Interval unit; n = Interval; ld = Last done (date); lm = Last done (meter); min = Minutes; who = Assigned to; src = Interval source; srcd = Source detail) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "aid": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "Days",
                                    "Weeks",
                                    "Months",
                                    "Meter"
                                  ],
                                  "description": "Interval unit"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Interval"
                                },
                                "ld": {
                                  "type": "string",
                                  "description": "Last done (date)"
                                },
                                "lm": {
                                  "type": "string",
                                  "description": "Last done (meter)"
                                },
                                "min": {
                                  "type": "string",
                                  "description": "Minutes"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Assigned to"
                                },
                                "src": {
                                  "type": "string",
                                  "enum": [
                                    "Manufacturer manual",
                                    "Internal policy",
                                    "Regulation or standard",
                                    "Other"
                                  ],
                                  "description": "Interval source"
                                },
                                "srcd": {
                                  "type": "string",
                                  "description": "Source detail"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "parts": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Parts per task. Each row is an object keyed by column id (task = Task (same name as above); part = Part; qty = Qty; cost = Unit cost ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "task": {
                                  "type": "string",
                                  "description": "Task (same name as above)"
                                },
                                "part": {
                                  "type": "string",
                                  "description": "Part"
                                },
                                "qty": {
                                  "type": "string",
                                  "description": "Qty"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Unit cost ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "done": {
                        "type": "array",
                        "maxItems": 300,
                        "description": "Completion log. Each row is an object keyed by column id (aid = Asset ID; task = Task; date = Date done; meter = Meter; by = Done by; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "aid": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date done"
                                },
                                "meter": {
                                  "type": "string",
                                  "description": "Meter"
                                },
                                "by": {
                                  "type": "string",
                                  "description": "Done by"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_forklift_inspection_system": {
      "post": {
        "operationId": "tool_generate_forklift_inspection_system",
        "summary": "Forklift Inspection and Operator Records (PDF and Word)",
        "description": "Paperwork for a powered industrial truck program: a truck roster, a daily pre-use checklist to confirm against each operator manual, an inspection and defect log where the inspector records every decision, operator training and evaluation records with three-year evaluation due dates, a refresher log and a removed-from-service tag. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/forklift-inspection-system/ . This record system supports the qualified people who run a powered industrial truck program. It does not decide that a truck is safe or unsafe, does not train or evaluate operators, and does not certify compliance with OSHA or any state plan. The inspector makes and records every decision, including removal from service. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company and site"
                      },
                      "opdays": {
                        "type": "string",
                        "description": "Operating days per week (5). Number as text, e.g. \"1200\"."
                      },
                      "p0": {
                        "type": "string",
                        "description": "Inspection log period start. YYYY-MM-DD."
                      },
                      "p1": {
                        "type": "string",
                        "description": "Inspection log period end. YYYY-MM-DD."
                      },
                      "warn": {
                        "type": "string",
                        "description": "Warn me this many days before an evaluation is due (90). Number as text, e.g. \"1200\"."
                      },
                      "c_truck": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Truck ID"
                      },
                      "c_date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "c_shift": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Shift"
                      },
                      "c_by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector"
                      },
                      "c_hrs": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Hour meter"
                      },
                      "c_dec": {
                        "type": "string",
                        "enum": [
                          "No condition affecting safety",
                          "Condition noted - supervisor review",
                          "Condition affecting safety - removed from service"
                        ],
                        "description": "Inspector decision (selected by the inspector)"
                      },
                      "c_rep": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Defects reported to"
                      },
                      "c_sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector signature"
                      },
                      "tag_truck": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Truck ID"
                      },
                      "tag_date": {
                        "type": "string",
                        "description": "Date removed. YYYY-MM-DD."
                      },
                      "tag_by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Removed by"
                      },
                      "tag_rep": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reported to"
                      },
                      "tag_why": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Reason (in the inspector's words)"
                      },
                      "tag_fix": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Repaired by (authorized person) and date"
                      },
                      "tag_ret": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Returned to service by and date"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "trucks": {
                        "type": "array",
                        "maxItems": 60,
                        "description": "Truck roster. Each row is an object keyed by column id (id = Truck ID; type = Type; mm = Make and model; cap = Capacity from the data plate (lb); loc = Location; hrs = Hour meter; shifts = Shifts per day; rtc = Used round-the-clock) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Truck ID"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "Electric counterbalance",
                                    "LP gas",
                                    "Diesel or gasoline",
                                    "Reach truck",
                                    "Motorized pallet jack",
                                    "Order picker",
                                    "Other"
                                  ],
                                  "description": "Type"
                                },
                                "mm": {
                                  "type": "string",
                                  "description": "Make and model"
                                },
                                "cap": {
                                  "type": "string",
                                  "description": "Capacity from the data plate (lb)"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "hrs": {
                                  "type": "string",
                                  "description": "Hour meter"
                                },
                                "shifts": {
                                  "type": "string",
                                  "description": "Shifts per day"
                                },
                                "rtc": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Used round-the-clock"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "check": {
                        "type": "array",
                        "maxItems": 60,
                        "description": "Checklist items (starter areas; confirm against the operator manual). Each row is an object keyed by column id (item = Item; res = Result; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "res": {
                                  "type": "string",
                                  "enum": [
                                    "OK",
                                    "Defect noted",
                                    "N/A"
                                  ],
                                  "description": "Result"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "log": {
                        "type": "array",
                        "maxItems": 400,
                        "description": "Inspection and defect log. Each row is an object keyed by column id (date = Date; shift = Shift; truck = Truck ID; by = Inspector; hrs = Hour meter; def = Defects found; dec = Inspector decision; rep = Reported to; fix = Repaired by (authorized person); fixd = Repair date) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "shift": {
                                  "type": "string",
                                  "description": "Shift"
                                },
                                "truck": {
                                  "type": "string",
                                  "description": "Truck ID"
                                },
                                "by": {
                                  "type": "string",
                                  "description": "Inspector"
                                },
                                "hrs": {
                                  "type": "string",
                                  "description": "Hour meter"
                                },
                                "def": {
                                  "type": "string",
                                  "description": "Defects found"
                                },
                                "dec": {
                                  "type": "string",
                                  "enum": [
                                    "No condition affecting safety",
                                    "Condition noted - supervisor review",
                                    "Condition affecting safety - removed from service"
                                  ],
                                  "description": "Inspector decision"
                                },
                                "rep": {
                                  "type": "string",
                                  "description": "Reported to"
                                },
                                "fix": {
                                  "type": "string",
                                  "description": "Repaired by (authorized person)"
                                },
                                "fixd": {
                                  "type": "string",
                                  "description": "Repair date"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "ops": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Operator training and evaluation records. Each row is an object keyed by column id (name = Operator name; types = Truck types authorized; tr = Date of training; ev = Date of evaluation; who = Person(s) who trained or evaluated; topics = Topics covered (see 1910.178(l)(3))) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Operator name"
                                },
                                "types": {
                                  "type": "string",
                                  "description": "Truck types authorized"
                                },
                                "tr": {
                                  "type": "string",
                                  "description": "Date of training"
                                },
                                "ev": {
                                  "type": "string",
                                  "description": "Date of evaluation"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Person(s) who trained or evaluated"
                                },
                                "topics": {
                                  "type": "string",
                                  "description": "Topics covered (see 1910.178(l)(3))"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "refresh": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Refresher training events. Each row is an object keyed by column id (op = Operator; date = Date; why = Reason (1910.178(l)(4)(ii)); done = Refresher completed on; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "op": {
                                  "type": "string",
                                  "description": "Operator"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "why": {
                                  "type": "string",
                                  "enum": [
                                    "Observed operating the vehicle in an unsafe manner",
                                    "Involved in an accident or near-miss incident",
                                    "Evaluation showed the truck is not being operated safely",
                                    "Assigned to drive a different type of truck",
                                    "Workplace condition changed in a way that could affect safe operation"
                                  ],
                                  "description": "Reason (1910.178(l)(4)(ii))"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Refresher completed on"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_ppe_assessment_organizer": {
      "post": {
        "operationId": "tool_generate_ppe_assessment_organizer",
        "summary": "PPE Hazard Assessment Record (PDF and Word)",
        "description": "A structured worksheet for the person who performs the workplace PPE hazard assessment: tasks and areas, the hazards the assessor finds, the PPE the assessor selects, fit, communication and training records, payment and defective-PPE logs, and the written certification page described in 29 CFR 1910.132(d)(2), ready for the assessor to review and sign. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/ppe-assessment-organizer/ . This worksheet supports the person who performs the PPE hazard assessment. The assessor identifies the hazards and selects the PPE; the tool makes no suggestions, does not rank PPE, does not say an assessment is adequate, and does not certify compliance with OSHA or any state plan. Respiratory and hearing protection are outside this tool. Check the official sources listed with it.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Workplace evaluated (name)"
                      },
                      "addr": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Workplace address"
                      },
                      "docid": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Document number or revision"
                      },
                      "by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Person certifying that the evaluation has been performed"
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Title"
                      },
                      "dates": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Date(s) of the hazard assessment"
                      },
                      "next": {
                        "type": "string",
                        "description": "Next review date (set by the assessor). YYYY-MM-DD."
                      },
                      "cats": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Impact",
                            "Penetration",
                            "Compression (roll-over)",
                            "Chemical",
                            "Heat",
                            "Harmful dust",
                            "Light (optical) radiation"
                          ]
                        },
                        "description": "Basic hazard categories considered during the walk-through (Appendix B to Subpart I, non-mandatory)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "tasks": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Areas, tasks, hazards and PPE (all entered by the assessor). Each row is an object keyed by column id (area = Area; task = Task; n = Employees affected; haz = Hazards found by the assessor (or 'none found'); ctl = Other controls in place; ppe = PPE selected by the assessor; std = Rating or standard (as typed by the assessor); req = Required to be worn; why = If no PPE: the assessor's reason) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "area": {
                                  "type": "string",
                                  "description": "Area"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Employees affected"
                                },
                                "haz": {
                                  "type": "string",
                                  "description": "Hazards found by the assessor (or 'none found')"
                                },
                                "ctl": {
                                  "type": "string",
                                  "description": "Other controls in place"
                                },
                                "ppe": {
                                  "type": "string",
                                  "description": "PPE selected by the assessor"
                                },
                                "std": {
                                  "type": "string",
                                  "description": "Rating or standard (as typed by the assessor)"
                                },
                                "req": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Required to be worn"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "If no PPE: the assessor's reason"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "fit": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Fit and size record. Each row is an object keyed by column id (emp = Employee; item = PPE item; size = Size; date = Date fitted) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "size": {
                                  "type": "string",
                                  "description": "Size"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date fitted"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "comm": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Selection decisions communicated. Each row is an object keyed by column id (who = Employee or group; date = Date communicated; how = How) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "who": {
                                  "type": "string",
                                  "description": "Employee or group"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date communicated"
                                },
                                "how": {
                                  "type": "string",
                                  "description": "How"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "train": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Training record. Each row is an object keyed by column id (emp = Employee; item = PPE item or group; date = Training date; topics = Subjects covered; demo = Understanding demonstrated on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "item": {
                                  "type": "string",
                                  "description": "PPE item or group"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Training date"
                                },
                                "topics": {
                                  "type": "string",
                                  "description": "Subjects covered"
                                },
                                "demo": {
                                  "type": "string",
                                  "description": "Understanding demonstrated on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "retrain": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Retraining events. Each row is an object keyed by column id (emp = Employee; date = Date; why = Circumstance (1910.132(f)(3)); done = Retrained on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "why": {
                                  "type": "string",
                                  "enum": [
                                    "Changes in the workplace made previous training obsolete",
                                    "Changes in the types of PPE made previous training obsolete",
                                    "Employee has not retained the understanding or skill"
                                  ],
                                  "description": "Circumstance (1910.132(f)(3))"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Retrained on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "pay": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "PPE payment record. Each row is an object keyed by column id (item = PPE item; cost = Cost ($); by = Paid by; basis = If employee-paid: the basis the employer recorded (see 1910.132(h))) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Cost ($)"
                                },
                                "by": {
                                  "type": "string",
                                  "enum": [
                                    "Employer",
                                    "Employee"
                                  ],
                                  "description": "Paid by"
                                },
                                "basis": {
                                  "type": "string",
                                  "description": "If employee-paid: the basis the employer recorded (see 1910.132(h))"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "bad": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Defective or damaged PPE log. Each row is an object keyed by column id (item = PPE item; date = Date found; act = Action taken; out = Removed from use; repl = Replaced on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date found"
                                },
                                "act": {
                                  "type": "string",
                                  "description": "Action taken"
                                },
                                "out": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Removed from use"
                                },
                                "repl": {
                                  "type": "string",
                                  "description": "Replaced on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/generate_job_offer_comparison_calculator": {
      "post": {
        "operationId": "tool_generate_job_offer_comparison_calculator",
        "summary": "Job Offer Comparison (PDF and Word)",
        "description": "Compare two to five job offers side by side using your own numbers: pay, bonus, signing and relocation, equity you choose to count, retirement match, health costs, time off, commute and a cost-of-living factor. See yearly and multi-year totals, effective hourly pay and the difference between offers, with optional Social Security and Medicare arithmetic you can switch off. Returns a fillable PDF and a Word file built by the same engine as https://allaiforms.com/tools/job-offer-comparison-calculator/ . Arithmetic on the numbers you enter. Not tax, legal, benefits or financial advice, and not a recommendation to accept or decline any offer. The optional payroll-tax lines use only the published Social Security and Medicare employee rates and exclude income tax, Additional Medicare Tax, and state and local taxes.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "years": {
                        "type": "string",
                        "description": "Years to total (1 to 5) (3). Number as text, e.g. \"1200\"."
                      },
                      "ptax": {
                        "type": "string",
                        "enum": [
                          "Show",
                          "Off"
                        ],
                        "description": "Payroll-tax arithmetic (Social Security and Medicare, employee share)"
                      },
                      "wyear": {
                        "type": "string",
                        "enum": [
                          "2027",
                          "2026"
                        ],
                        "description": "Wage year for the Social Security wage base"
                      },
                      "itax": {
                        "type": "string",
                        "description": "Your own income tax rate estimate (%, optional). Number as text, e.g. \"1200\"."
                      },
                      "q": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Your questions (for example: confirm the bonus payout basis, the vesting schedule, the benefits start date)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "offers": {
                        "type": "array",
                        "maxItems": 5,
                        "description": "Offers (one card per offer). Each row is an object keyed by column id (emp = Employer; title = Job title; basis = Pay basis; sal = Annual salary ($); hr = Hourly rate ($); hw = Hours per week (blank = 40); wk = Paid weeks per year (blank = 52); bon = Bonus target ($ per year); bonp = Payout you expect (% of target); sign = Signing bonus ($); reloc = Relocation payment ($); eq = Equity grant value (your estimate, $); eqin = Count equity?; eqc = Your confidence in that value (%); vest = Vesting years; cliff = Cliff (months); k1 = Your retirement contribution (% of pay); k2 = Employer match rate (%); k3 = Match cap (% of pay); hpaid = Employer-paid health ($ per month); hprem = Your health premium ($ per month); hsa = HSA or other employer contribution ($ per year); stip = Stipends ($ per year); pto = PTO days; hol = Paid holidays; mi = Commute one-way miles; mins = Commute one-way minutes; on = On-site days per week; cpm = Your cost per mile ($); park = Parking or transit ($ per year); col = Cost-of-living factor (your figure; 1.00 = baseline); raise = Expected annual raise (%)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employer"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Job title"
                                },
                                "basis": {
                                  "type": "string",
                                  "enum": [
                                    "Salary",
                                    "Hourly"
                                  ],
                                  "description": "Pay basis"
                                },
                                "sal": {
                                  "type": "string",
                                  "description": "Annual salary ($)"
                                },
                                "hr": {
                                  "type": "string",
                                  "description": "Hourly rate ($)"
                                },
                                "hw": {
                                  "type": "string",
                                  "description": "Hours per week (blank = 40)"
                                },
                                "wk": {
                                  "type": "string",
                                  "description": "Paid weeks per year (blank = 52)"
                                },
                                "bon": {
                                  "type": "string",
                                  "description": "Bonus target ($ per year)"
                                },
                                "bonp": {
                                  "type": "string",
                                  "description": "Payout you expect (% of target)"
                                },
                                "sign": {
                                  "type": "string",
                                  "description": "Signing bonus ($)"
                                },
                                "reloc": {
                                  "type": "string",
                                  "description": "Relocation payment ($)"
                                },
                                "eq": {
                                  "type": "string",
                                  "description": "Equity grant value (your estimate, $)"
                                },
                                "eqin": {
                                  "type": "string",
                                  "enum": [
                                    "No",
                                    "Yes"
                                  ],
                                  "description": "Count equity?"
                                },
                                "eqc": {
                                  "type": "string",
                                  "description": "Your confidence in that value (%)"
                                },
                                "vest": {
                                  "type": "string",
                                  "description": "Vesting years"
                                },
                                "cliff": {
                                  "type": "string",
                                  "description": "Cliff (months)"
                                },
                                "k1": {
                                  "type": "string",
                                  "description": "Your retirement contribution (% of pay)"
                                },
                                "k2": {
                                  "type": "string",
                                  "description": "Employer match rate (%)"
                                },
                                "k3": {
                                  "type": "string",
                                  "description": "Match cap (% of pay)"
                                },
                                "hpaid": {
                                  "type": "string",
                                  "description": "Employer-paid health ($ per month)"
                                },
                                "hprem": {
                                  "type": "string",
                                  "description": "Your health premium ($ per month)"
                                },
                                "hsa": {
                                  "type": "string",
                                  "description": "HSA or other employer contribution ($ per year)"
                                },
                                "stip": {
                                  "type": "string",
                                  "description": "Stipends ($ per year)"
                                },
                                "pto": {
                                  "type": "string",
                                  "description": "PTO days"
                                },
                                "hol": {
                                  "type": "string",
                                  "description": "Paid holidays"
                                },
                                "mi": {
                                  "type": "string",
                                  "description": "Commute one-way miles"
                                },
                                "mins": {
                                  "type": "string",
                                  "description": "Commute one-way minutes"
                                },
                                "on": {
                                  "type": "string",
                                  "description": "On-site days per week"
                                },
                                "cpm": {
                                  "type": "string",
                                  "description": "Your cost per mile ($)"
                                },
                                "park": {
                                  "type": "string",
                                  "description": "Parking or transit ($ per year)"
                                },
                                "col": {
                                  "type": "string",
                                  "description": "Cost-of-living factor (your figure; 1.00 = baseline)"
                                },
                                "raise": {
                                  "type": "string",
                                  "description": "Expected annual raise (%)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "score": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Scorecard (kept separate from the money). Each row is an object keyed by column id (c = Criterion; w = Weight (1 to 5); s1 = Offer 1 score (1 to 10); s2 = Offer 2 score; s3 = Offer 3 score; s4 = Offer 4 score; s5 = Offer 5 score) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "c": {
                                  "type": "string",
                                  "description": "Criterion"
                                },
                                "w": {
                                  "type": "string",
                                  "description": "Weight (1 to 5)"
                                },
                                "s1": {
                                  "type": "string",
                                  "description": "Offer 1 score (1 to 10)"
                                },
                                "s2": {
                                  "type": "string",
                                  "description": "Offer 2 score"
                                },
                                "s3": {
                                  "type": "string",
                                  "description": "Offer 3 score"
                                },
                                "s4": {
                                  "type": "string",
                                  "description": "Offer 4 score"
                                },
                                "s5": {
                                  "type": "string",
                                  "description": "Offer 5 score"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "default": "both",
                    "description": "Output files. pdf is fillable."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 250
      }
    },
    "/v1/tools/calculate_profit_margin_break_even_calculator": {
      "post": {
        "operationId": "tool_calculate_profit_margin_break_even_calculator",
        "summary": "Profit margin and break-even calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/profit-margin-break-even-calculator/ on your numbers and returns the results as JSON (no files). Estimates from the numbers you enter. Not tax, accounting or financial advice.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business or product"
                      },
                      "price": {
                        "type": "string",
                        "description": "Selling price per unit ($). Number as text, e.g. \"1200\"."
                      },
                      "vc": {
                        "type": "string",
                        "description": "Variable cost per unit ($) (Materials, packaging, shipping, payment fees per sale). Number as text, e.g. \"1200\"."
                      },
                      "fixed": {
                        "type": "string",
                        "description": "Fixed costs per month ($) (Rent, software, insurance, salaries). Number as text, e.g. \"1200\"."
                      },
                      "units": {
                        "type": "string",
                        "description": "Expected units sold per month. Number as text, e.g. \"1200\"."
                      },
                      "target": {
                        "type": "string",
                        "description": "Profit goal per month ($). Number as text, e.g. \"1200\"."
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Assumptions and notes"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {},
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_llc_operating_agreement_organizer": {
      "post": {
        "operationId": "tool_calculate_llc_operating_agreement_organizer",
        "summary": "LLC operating agreement organizer calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/llc-operating-agreement-organizer/ on your numbers and returns the results as JSON (no files). This is an organizer, not legal or tax advice. ALL AI Forms is not a law firm. It records the owners' own decisions and does arithmetic on them; it does not recommend terms or say that an agreement is enforceable or protects anyone. Each state's LLC law controls. Review by a licensed attorney is recommended before anyone signs.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "LLC name (exactly as on the state filing)"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "State of formation"
                      },
                      "filed": {
                        "type": "string",
                        "enum": [
                          "Not filed yet",
                          "Filed",
                          "Not sure"
                        ],
                        "description": "Formation filing status"
                      },
                      "formed": {
                        "type": "string",
                        "description": "Formation date. YYYY-MM-DD."
                      },
                      "office": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Principal office address"
                      },
                      "agent": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Registered agent name and address"
                      },
                      "ein": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "EIN (optional)"
                      },
                      "duration": {
                        "type": "string",
                        "enum": [
                          "Perpetual",
                          "Ends on a fixed date",
                          "Undecided"
                        ],
                        "description": "Duration"
                      },
                      "end_date": {
                        "type": "string",
                        "description": "End date (only if fixed). YYYY-MM-DD."
                      },
                      "purpose": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Business purpose (the owners' words)"
                      },
                      "derive": {
                        "type": "string",
                        "enum": [
                          "The % typed in the member table",
                          "Contribution values (worked out for you)"
                        ],
                        "description": "Ownership % comes from"
                      },
                      "mgmt": {
                        "type": "string",
                        "enum": [
                          "Member-managed",
                          "Manager-managed",
                          "Undecided"
                        ],
                        "description": "Management"
                      },
                      "managers": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Managers (only if manager-managed): names, and whether each is a member"
                      },
                      "vote": {
                        "type": "string",
                        "enum": [
                          "By ownership %",
                          "One vote per member",
                          "Unanimous",
                          "Custom (describe below)",
                          "Undecided"
                        ],
                        "description": "Voting basis"
                      },
                      "vote_custom": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Custom voting terms"
                      },
                      "thr": {
                        "type": "string",
                        "description": "Ordinary decisions pass with more than this % of the votes (Example: 50). Number as text, e.g. \"1200\"."
                      },
                      "thr_major": {
                        "type": "string",
                        "description": "Major decisions pass with at least this % of the votes (Example: 75). Number as text, e.g. \"1200\"."
                      },
                      "major": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Selling all or most assets",
                            "Borrowing above an agreed amount",
                            "Admitting a new member",
                            "Amending the agreement",
                            "Merging or converting the LLC",
                            "Dissolving the LLC"
                          ]
                        },
                        "description": "Decisions that need the major-decision vote"
                      },
                      "major_other": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Other major decisions"
                      },
                      "dist_time": {
                        "type": "string",
                        "enum": [
                          "When the managers or members decide",
                          "Monthly",
                          "Quarterly",
                          "Annually",
                          "Undecided"
                        ],
                        "description": "Distribution timing"
                      },
                      "dist_basis": {
                        "type": "string",
                        "enum": [
                          "Pro rata to ownership %",
                          "Custom (describe below)",
                          "Undecided"
                        ],
                        "description": "Distribution basis"
                      },
                      "dist_custom": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Custom distribution terms"
                      },
                      "capital": {
                        "type": "string",
                        "enum": [
                          "Voluntary only",
                          "Required if approved by the major-decision vote",
                          "Undecided"
                        ],
                        "description": "Additional capital"
                      },
                      "capital_note": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Additional capital notes"
                      },
                      "tax": {
                        "type": "string",
                        "enum": [
                          "Default for the number of members",
                          "Partnership",
                          "S corporation election",
                          "C corporation election",
                          "Undecided"
                        ],
                        "description": "Intended federal tax classification (record only)"
                      },
                      "transfer": {
                        "type": "string",
                        "enum": [
                          "Free transfer",
                          "Consent of the other members required",
                          "Right of first refusal for the other members",
                          "Undecided"
                        ],
                        "description": "Transfers of a membership interest"
                      },
                      "admit": {
                        "type": "string",
                        "enum": [
                          "By the major-decision vote",
                          "Unanimous consent",
                          "Undecided"
                        ],
                        "description": "Admitting new members"
                      },
                      "depart": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Voluntary withdrawal",
                            "Death",
                            "Disability",
                            "Bankruptcy",
                            "Expulsion by vote"
                          ]
                        },
                        "description": "Departure events the agreement covers"
                      },
                      "buyout": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Buy-out terms in the owners' words (price method, payment timing)"
                      },
                      "dissolve": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Vote of the members",
                            "A fixed end date",
                            "Sale of all or substantially all assets",
                            "Other (describe)"
                          ]
                        },
                        "description": "Dissolution triggers"
                      },
                      "dissolve_note": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Dissolution notes"
                      },
                      "dispute": {
                        "type": "string",
                        "enum": [
                          "Negotiation first",
                          "Mediation",
                          "Arbitration",
                          "Court",
                          "Undecided"
                        ],
                        "description": "Disputes"
                      },
                      "law": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "Governing law (state)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "members": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Members, contributions and ownership. Each row is an object keyed by column id (name = Member legal name; addr = Address; ctype = Contribution type; cval = Contribution value ($, owners' figure); pct = Ownership %) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Member legal name"
                                },
                                "addr": {
                                  "type": "string",
                                  "description": "Address"
                                },
                                "ctype": {
                                  "type": "string",
                                  "enum": [
                                    "Cash",
                                    "Property",
                                    "Services",
                                    "Promise to contribute"
                                  ],
                                  "description": "Contribution type"
                                },
                                "cval": {
                                  "type": "string",
                                  "description": "Contribution value ($, owners' figure)"
                                },
                                "pct": {
                                  "type": "string",
                                  "description": "Ownership %"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "sign": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Signatures (when the final agreement is signed). Each row is an object keyed by column id (name = Member; sig = Signature; date = Date) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Member"
                                },
                                "sig": {
                                  "type": "string",
                                  "description": "Signature"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_business_plan_generator": {
      "post": {
        "operationId": "tool_calculate_business_plan_generator",
        "summary": "Business plan generator calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/business-plan-generator/ on your numbers and returns the results as JSON (no files). This is an organizer and calculator, not financial, investment, lending or tax advice. Every number is the owner's own assumption, not a forecast or promise, and nothing here says a lender or investor will accept the plan.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business name"
                      },
                      "owners": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Owner names"
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "Traditional plan",
                          "Lean (one-page) plan"
                        ],
                        "description": "Plan format"
                      },
                      "structure": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Legal structure (as you have chosen it)"
                      },
                      "exec": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Executive summary"
                      },
                      "company": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Company description"
                      },
                      "market": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Market analysis (your own research)"
                      },
                      "team": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Organization and management"
                      },
                      "products": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Products or services"
                      },
                      "marketing": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Marketing and sales"
                      },
                      "request": {
                        "type": "string",
                        "description": "Amount you are asking for ($, leave blank if none). Number as text, e.g. \"1200\"."
                      },
                      "request_note": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Terms you are seeking"
                      },
                      "start": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "First month of the model (YYYY-MM) (Example: 2027-01)"
                      },
                      "horizon": {
                        "type": "string",
                        "enum": [
                          "12",
                          "24",
                          "36"
                        ],
                        "description": "Months to project"
                      },
                      "cash0": {
                        "type": "string",
                        "description": "Opening cash ($). Number as text, e.g. \"1200\"."
                      },
                      "cogs_m": {
                        "type": "string",
                        "enum": [
                          "Percent of revenue",
                          "Cost per unit (from the revenue table)"
                        ],
                        "description": "Cost of goods method"
                      },
                      "cogs_pct": {
                        "type": "string",
                        "description": "Cost of goods, % of revenue (percent method). Number as text, e.g. \"1200\"."
                      },
                      "draws": {
                        "type": "string",
                        "description": "Owner draws per month ($). Number as text, e.g. \"1200\"."
                      },
                      "taxr": {
                        "type": "string",
                        "description": "Placeholder tax rate on positive pre-tax income (%), your placeholder and not a tax estimate. Number as text, e.g. \"1200\"."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "competitors": {
                        "type": "array",
                        "maxItems": 15,
                        "description": "Competitors. Each row is an object keyed by column id (name = Competitor; str = Strengths; weak = Weaknesses) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Competitor"
                                },
                                "str": {
                                  "type": "string",
                                  "description": "Strengths"
                                },
                                "weak": {
                                  "type": "string",
                                  "description": "Weaknesses"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "uses": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Use of funds. Each row is an object keyed by column id (label = Use; amt = Amount ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Use"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "rev": {
                        "type": "array",
                        "maxItems": 15,
                        "description": "Revenue lines. Each row is an object keyed by column id (name = Product or service; u0 = Units sold in month 1; price = Price per unit ($); g = Monthly unit growth %; uc = Cost per unit ($, per-unit method)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Product or service"
                                },
                                "u0": {
                                  "type": "string",
                                  "description": "Units sold in month 1"
                                },
                                "price": {
                                  "type": "string",
                                  "description": "Price per unit ($)"
                                },
                                "g": {
                                  "type": "string",
                                  "description": "Monthly unit growth %"
                                },
                                "uc": {
                                  "type": "string",
                                  "description": "Cost per unit ($, per-unit method)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "fixed": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Fixed expenses. Each row is an object keyed by column id (label = Expense; amt = Per month ($); inc = Annual increase %) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Expense"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Per month ($)"
                                },
                                "inc": {
                                  "type": "string",
                                  "description": "Annual increase %"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "roles": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Team and payroll. Each row is an object keyed by column id (role = Role; name = Name (optional); cost = Monthly cost ($); from = Starts in model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "description": "Role"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name (optional)"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Monthly cost ($)"
                                },
                                "from": {
                                  "type": "string",
                                  "description": "Starts in model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "startup": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Startup costs. Each row is an object keyed by column id (label = Item; amt = Amount ($); m = Model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "m": {
                                  "type": "string",
                                  "description": "Model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "loans": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Loans. Each row is an object keyed by column id (label = Lender or loan; amt = Amount ($); apr = APR %; term = Term (months); m = Received in model month #) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "description": "Lender or loan"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "apr": {
                                  "type": "string",
                                  "description": "APR %"
                                },
                                "term": {
                                  "type": "string",
                                  "description": "Term (months)"
                                },
                                "m": {
                                  "type": "string",
                                  "description": "Received in model month #"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_employee_onboarding_package": {
      "post": {
        "operationId": "tool_calculate_employee_onboarding_package",
        "summary": "Employee onboarding package calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/employee-onboarding-package/ on your numbers and returns the results as JSON (no files). This is an organizer, not legal, tax or immigration advice. It points to the official forms and does not complete or interpret Form W-4 or Form I-9, and it does not decide classification, exempt status, pay, leave or benefits eligibility. State rules vary; check your state's pages. Finishing the checklist does not make an employer compliant.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employer name"
                      },
                      "addr": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employer address"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "Alabama",
                          "Alaska",
                          "Arizona",
                          "Arkansas",
                          "California",
                          "Colorado",
                          "Connecticut",
                          "Delaware",
                          "District of Columbia",
                          "Florida",
                          "Georgia",
                          "Hawaii",
                          "Idaho",
                          "Illinois",
                          "Indiana",
                          "Iowa",
                          "Kansas",
                          "Kentucky",
                          "Louisiana",
                          "Maine",
                          "Maryland",
                          "Massachusetts",
                          "Michigan",
                          "Minnesota",
                          "Mississippi",
                          "Missouri",
                          "Montana",
                          "Nebraska",
                          "Nevada",
                          "New Hampshire",
                          "New Jersey",
                          "New Mexico",
                          "New York",
                          "North Carolina",
                          "North Dakota",
                          "Ohio",
                          "Oklahoma",
                          "Oregon",
                          "Pennsylvania",
                          "Rhode Island",
                          "South Carolina",
                          "South Dakota",
                          "Tennessee",
                          "Texas",
                          "Utah",
                          "Vermont",
                          "Virginia",
                          "Washington",
                          "West Virginia",
                          "Wisconsin",
                          "Wyoming"
                        ],
                        "description": "Work state"
                      },
                      "nh_days": {
                        "type": "string",
                        "description": "State new-hire report due within (days) (20 (federal rule); your state may set fewer). Number as text, e.g. \"1200\"."
                      },
                      "position": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Position title"
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employee name (optional)"
                      },
                      "start": {
                        "type": "string",
                        "description": "First day of work. YYYY-MM-DD."
                      },
                      "supervisor": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Supervisor"
                      },
                      "pay": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Pay as decided by the employer (basis and amount)"
                      },
                      "schedule": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Schedule (hours per week, days)"
                      },
                      "where": {
                        "type": "string",
                        "enum": [
                          "On-site",
                          "Remote",
                          "Hybrid"
                        ],
                        "description": "Work location"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "benefits": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Health insurance",
                            "Dental",
                            "Vision",
                            "Retirement plan",
                            "Paid time off",
                            "Paid holidays",
                            "Life insurance",
                            "Disability insurance"
                          ]
                        },
                        "description": "Benefits"
                      },
                      "benefits_note": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Benefit notes (waiting periods, enrollment dates, other benefits)"
                      },
                      "posters": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Employee Rights Under the FLSA (minimum wage)",
                            "Employee Rights Under the FMLA",
                            "Employee Polygraph Protection Act",
                            "USERRA",
                            "Know Your Rights: Workplace Discrimination is Illegal (EEOC)",
                            "Job Safety and Health: It's the Law (OSHA)"
                          ]
                        },
                        "description": "Federal posters you display"
                      },
                      "posters_state": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "State and local posters (from your state labor department)"
                      },
                      "g30": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "First 30 days"
                      },
                      "g60": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Days 31 to 60"
                      },
                      "g90": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Days 61 to 90"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "policies": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Policies to acknowledge. Each row is an object keyed by column id (policy = Policy; date = Date delivered; sig = Employee signature) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "policy": {
                                  "type": "string",
                                  "description": "Policy"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date delivered"
                                },
                                "sig": {
                                  "type": "string",
                                  "description": "Employee signature"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "equipment": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Equipment issued. Each row is an object keyed by column id (item = Item; cost = Cost ($); serial = Serial or asset #; date = Date issued) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Cost ($)"
                                },
                                "serial": {
                                  "type": "string",
                                  "description": "Serial or asset #"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date issued"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "accounts": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Accounts to set up (names only, never passwords). Each row is an object keyed by column id (sys = System; who = Set up by; off = Days after first day) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sys": {
                                  "type": "string",
                                  "description": "System"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Set up by"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Days after first day"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "training": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Training plan. Each row is an object keyed by column id (topic = Topic; off = Days after first day; who = Trainer) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "topic": {
                                  "type": "string",
                                  "description": "Topic"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Days after first day"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Trainer"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_independent_contractor_onboarding_checklist": {
      "post": {
        "operationId": "tool_calculate_independent_contractor_onboarding_checklist",
        "summary": "Contractor onboarding checklist calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/independent-contractor-onboarding-checklist/ on your numbers and returns the results as JSON (no files). This is an organizer, not legal or tax advice. It does not decide whether a worker is an employee or an independent contractor and does not say whether a Form 1099-NEC is required for a payee. It does not verify insurance, licenses or identity. Follow the IRS and Department of Labor pages and ask a qualified adviser.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Your business name"
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Contractor (name or business name)"
                      },
                      "entity": {
                        "type": "string",
                        "enum": [
                          "Individual or sole proprietor",
                          "LLC",
                          "Partnership",
                          "C corporation",
                          "S corporation",
                          "Other",
                          "W-9 not received yet"
                        ],
                        "description": "Entity type as reported on the W-9"
                      },
                      "start": {
                        "type": "string",
                        "description": "Start date. YYYY-MM-DD."
                      },
                      "end": {
                        "type": "string",
                        "description": "End date. YYYY-MM-DD."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "Hourly",
                          "Fixed fee",
                          "Milestones"
                        ],
                        "description": "Payment terms"
                      },
                      "rate": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Rate or amount"
                      },
                      "invoice": {
                        "type": "string",
                        "enum": [
                          "Weekly",
                          "Every two weeks",
                          "Monthly",
                          "Per milestone",
                          "On completion"
                        ],
                        "description": "Invoice frequency"
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Scope of work"
                      },
                      "w9": {
                        "type": "string",
                        "enum": [
                          "Not requested yet",
                          "Requested",
                          "Received"
                        ],
                        "description": "Form W-9"
                      },
                      "w9_date": {
                        "type": "string",
                        "description": "W-9 received on. YYYY-MM-DD."
                      },
                      "agr": {
                        "type": "string",
                        "enum": [
                          "Not signed",
                          "Signed"
                        ],
                        "description": "Written agreement"
                      },
                      "agr_date": {
                        "type": "string",
                        "description": "Agreement signed on. YYYY-MM-DD."
                      },
                      "nda": {
                        "type": "string",
                        "enum": [
                          "Yes",
                          "No",
                          "Not sure"
                        ],
                        "description": "Confidentiality and work-ownership terms in the agreement"
                      },
                      "ins": {
                        "type": "string",
                        "enum": [
                          "Not requested",
                          "Requested",
                          "Received"
                        ],
                        "description": "Insurance certificate"
                      },
                      "ins_exp": {
                        "type": "string",
                        "description": "Insurance expires on. YYYY-MM-DD."
                      },
                      "lic": {
                        "type": "string",
                        "enum": [
                          "Not applicable",
                          "Requested",
                          "Received"
                        ],
                        "description": "License or registration (as supplied; not verified)"
                      },
                      "lic_exp": {
                        "type": "string",
                        "description": "License expires on. YYYY-MM-DD."
                      },
                      "lic_desc": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "License or registration description"
                      },
                      "warn_days": {
                        "type": "string",
                        "description": "Warn me this many days before a document expires (30). Number as text, e.g. \"1200\"."
                      },
                      "thr": {
                        "type": "string",
                        "description": "Reporting threshold you are tracking ($) (2000). Number as text, e.g. \"1200\"."
                      },
                      "expected": {
                        "type": "string",
                        "description": "Expected payments this year ($). Number as text, e.g. \"1200\"."
                      },
                      "offboard": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Final invoice received",
                            "Last payment made and logged",
                            "System access removed (dates in the access log)",
                            "Equipment and materials returned",
                            "Confidential materials returned or destroyed",
                            "Records kept (agreement, W-9, invoices, payments)"
                          ]
                        },
                        "description": "Off-boarding"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "payments": {
                        "type": "array",
                        "maxItems": 120,
                        "description": "Payments. Each row is an object keyed by column id (date = Date paid; inv = Invoice #; amt = Amount ($); note = Note) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date paid"
                                },
                                "inv": {
                                  "type": "string",
                                  "description": "Invoice #"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Note"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "access": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "System access (names only, never passwords). Each row is an object keyed by column id (sys = System; on = Access granted; off = Access removed) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sys": {
                                  "type": "string",
                                  "description": "System"
                                },
                                "on": {
                                  "type": "string",
                                  "description": "Access granted"
                                },
                                "off": {
                                  "type": "string",
                                  "description": "Access removed"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "facts": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Facts about the working relationship (your answers). Each row is an object keyed by column id (cat = Category or factor; q = Question; a = Answer; n = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "cat": {
                                  "type": "string",
                                  "description": "Category or factor"
                                },
                                "q": {
                                  "type": "string",
                                  "description": "Question"
                                },
                                "a": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No",
                                    "N/A"
                                  ],
                                  "description": "Answer"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_business_expense_report_generator": {
      "post": {
        "operationId": "tool_calculate_business_expense_report_generator",
        "summary": "Expense report generator calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/business-expense-report-generator/ on your numbers and returns the results as JSON (no files). This is an organizer that adds up your entries. It does not decide what is deductible, reimbursable under any plan, or taxable, and it is not an accounting system or a substitute for your employer's expense policy. Rates shown come from the IRS page on the date noted; confirm them before you submit.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Employee or report owner"
                      },
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business or department"
                      },
                      "p0": {
                        "type": "string",
                        "description": "Period start. YYYY-MM-DD."
                      },
                      "p1": {
                        "type": "string",
                        "description": "Period end. YYYY-MM-DD."
                      },
                      "purpose": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Purpose of the report"
                      },
                      "rthr": {
                        "type": "string",
                        "description": "Your policy: receipt needed at or above ($). Number as text, e.g. \"1200\"."
                      },
                      "othr": {
                        "type": "string",
                        "description": "Flag 'Other' items above ($). Number as text, e.g. \"1200\"."
                      },
                      "fx": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Currency note (convert foreign amounts to USD before entering)"
                      },
                      "sig_e": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Submitted by (signature and date)"
                      },
                      "sig_a": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Approved by (signature and date)"
                      },
                      "notes": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Notes"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Expenses. Each row is an object keyed by column id (date = Date; cat = Category; vendor = Vendor; desc = Description; amt = Amount ($); paid = Paid by; rcpt = Receipt reference; why = Business purpose and attendees) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "cat": {
                                  "type": "string",
                                  "enum": [
                                    "Lodging",
                                    "Airfare",
                                    "Ground transport",
                                    "Parking and tolls",
                                    "Meals",
                                    "Client entertainment",
                                    "Supplies",
                                    "Software",
                                    "Communications",
                                    "Other"
                                  ],
                                  "description": "Category"
                                },
                                "vendor": {
                                  "type": "string",
                                  "description": "Vendor"
                                },
                                "desc": {
                                  "type": "string",
                                  "description": "Description"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "paid": {
                                  "type": "string",
                                  "enum": [
                                    "Out of pocket",
                                    "Company card"
                                  ],
                                  "description": "Paid by"
                                },
                                "rcpt": {
                                  "type": "string",
                                  "description": "Receipt reference"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "Business purpose and attendees"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "miles": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Mileage. Each row is an object keyed by column id (date = Date; trip = From and to; why = Business purpose; mi = Miles; rate = Your rate ($ per mile, optional)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "trip": {
                                  "type": "string",
                                  "description": "From and to"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "Business purpose"
                                },
                                "mi": {
                                  "type": "string",
                                  "description": "Miles"
                                },
                                "rate": {
                                  "type": "string",
                                  "description": "Your rate ($ per mile, optional)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "perdiem": {
                        "type": "array",
                        "maxItems": 120,
                        "description": "Per diem (rate you enter from GSA or your employer). Each row is an object keyed by column id (date = Date; loc = Location; rate = Daily rate ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "rate": {
                                  "type": "string",
                                  "description": "Daily rate ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "adv": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Advances received. Each row is an object keyed by column id (date = Date; amt = Amount ($); note = Note) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Amount ($)"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Note"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_customer_complaint_resolution_workflow": {
      "post": {
        "operationId": "tool_calculate_customer_complaint_resolution_workflow",
        "summary": "Complaint resolution workflow calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/customer-complaint-resolution-workflow/ on your numbers and returns the results as JSON (no files). This is an operational template. It does not give legal, insurance, medical or financial advice, does not decide fault or what a customer is owed, and does not guarantee that following it satisfies any law, contract or standard. Complaints in regulated settings follow that regulator's rules.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Business name"
                      },
                      "channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Email",
                            "Phone",
                            "Web form",
                            "In person",
                            "Mail",
                            "Social media"
                          ]
                        },
                        "description": "Channels you accept complaints through"
                      },
                      "ack_h": {
                        "type": "string",
                        "description": "Acknowledge within (hours) (Example: 24). Number as text, e.g. \"1200\"."
                      },
                      "res_d": {
                        "type": "string",
                        "description": "Resolve within (business days) (Example: 10). Number as text, e.g. \"1200\"."
                      },
                      "days": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Monday",
                            "Tuesday",
                            "Wednesday",
                            "Thursday",
                            "Friday",
                            "Saturday",
                            "Sunday"
                          ]
                        },
                        "description": "Business days (none checked = Monday to Friday)"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "rep_n": {
                        "type": "string",
                        "description": "Repeat issue: this many complaints in one category (3). Number as text, e.g. \"1200\"."
                      },
                      "rep_d": {
                        "type": "string",
                        "description": "within this many days (30). Number as text, e.g. \"1200\"."
                      },
                      "triggers": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Escalation words or phrases (comma-separated) that flag a complaint for a qualified person (Example: injury, lawyer, regulator, chargeback)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "cats": {
                        "type": "array",
                        "maxItems": 30,
                        "description": "Categories. Each row is an object keyed by column id (c = Category) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "c": {
                                  "type": "string",
                                  "description": "Category"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "remedy": {
                        "type": "array",
                        "maxItems": 20,
                        "description": "Your remedy policy (you decide; the tool applies none). Each row is an object keyed by column id (sit = Situation; rem = Remedy you offer; appr = Approver; lim = Limit ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "sit": {
                                  "type": "string",
                                  "description": "Situation"
                                },
                                "rem": {
                                  "type": "string",
                                  "description": "Remedy you offer"
                                },
                                "appr": {
                                  "type": "string",
                                  "description": "Approver"
                                },
                                "lim": {
                                  "type": "string",
                                  "description": "Limit ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "log": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Complaint log. Each row is an object keyed by column id (rcv = Received (date and time); ch = Channel; cust = Customer or contact; ref = Order reference; cat = Category; desc = Description; sev = Severity (your scale); own = Owner; st = Status; ack = Acknowledged (date and time); done = Resolved or closed on; cause = Root cause and corrective action; rem = Remedy given; amt = Credit or refund ($); resp = Customer response) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "rcv": {
                                  "type": "string",
                                  "description": "Received (date and time)"
                                },
                                "ch": {
                                  "type": "string",
                                  "enum": [
                                    "Email",
                                    "Phone",
                                    "Web form",
                                    "In person",
                                    "Mail",
                                    "Social media"
                                  ],
                                  "description": "Channel"
                                },
                                "cust": {
                                  "type": "string",
                                  "description": "Customer or contact"
                                },
                                "ref": {
                                  "type": "string",
                                  "description": "Order reference"
                                },
                                "cat": {
                                  "type": "string",
                                  "description": "Category"
                                },
                                "desc": {
                                  "type": "string",
                                  "description": "Description"
                                },
                                "sev": {
                                  "type": "string",
                                  "enum": [
                                    "Low",
                                    "Medium",
                                    "High"
                                  ],
                                  "description": "Severity (your scale)"
                                },
                                "own": {
                                  "type": "string",
                                  "description": "Owner"
                                },
                                "st": {
                                  "type": "string",
                                  "enum": [
                                    "New",
                                    "Acknowledged",
                                    "Investigating",
                                    "Awaiting customer",
                                    "Resolved",
                                    "Closed",
                                    "Escalated"
                                  ],
                                  "description": "Status"
                                },
                                "ack": {
                                  "type": "string",
                                  "description": "Acknowledged (date and time)"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Resolved or closed on"
                                },
                                "cause": {
                                  "type": "string",
                                  "description": "Root cause and corrective action"
                                },
                                "rem": {
                                  "type": "string",
                                  "description": "Remedy given"
                                },
                                "amt": {
                                  "type": "string",
                                  "description": "Credit or refund ($)"
                                },
                                "resp": {
                                  "type": "string",
                                  "enum": [
                                    "Accepted",
                                    "Declined",
                                    "No response"
                                  ],
                                  "description": "Customer response"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_preventive_maintenance_generator": {
      "post": {
        "operationId": "tool_calculate_preventive_maintenance_generator",
        "summary": "Preventive maintenance generator calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/preventive-maintenance-generator/ on your numbers and returns the results as JSON (no files). This is a scheduling aid. It ships with no service intervals: every interval comes from you or the equipment manual and is labeled with its source. It does not decide what maintenance a machine needs, and it does not say any equipment is safe, inspected, certified or compliant. It does not replace qualified people or the manufacturer's instructions.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company or site"
                      },
                      "from": {
                        "type": "string",
                        "description": "Schedule starts on (blank = today). YYYY-MM-DD."
                      },
                      "months": {
                        "type": "string",
                        "description": "Months to schedule (1 to 24) (3). Number as text, e.g. \"1200\"."
                      },
                      "soon": {
                        "type": "string",
                        "description": "Due soon window (days) (14). Number as text, e.g. \"1200\"."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "Completion-based (next due = last done + interval)",
                          "Fixed calendar (keep the original grid)"
                        ],
                        "description": "Scheduling basis"
                      },
                      "roll": {
                        "type": "string",
                        "enum": [
                          "Move to the next workday",
                          "Move to the previous workday"
                        ],
                        "description": "If a due date falls on a non-workday"
                      },
                      "days": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Monday",
                            "Tuesday",
                            "Wednesday",
                            "Thursday",
                            "Friday",
                            "Saturday",
                            "Sunday"
                          ]
                        },
                        "description": "Workdays (none checked = Monday to Friday)"
                      },
                      "holidays": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Holidays to skip (YYYY-MM-DD, comma-separated)"
                      },
                      "cap": {
                        "type": "string",
                        "description": "Technician hours available per week. Number as text, e.g. \"1200\"."
                      },
                      "shift": {
                        "type": "string",
                        "description": "Tasks may move earlier by up to (days) to level the workload. Number as text, e.g. \"1200\"."
                      },
                      "rate": {
                        "type": "string",
                        "description": "Labor rate ($ per hour). Number as text, e.g. \"1200\"."
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "assets": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Equipment. Each row is an object keyed by column id (id = Asset ID; name = Name; loc = Location; mms = Make, model, serial; crit = Criticality (your scale); mt = Meter; cur = Current meter; use = Average use per day; loto = Has a written lockout/tagout procedure) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "mms": {
                                  "type": "string",
                                  "description": "Make, model, serial"
                                },
                                "crit": {
                                  "type": "string",
                                  "enum": [
                                    "1 (low)",
                                    "2",
                                    "3 (high)"
                                  ],
                                  "description": "Criticality (your scale)"
                                },
                                "mt": {
                                  "type": "string",
                                  "enum": [
                                    "None",
                                    "Hours",
                                    "Miles",
                                    "Cycles"
                                  ],
                                  "description": "Meter"
                                },
                                "cur": {
                                  "type": "string",
                                  "description": "Current meter"
                                },
                                "use": {
                                  "type": "string",
                                  "description": "Average use per day"
                                },
                                "loto": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Has a written lockout/tagout procedure"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "tasks": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Maintenance tasks (intervals from your manual or policy). Each row is an object keyed by column id (aid = Asset ID; task = Task; unit = Interval unit; n = Interval; ld = Last done (date); lm = Last done (meter); min = Minutes; who = Assigned to; src = Interval source; srcd = Source detail) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "aid": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "Days",
                                    "Weeks",
                                    "Months",
                                    "Meter"
                                  ],
                                  "description": "Interval unit"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Interval"
                                },
                                "ld": {
                                  "type": "string",
                                  "description": "Last done (date)"
                                },
                                "lm": {
                                  "type": "string",
                                  "description": "Last done (meter)"
                                },
                                "min": {
                                  "type": "string",
                                  "description": "Minutes"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Assigned to"
                                },
                                "src": {
                                  "type": "string",
                                  "enum": [
                                    "Manufacturer manual",
                                    "Internal policy",
                                    "Regulation or standard",
                                    "Other"
                                  ],
                                  "description": "Interval source"
                                },
                                "srcd": {
                                  "type": "string",
                                  "description": "Source detail"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "parts": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Parts per task. Each row is an object keyed by column id (task = Task (same name as above); part = Part; qty = Qty; cost = Unit cost ($)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "task": {
                                  "type": "string",
                                  "description": "Task (same name as above)"
                                },
                                "part": {
                                  "type": "string",
                                  "description": "Part"
                                },
                                "qty": {
                                  "type": "string",
                                  "description": "Qty"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Unit cost ($)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "done": {
                        "type": "array",
                        "maxItems": 300,
                        "description": "Completion log. Each row is an object keyed by column id (aid = Asset ID; task = Task; date = Date done; meter = Meter; by = Done by; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "aid": {
                                  "type": "string",
                                  "description": "Asset ID"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date done"
                                },
                                "meter": {
                                  "type": "string",
                                  "description": "Meter"
                                },
                                "by": {
                                  "type": "string",
                                  "description": "Done by"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_forklift_inspection_system": {
      "post": {
        "operationId": "tool_calculate_forklift_inspection_system",
        "summary": "Forklift inspection system calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/forklift-inspection-system/ on your numbers and returns the results as JSON (no files). This record system supports the qualified people who run a powered industrial truck program. It does not decide that a truck is safe or unsafe, does not train or evaluate operators, and does not certify compliance with OSHA or any state plan. The inspector makes and records every decision, including removal from service. Check the official sources listed with it.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Company and site"
                      },
                      "opdays": {
                        "type": "string",
                        "description": "Operating days per week (5). Number as text, e.g. \"1200\"."
                      },
                      "p0": {
                        "type": "string",
                        "description": "Inspection log period start. YYYY-MM-DD."
                      },
                      "p1": {
                        "type": "string",
                        "description": "Inspection log period end. YYYY-MM-DD."
                      },
                      "warn": {
                        "type": "string",
                        "description": "Warn me this many days before an evaluation is due (90). Number as text, e.g. \"1200\"."
                      },
                      "c_truck": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Truck ID"
                      },
                      "c_date": {
                        "type": "string",
                        "description": "Date. YYYY-MM-DD."
                      },
                      "c_shift": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Shift"
                      },
                      "c_by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector"
                      },
                      "c_hrs": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Hour meter"
                      },
                      "c_dec": {
                        "type": "string",
                        "enum": [
                          "No condition affecting safety",
                          "Condition noted - supervisor review",
                          "Condition affecting safety - removed from service"
                        ],
                        "description": "Inspector decision (selected by the inspector)"
                      },
                      "c_rep": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Defects reported to"
                      },
                      "c_sig": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Inspector signature"
                      },
                      "tag_truck": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Truck ID"
                      },
                      "tag_date": {
                        "type": "string",
                        "description": "Date removed. YYYY-MM-DD."
                      },
                      "tag_by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Removed by"
                      },
                      "tag_rep": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Reported to"
                      },
                      "tag_why": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Reason (in the inspector's words)"
                      },
                      "tag_fix": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Repaired by (authorized person) and date"
                      },
                      "tag_ret": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Returned to service by and date"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "trucks": {
                        "type": "array",
                        "maxItems": 60,
                        "description": "Truck roster. Each row is an object keyed by column id (id = Truck ID; type = Type; mm = Make and model; cap = Capacity from the data plate (lb); loc = Location; hrs = Hour meter; shifts = Shifts per day; rtc = Used round-the-clock) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Truck ID"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "Electric counterbalance",
                                    "LP gas",
                                    "Diesel or gasoline",
                                    "Reach truck",
                                    "Motorized pallet jack",
                                    "Order picker",
                                    "Other"
                                  ],
                                  "description": "Type"
                                },
                                "mm": {
                                  "type": "string",
                                  "description": "Make and model"
                                },
                                "cap": {
                                  "type": "string",
                                  "description": "Capacity from the data plate (lb)"
                                },
                                "loc": {
                                  "type": "string",
                                  "description": "Location"
                                },
                                "hrs": {
                                  "type": "string",
                                  "description": "Hour meter"
                                },
                                "shifts": {
                                  "type": "string",
                                  "description": "Shifts per day"
                                },
                                "rtc": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Used round-the-clock"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "check": {
                        "type": "array",
                        "maxItems": 60,
                        "description": "Checklist items (starter areas; confirm against the operator manual). Each row is an object keyed by column id (item = Item; res = Result; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "Item"
                                },
                                "res": {
                                  "type": "string",
                                  "enum": [
                                    "OK",
                                    "Defect noted",
                                    "N/A"
                                  ],
                                  "description": "Result"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "log": {
                        "type": "array",
                        "maxItems": 400,
                        "description": "Inspection and defect log. Each row is an object keyed by column id (date = Date; shift = Shift; truck = Truck ID; by = Inspector; hrs = Hour meter; def = Defects found; dec = Inspector decision; rep = Reported to; fix = Repaired by (authorized person); fixd = Repair date) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "shift": {
                                  "type": "string",
                                  "description": "Shift"
                                },
                                "truck": {
                                  "type": "string",
                                  "description": "Truck ID"
                                },
                                "by": {
                                  "type": "string",
                                  "description": "Inspector"
                                },
                                "hrs": {
                                  "type": "string",
                                  "description": "Hour meter"
                                },
                                "def": {
                                  "type": "string",
                                  "description": "Defects found"
                                },
                                "dec": {
                                  "type": "string",
                                  "enum": [
                                    "No condition affecting safety",
                                    "Condition noted - supervisor review",
                                    "Condition affecting safety - removed from service"
                                  ],
                                  "description": "Inspector decision"
                                },
                                "rep": {
                                  "type": "string",
                                  "description": "Reported to"
                                },
                                "fix": {
                                  "type": "string",
                                  "description": "Repaired by (authorized person)"
                                },
                                "fixd": {
                                  "type": "string",
                                  "description": "Repair date"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "ops": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Operator training and evaluation records. Each row is an object keyed by column id (name = Operator name; types = Truck types authorized; tr = Date of training; ev = Date of evaluation; who = Person(s) who trained or evaluated; topics = Topics covered (see 1910.178(l)(3))) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Operator name"
                                },
                                "types": {
                                  "type": "string",
                                  "description": "Truck types authorized"
                                },
                                "tr": {
                                  "type": "string",
                                  "description": "Date of training"
                                },
                                "ev": {
                                  "type": "string",
                                  "description": "Date of evaluation"
                                },
                                "who": {
                                  "type": "string",
                                  "description": "Person(s) who trained or evaluated"
                                },
                                "topics": {
                                  "type": "string",
                                  "description": "Topics covered (see 1910.178(l)(3))"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "refresh": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Refresher training events. Each row is an object keyed by column id (op = Operator; date = Date; why = Reason (1910.178(l)(4)(ii)); done = Refresher completed on; note = Notes) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "op": {
                                  "type": "string",
                                  "description": "Operator"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "why": {
                                  "type": "string",
                                  "enum": [
                                    "Observed operating the vehicle in an unsafe manner",
                                    "Involved in an accident or near-miss incident",
                                    "Evaluation showed the truck is not being operated safely",
                                    "Assigned to drive a different type of truck",
                                    "Workplace condition changed in a way that could affect safe operation"
                                  ],
                                  "description": "Reason (1910.178(l)(4)(ii))"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Refresher completed on"
                                },
                                "note": {
                                  "type": "string",
                                  "description": "Notes"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_ppe_assessment_organizer": {
      "post": {
        "operationId": "tool_calculate_ppe_assessment_organizer",
        "summary": "PPE assessment calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/ppe-assessment-organizer/ on your numbers and returns the results as JSON (no files). This worksheet supports the person who performs the PPE hazard assessment. The assessor identifies the hazards and selects the PPE; the tool makes no suggestions, does not rank PPE, does not say an assessment is adequate, and does not certify compliance with OSHA or any state plan. Respiratory and hearing protection are outside this tool. Check the official sources listed with it.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Workplace evaluated (name)"
                      },
                      "addr": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Workplace address"
                      },
                      "docid": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Document number or revision"
                      },
                      "by": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Person certifying that the evaluation has been performed"
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Title"
                      },
                      "dates": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Date(s) of the hazard assessment"
                      },
                      "next": {
                        "type": "string",
                        "description": "Next review date (set by the assessor). YYYY-MM-DD."
                      },
                      "cats": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "Impact",
                            "Penetration",
                            "Compression (roll-over)",
                            "Chemical",
                            "Heat",
                            "Harmful dust",
                            "Light (optical) radiation"
                          ]
                        },
                        "description": "Basic hazard categories considered during the walk-through (Appendix B to Subpart I, non-mandatory)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "tasks": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Areas, tasks, hazards and PPE (all entered by the assessor). Each row is an object keyed by column id (area = Area; task = Task; n = Employees affected; haz = Hazards found by the assessor (or 'none found'); ctl = Other controls in place; ppe = PPE selected by the assessor; std = Rating or standard (as typed by the assessor); req = Required to be worn; why = If no PPE: the assessor's reason) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "area": {
                                  "type": "string",
                                  "description": "Area"
                                },
                                "task": {
                                  "type": "string",
                                  "description": "Task"
                                },
                                "n": {
                                  "type": "string",
                                  "description": "Employees affected"
                                },
                                "haz": {
                                  "type": "string",
                                  "description": "Hazards found by the assessor (or 'none found')"
                                },
                                "ctl": {
                                  "type": "string",
                                  "description": "Other controls in place"
                                },
                                "ppe": {
                                  "type": "string",
                                  "description": "PPE selected by the assessor"
                                },
                                "std": {
                                  "type": "string",
                                  "description": "Rating or standard (as typed by the assessor)"
                                },
                                "req": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Required to be worn"
                                },
                                "why": {
                                  "type": "string",
                                  "description": "If no PPE: the assessor's reason"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "fit": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Fit and size record. Each row is an object keyed by column id (emp = Employee; item = PPE item; size = Size; date = Date fitted) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "size": {
                                  "type": "string",
                                  "description": "Size"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date fitted"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "comm": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Selection decisions communicated. Each row is an object keyed by column id (who = Employee or group; date = Date communicated; how = How) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "who": {
                                  "type": "string",
                                  "description": "Employee or group"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date communicated"
                                },
                                "how": {
                                  "type": "string",
                                  "description": "How"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "train": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "Training record. Each row is an object keyed by column id (emp = Employee; item = PPE item or group; date = Training date; topics = Subjects covered; demo = Understanding demonstrated on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "item": {
                                  "type": "string",
                                  "description": "PPE item or group"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Training date"
                                },
                                "topics": {
                                  "type": "string",
                                  "description": "Subjects covered"
                                },
                                "demo": {
                                  "type": "string",
                                  "description": "Understanding demonstrated on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "retrain": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Retraining events. Each row is an object keyed by column id (emp = Employee; date = Date; why = Circumstance (1910.132(f)(3)); done = Retrained on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employee"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date"
                                },
                                "why": {
                                  "type": "string",
                                  "enum": [
                                    "Changes in the workplace made previous training obsolete",
                                    "Changes in the types of PPE made previous training obsolete",
                                    "Employee has not retained the understanding or skill"
                                  ],
                                  "description": "Circumstance (1910.132(f)(3))"
                                },
                                "done": {
                                  "type": "string",
                                  "description": "Retrained on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "pay": {
                        "type": "array",
                        "maxItems": 200,
                        "description": "PPE payment record. Each row is an object keyed by column id (item = PPE item; cost = Cost ($); by = Paid by; basis = If employee-paid: the basis the employer recorded (see 1910.132(h))) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "cost": {
                                  "type": "string",
                                  "description": "Cost ($)"
                                },
                                "by": {
                                  "type": "string",
                                  "enum": [
                                    "Employer",
                                    "Employee"
                                  ],
                                  "description": "Paid by"
                                },
                                "basis": {
                                  "type": "string",
                                  "description": "If employee-paid: the basis the employer recorded (see 1910.132(h))"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "bad": {
                        "type": "array",
                        "maxItems": 100,
                        "description": "Defective or damaged PPE log. Each row is an object keyed by column id (item = PPE item; date = Date found; act = Action taken; out = Removed from use; repl = Replaced on) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "item": {
                                  "type": "string",
                                  "description": "PPE item"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Date found"
                                },
                                "act": {
                                  "type": "string",
                                  "description": "Action taken"
                                },
                                "out": {
                                  "type": "string",
                                  "enum": [
                                    "Yes",
                                    "No"
                                  ],
                                  "description": "Removed from use"
                                },
                                "repl": {
                                  "type": "string",
                                  "description": "Replaced on"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/calculate_job_offer_comparison_calculator": {
      "post": {
        "operationId": "tool_calculate_job_offer_comparison_calculator",
        "summary": "Job offer comparison calculator (JSON)",
        "description": "Runs the calculator from https://allaiforms.com/tools/job-offer-comparison-calculator/ on your numbers and returns the results as JSON (no files). Arithmetic on the numbers you enter. Not tax, legal, benefits or financial advice, and not a recommendation to accept or decline any offer. The optional payroll-tax lines use only the published Social Security and Medicare employee rates and exclude income tax, Additional Medicare Tax, and state and local taxes.",
        "tags": [
          "calculators"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fields"
                ],
                "properties": {
                  "fields": {
                    "type": "object",
                    "properties": {
                      "years": {
                        "type": "string",
                        "description": "Years to total (1 to 5) (3). Number as text, e.g. \"1200\"."
                      },
                      "ptax": {
                        "type": "string",
                        "enum": [
                          "Show",
                          "Off"
                        ],
                        "description": "Payroll-tax arithmetic (Social Security and Medicare, employee share)"
                      },
                      "wyear": {
                        "type": "string",
                        "enum": [
                          "2027",
                          "2026"
                        ],
                        "description": "Wage year for the Social Security wage base"
                      },
                      "itax": {
                        "type": "string",
                        "description": "Your own income tax rate estimate (%, optional). Number as text, e.g. \"1200\"."
                      },
                      "q": {
                        "type": "string",
                        "maxLength": 3000,
                        "description": "Your questions (for example: confirm the bonus payout basis, the vesting schedule, the benefits start date)"
                      }
                    },
                    "description": "Form fields by id. Leave out what you do not know; the document keeps a blank line for it."
                  },
                  "rows": {
                    "type": "object",
                    "properties": {
                      "offers": {
                        "type": "array",
                        "maxItems": 5,
                        "description": "Offers (one card per offer). Each row is an object keyed by column id (emp = Employer; title = Job title; basis = Pay basis; sal = Annual salary ($); hr = Hourly rate ($); hw = Hours per week (blank = 40); wk = Paid weeks per year (blank = 52); bon = Bonus target ($ per year); bonp = Payout you expect (% of target); sign = Signing bonus ($); reloc = Relocation payment ($); eq = Equity grant value (your estimate, $); eqin = Count equity?; eqc = Your confidence in that value (%); vest = Vesting years; cliff = Cliff (months); k1 = Your retirement contribution (% of pay); k2 = Employer match rate (%); k3 = Match cap (% of pay); hpaid = Employer-paid health ($ per month); hprem = Your health premium ($ per month); hsa = HSA or other employer contribution ($ per year); stip = Stipends ($ per year); pto = PTO days; hol = Paid holidays; mi = Commute one-way miles; mins = Commute one-way minutes; on = On-site days per week; cpm = Your cost per mile ($); park = Parking or transit ($ per year); col = Cost-of-living factor (your figure; 1.00 = baseline); raise = Expected annual raise (%)) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "emp": {
                                  "type": "string",
                                  "description": "Employer"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Job title"
                                },
                                "basis": {
                                  "type": "string",
                                  "enum": [
                                    "Salary",
                                    "Hourly"
                                  ],
                                  "description": "Pay basis"
                                },
                                "sal": {
                                  "type": "string",
                                  "description": "Annual salary ($)"
                                },
                                "hr": {
                                  "type": "string",
                                  "description": "Hourly rate ($)"
                                },
                                "hw": {
                                  "type": "string",
                                  "description": "Hours per week (blank = 40)"
                                },
                                "wk": {
                                  "type": "string",
                                  "description": "Paid weeks per year (blank = 52)"
                                },
                                "bon": {
                                  "type": "string",
                                  "description": "Bonus target ($ per year)"
                                },
                                "bonp": {
                                  "type": "string",
                                  "description": "Payout you expect (% of target)"
                                },
                                "sign": {
                                  "type": "string",
                                  "description": "Signing bonus ($)"
                                },
                                "reloc": {
                                  "type": "string",
                                  "description": "Relocation payment ($)"
                                },
                                "eq": {
                                  "type": "string",
                                  "description": "Equity grant value (your estimate, $)"
                                },
                                "eqin": {
                                  "type": "string",
                                  "enum": [
                                    "No",
                                    "Yes"
                                  ],
                                  "description": "Count equity?"
                                },
                                "eqc": {
                                  "type": "string",
                                  "description": "Your confidence in that value (%)"
                                },
                                "vest": {
                                  "type": "string",
                                  "description": "Vesting years"
                                },
                                "cliff": {
                                  "type": "string",
                                  "description": "Cliff (months)"
                                },
                                "k1": {
                                  "type": "string",
                                  "description": "Your retirement contribution (% of pay)"
                                },
                                "k2": {
                                  "type": "string",
                                  "description": "Employer match rate (%)"
                                },
                                "k3": {
                                  "type": "string",
                                  "description": "Match cap (% of pay)"
                                },
                                "hpaid": {
                                  "type": "string",
                                  "description": "Employer-paid health ($ per month)"
                                },
                                "hprem": {
                                  "type": "string",
                                  "description": "Your health premium ($ per month)"
                                },
                                "hsa": {
                                  "type": "string",
                                  "description": "HSA or other employer contribution ($ per year)"
                                },
                                "stip": {
                                  "type": "string",
                                  "description": "Stipends ($ per year)"
                                },
                                "pto": {
                                  "type": "string",
                                  "description": "PTO days"
                                },
                                "hol": {
                                  "type": "string",
                                  "description": "Paid holidays"
                                },
                                "mi": {
                                  "type": "string",
                                  "description": "Commute one-way miles"
                                },
                                "mins": {
                                  "type": "string",
                                  "description": "Commute one-way minutes"
                                },
                                "on": {
                                  "type": "string",
                                  "description": "On-site days per week"
                                },
                                "cpm": {
                                  "type": "string",
                                  "description": "Your cost per mile ($)"
                                },
                                "park": {
                                  "type": "string",
                                  "description": "Parking or transit ($ per year)"
                                },
                                "col": {
                                  "type": "string",
                                  "description": "Cost-of-living factor (your figure; 1.00 = baseline)"
                                },
                                "raise": {
                                  "type": "string",
                                  "description": "Expected annual raise (%)"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "score": {
                        "type": "array",
                        "maxItems": 10,
                        "description": "Scorecard (kept separate from the money). Each row is an object keyed by column id (c = Criterion; w = Weight (1 to 5); s1 = Offer 1 score (1 to 10); s2 = Offer 2 score; s3 = Offer 3 score; s4 = Offer 4 score; s5 = Offer 5 score) or an array in that column order.",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "c": {
                                  "type": "string",
                                  "description": "Criterion"
                                },
                                "w": {
                                  "type": "string",
                                  "description": "Weight (1 to 5)"
                                },
                                "s1": {
                                  "type": "string",
                                  "description": "Offer 1 score (1 to 10)"
                                },
                                "s2": {
                                  "type": "string",
                                  "description": "Offer 2 score"
                                },
                                "s3": {
                                  "type": "string",
                                  "description": "Offer 3 score"
                                },
                                "s4": {
                                  "type": "string",
                                  "description": "Offer 4 score"
                                },
                                "s5": {
                                  "type": "string",
                                  "description": "Offer 5 score"
                                }
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      }
                    },
                    "description": "Table rows by table id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/get_credit_balance": {
      "post": {
        "operationId": "tool_get_credit_balance",
        "summary": "Credit balance and recent usage",
        "description": "Returns the remaining prepaid credits on your key and the last 20 credit events. Needs Authorization: Bearer <api_key>.",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 0
      }
    },
    "/v1/tools/list_paid_tools": {
      "post": {
        "operationId": "tool_list_paid_tools",
        "summary": "List every tool with its credit price",
        "description": "Lists all tools on this server with their credit price, REST path and trial rules, plus the one-time credit packs and their pay_url.",
        "tags": [
          "account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 0
      }
    },
    "/v1/tools/offer_match": {
      "post": {
        "operationId": "tool_offer_match",
        "summary": "Match a buying request to offers",
        "description": "Ranks All AI LLC offers (forms, contracts, agent packs, tools) and ALL AI Forms catalog hits for a plain-language request, with checkout links.",
        "tags": [
          "data"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "q"
                ],
                "properties": {
                  "q": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 300,
                    "description": "What the buyer needs, e.g. 'contractor agreement Texas'."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 10
      }
    },
    "/v1/tools/catalog_query": {
      "post": {
        "operationId": "tool_catalog_query",
        "summary": "Query product metadata",
        "description": "Searches owned product metadata by query, brand and kind.",
        "tags": [
          "data"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "q": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "brand": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 5
      }
    },
    "/v1/tools/get_offer": {
      "post": {
        "operationId": "tool_get_offer",
        "summary": "Look up one offer",
        "description": "Returns one offer by id from /offers.json. Unknown ids are free (404).",
        "tags": [
          "data"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 2
      }
    },
    "/v1/tools/invoice_quote_pdf": {
      "post": {
        "operationId": "tool_invoice_quote_pdf",
        "summary": "Invoice or quote (PDF and Word)",
        "description": "Builds a clean invoice or price quote from structured line items: quantities, unit prices, per-line or default tax percent, discounts, shipping and amount paid. All math is done server-side in integer cents and returned as JSON alongside a PDF and a Word file. Optional expected_total is checked and the call fails (free) if it does not match. Your branding fields (business name, address, tax id, accent text) go on the document. 20 credits ($0.02) per successful document.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "invoice",
                      "quote"
                    ],
                    "description": "Default invoice."
                  },
                  "number": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "issue_date": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "due_date": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Invoice due date, or quote valid-until date."
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "description": "ISO 4217 code, default USD."
                  },
                  "seller": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "address": {
                        "type": "string",
                        "maxLength": 600
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 60
                      },
                      "tax_id": {
                        "type": "string",
                        "maxLength": 80
                      }
                    },
                    "additionalProperties": false
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "address": {
                        "type": "string",
                        "maxLength": 600
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 60
                      },
                      "tax_id": {
                        "type": "string",
                        "maxLength": 80
                      }
                    },
                    "additionalProperties": false
                  },
                  "items": {
                    "type": "array",
                    "maxItems": 200,
                    "description": "Line items.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "description": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "unit_price": {
                          "type": "number",
                          "minimum": -1000000000,
                          "maximum": 1000000000,
                          "description": "Rounded to the cent before multiplying."
                        },
                        "tax_rate": {
                          "type": "number"
                        },
                        "discount": {
                          "type": "number",
                          "minimum": -1000000000,
                          "maximum": 1000000000
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "tax_rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Default tax percent for lines without their own."
                  },
                  "discount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000,
                    "description": "Whole-document discount (amount)."
                  },
                  "shipping": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "amount_paid": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "expected_total": {
                    "type": "number",
                    "description": "If given, must equal the computed total to the cent."
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "terms": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "payment_instructions": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "brand": {
                    "type": "object",
                    "properties": {
                      "tagline": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "website": {
                        "type": "string",
                        "maxLength": 200
                      }
                    },
                    "additionalProperties": false
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "description": "Output files (default both)."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 20
      }
    },
    "/v1/tools/fill_template": {
      "post": {
        "operationId": "tool_fill_template",
        "summary": "Fill your own template (PDF or Word)",
        "description": "Fills {{placeholders}} in your own template with JSON data and returns a finished document. Templates: Markdown, plain text or HTML (up to 50 KB; headings, paragraphs, lists and | tables | are kept; HTML is reduced to text, scripts and remote images are dropped and nothing is fetched) rendered to PDF and/or Word, or a Word .docx file (base64, up to 1 MB) whose placeholders are replaced and returned as .docx. Nested keys use dots, e.g. {{client.name}}. Missing keys are listed; set strict to fail (free) instead. 20 credits ($0.02) per successful document.",
        "tags": [
          "documents"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "template": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "Markdown, text or HTML template with {{placeholders}}. For a Word template use template_format docx with docx_base64. PDF files are not accepted as templates (output can be PDF)."
                  },
                  "template_format": {
                    "type": "string",
                    "enum": [
                      "markdown",
                      "text",
                      "html",
                      "docx"
                    ],
                    "description": "Default markdown. Use docx with docx_base64."
                  },
                  "docx_base64": {
                    "type": "string",
                    "maxLength": 1400000,
                    "description": "A Word .docx template with {{placeholders}}, base64-encoded (up to about 1 MB). Not a PDF."
                  },
                  "data": {
                    "type": "object",
                    "description": "Values for the placeholders (JSON, up to 20 KB)."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "strict": {
                    "type": "boolean",
                    "description": "Fail (not charged) when any placeholder has no value."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "pdf",
                      "docx",
                      "both"
                    ],
                    "description": "Output files (default both)."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result. billing shows the credits charged (0 for trial, free or empty results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Credits required or insufficient; includes pay_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-credits": 20
      }
    },
    "/v1/keys/me": {
      "get": {
        "operationId": "keys_me",
        "summary": "Key info and balance",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "usage",
        "summary": "Credit ledger (last 100 events) and per-route totals",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/rotate": {
      "post": {
        "operationId": "keys_rotate",
        "summary": "Issue a new key with the same credits; revoke the old one",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyIssued"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/revoke": {
      "post": {
        "operationId": "keys_revoke",
        "summary": "Revoke this key",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/topup": {
      "post": {
        "operationId": "keys_topup",
        "summary": "Add a newly paid pack to this key (pass the Checkout session id)",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pack",
                  "session_id"
                ],
                "properties": {
                  "pack": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "builder",
                      "shop",
                      "studio"
                    ]
                  },
                  "session_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "409": {
            "description": "That payment was already used",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/merge": {
      "post": {
        "operationId": "keys_merge",
        "summary": "Move all credits from another key into this key",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from_key"
                ],
                "properties": {
                  "from_key": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/recover": {
      "post": {
        "operationId": "keys_recover",
        "summary": "Email a recovery link to the checkout email",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generic reply",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/refunds/request": {
      "post": {
        "operationId": "refund_request",
        "summary": "Ask for a refund of unused credits",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Request recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/limits": {
      "get": {
        "operationId": "keys_limits_get",
        "summary": "This key's daily spend cap and tool allow-list",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Limits"
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "keys_limits_set",
        "summary": "Set a daily spend cap (credits) and/or a tool allow-list for this key; null clears",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "daily_cap_credits": {
                    "type": "integer",
                    "description": "null clears"
                  },
                  "allowed_tools": {
                    "type": "array",
                    "description": "null clears",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Limits"
          },
          "401": {
            "description": "Missing, unknown or revoked key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid arguments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools": {
      "get": {
        "operationId": "tools_list",
        "summary": "All tools with prices",
        "responses": {
          "200": {
            "description": "Tools"
          }
        }
      }
    },
    "/terms": {
      "get": {
        "operationId": "terms",
        "summary": "Terms of Service (one-time credit packs, refund policy, pack prices)",
        "responses": {
          "200": {
            "description": "HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/privacy": {
      "get": {
        "operationId": "privacy",
        "summary": "Privacy policy",
        "responses": {
          "200": {
            "description": "HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/thanks/{pack}": {
      "get": {
        "operationId": "thanks",
        "summary": "Post-checkout page: shows the API key for a paid Stripe Checkout session (24 h)",
        "parameters": [
          {
            "name": "pack",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "starter",
                "builder",
                "shop",
                "studio"
              ]
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^cs_(live|test)_[A-Za-z0-9]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Key page",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Payment not confirmed yet",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stripe/webhook": {
      "post": {
        "operationId": "stripe_webhook",
        "summary": "Stripe webhook (checkout.session.completed, checkout.session.async_payment_succeeded). Signed with Stripe-Signature; idempotent; issues the key even if the buyer closes the tab. Not for direct use.",
        "parameters": [
          {
            "name": "Stripe-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received"
          },
          "400": {
            "description": "Missing or bad signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/keys/recover": {
      "get": {
        "operationId": "keys_recover_page",
        "summary": "Key recovery page (email link)",
        "responses": {
          "200": {
            "description": "HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "operationId": "status",
        "summary": "Public status of the paid routes (JSON with ?format=json or Accept: application/json)",
        "responses": {
          "200": {
            "description": "Status"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key (ak_live_...) issued after a one-time credit-pack purchase."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Same ak_live_... key as a header."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "charged": {
            "type": "integer"
          }
        }
      },
      "PaymentRequired": {
        "type": "object",
        "required": [
          "error",
          "pay_url"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "payment_required",
              "insufficient_credits",
              "invalid_key"
            ]
          },
          "message": {
            "type": "string"
          },
          "credits_required": {
            "type": "integer"
          },
          "usd_required": {
            "type": "number"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "pay_url": {
            "type": "string",
            "format": "uri"
          },
          "buy": {
            "type": "string",
            "format": "uri"
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Pack"
            }
          },
          "subscriptions": {
            "type": "boolean"
          }
        }
      },
      "Pack": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "price_usd": {
            "type": "number"
          },
          "credits": {
            "type": "integer"
          },
          "pay_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Billing": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "credits_charged": {
            "type": "integer"
          },
          "usd_charged": {
            "type": "number"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "ref": {
            "type": "string"
          },
          "trial_left_today": {
            "type": "integer"
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "mime": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "base64": {
            "type": "string"
          }
        }
      },
      "ToolResult": {
        "type": "object",
        "required": [
          "tool",
          "billing"
        ],
        "properties": {
          "tool": {
            "type": "string"
          },
          "result": {
            "type": "object"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/File"
            }
          },
          "billing": {
            "$ref": "#/components/schemas/Billing"
          }
        }
      },
      "Credits": {
        "type": "object",
        "properties": {
          "pack": {
            "type": "string"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "usd_value": {
            "type": "number"
          },
          "billing": {
            "type": "string"
          },
          "subscriptions": {
            "type": "boolean"
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "credits_remaining": {
            "type": "integer"
          },
          "totals": {
            "type": "object"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ts": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "credits": {
                  "type": "integer"
                },
                "balance_after": {
                  "type": "integer"
                },
                "route": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "KeyIssued": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "credits": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}