{
  "openapi": "3.1.0",
  "info": {
    "title": "Intex Institute: the Index",
    "version": "2026-11-18",
    "summary": "Five small APIs that make LaTeX accessible.",
    "description": "Formula is open now with no key. The project services (count, pdf, page, report, all) take a key: sign up free at https://intex.university/signup, then make keys and add credit at https://app.intex.university/api-keys. Every page of https://intex.institute documents one service in words; this document says the same for software. A project that cannot be built costs nothing. Files are deleted the moment the response is sent.",
    "contact": {"name": "Intex", "email": "team@intex.university", "url": "https://intex.institute/"}
  },
  "externalDocs": {"description": "The docs shared by every service", "url": "https://intex.institute/api"},
  "servers": [{"url": "https://api.intex.institute/v1", "description": "The project services"}],
  "security": [{"key": []}],
  "paths": {
    "/api/formula": {
      "servers": [{"url": "https://app.intex.university", "description": "Open now, no key"}],
      "get": {
        "operationId": "formula",
        "summary": "One LaTeX formula in; its speech, copy text and MathML out.",
        "description": "Free with no key: thirty formulas every ten minutes from one network. Answers every origin. See https://intex.institute/formula. Free without a key, thirty formulas every ten minutes from one network; with a key (optional), $1 per 1,000, six hundred every ten minutes.",
        "security": [{}, {"key": []}],
        "externalDocs": {"url": "https://intex.institute/formula#docs"},
        "parameters": [
          {
            "name": "tex",
            "in": "query",
            "required": true,
            "description": "One formula as LaTeX, without dollar signs. One line, at most 1,000 characters.",
            "schema": {"type": "string", "maxLength": 1000},
            "example": "\\frac{1}{2}mv^2"
          }
        ],
        "responses": {
          "200": {
            "description": "The formula, read.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Formula"}}}
          },
          "422": {
            "description": "The formula could not be read; error names the column.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "429": {
            "description": "Too many in a few minutes; wait the seconds in Retry-After.",
            "headers": {"Retry-After": {"schema": {"type": "integer"}}},
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "401": {
            "description": "A key was sent and is not a live one.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "402": {
            "description": "With a key: no credit left.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        }
      },
      "post": {
        "operationId": "formulaPost",
        "summary": "The same as GET, with tex in a JSON body or a form.",
        "security": [{}, {"key": []}],
        "externalDocs": {"url": "https://intex.institute/formula#docs"},
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {"type": "object", "required": ["tex"], "properties": {"tex": {"type": "string", "maxLength": 1000}}}
            },
            "application/x-www-form-urlencoded": {
              "schema": {"type": "object", "required": ["tex"], "properties": {"tex": {"type": "string", "maxLength": 1000}}}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The formula, read.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Formula"}}}
          },
          "422": {
            "description": "The formula could not be read.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "429": {
            "description": "Too many in a few minutes.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "401": {
            "description": "A key was sent and is not a live one.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "402": {
            "description": "With a key: no credit left.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        }
      }
    },
    "/count": {
      "post": {
        "operationId": "count",
        "summary": "A LaTeX project in; its pages, formulas, figures, tables and the price of each service out. Free.",
        "externalDocs": {"url": "https://intex.institute/count#docs"},
        "x-status": "open",
        "requestBody": {"$ref": "#/components/requestBodies/Project"},
        "responses": {
          "200": {
            "description": "The count.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Count"}}},
            "headers": {"Intex-Credit-Cents": {"$ref": "#/components/headers/Credit"}}
          },
          "400": {
            "$ref": "#/components/responses/Error",
            "description": "Not a project upload: no form field project, nor a .zip or .tar.gz."
          },
          "401": {"$ref": "#/components/responses/Error"},
          "413": {"$ref": "#/components/responses/Error"},
          "422": {"$ref": "#/components/responses/Error"},
          "429": {"$ref": "#/components/responses/Error"},
          "403": {
            "description": "The key's account may not use the API.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "503": {
            "description": "The service is paused, or every build slot is busy; see Retry-After.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        },
        "parameters": [
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {"type": "string"},
            "description": "The main .tex file, when the archive is the body and holds more than one."
          }
        ]
      }
    },
    "/pdf": {
      "post": {
        "operationId": "pdf",
        "summary": "A LaTeX project in; a tagged PDF with real mathematics out. 6 cents a page.",
        "externalDocs": {"url": "https://intex.institute/pdf#docs"},
        "x-status": "open",
        "x-price": {"cents": 6, "per": "page"},
        "requestBody": {"$ref": "#/components/requestBodies/Project"},
        "responses": {
          "200": {
            "description": "The tagged PDF.",
            "headers": {
              "Intex-Pages": {"$ref": "#/components/headers/Pages"},
              "Intex-Cost-Cents": {"$ref": "#/components/headers/Cost"},
              "Intex-Credit-Cents": {"$ref": "#/components/headers/Credit"}
            },
            "content": {"application/pdf": {"schema": {"type": "string", "format": "binary"}}}
          },
          "400": {
            "$ref": "#/components/responses/Error",
            "description": "Not a project upload: no form field project, nor a .zip or .tar.gz."
          },
          "401": {"$ref": "#/components/responses/Error"},
          "402": {"$ref": "#/components/responses/Error"},
          "413": {"$ref": "#/components/responses/Error"},
          "422": {"$ref": "#/components/responses/Error"},
          "429": {"$ref": "#/components/responses/Error"},
          "403": {
            "description": "The key's account may not use the API.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "503": {
            "description": "The service is paused, or every build slot is busy; see Retry-After.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        },
        "parameters": [
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {"type": "string"},
            "description": "The main .tex file, when the archive is the body and holds more than one."
          }
        ]
      }
    },
    "/page": {
      "post": {
        "operationId": "page",
        "summary": "A LaTeX project in; one accessible web page with MathML out, as a zip with its figures. 4 cents a page.",
        "externalDocs": {"url": "https://intex.institute/page#docs"},
        "x-status": "open",
        "x-price": {"cents": 4, "per": "page"},
        "requestBody": {"$ref": "#/components/requestBodies/Project"},
        "responses": {
          "200": {
            "description": "index.html and its figures.",
            "headers": {
              "Intex-Pages": {"$ref": "#/components/headers/Pages"},
              "Intex-Cost-Cents": {"$ref": "#/components/headers/Cost"},
              "Intex-Credit-Cents": {"$ref": "#/components/headers/Credit"}
            },
            "content": {"application/zip": {"schema": {"type": "string", "format": "binary"}}}
          },
          "400": {
            "$ref": "#/components/responses/Error",
            "description": "Not a project upload: no form field project, nor a .zip or .tar.gz."
          },
          "401": {"$ref": "#/components/responses/Error"},
          "402": {"$ref": "#/components/responses/Error"},
          "413": {"$ref": "#/components/responses/Error"},
          "422": {"$ref": "#/components/responses/Error"},
          "429": {"$ref": "#/components/responses/Error"},
          "403": {
            "description": "The key's account may not use the API.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "503": {
            "description": "The service is paused, or every build slot is busy; see Retry-After.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        },
        "parameters": [
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {"type": "string"},
            "description": "The main .tex file, when the archive is the body and holds more than one."
          }
        ]
      }
    },
    "/report": {
      "post": {
        "operationId": "report",
        "summary": "A LaTeX project in; a verdict for each WCAG 2.1 criterion and the places a person is needed out. 3 cents a page.",
        "externalDocs": {"url": "https://intex.institute/report#docs"},
        "x-status": "open",
        "x-price": {"cents": 3, "per": "page"},
        "requestBody": {"$ref": "#/components/requestBodies/Project"},
        "responses": {
          "200": {
            "description": "The report.",
            "headers": {
              "Intex-Pages": {"$ref": "#/components/headers/Pages"},
              "Intex-Cost-Cents": {"$ref": "#/components/headers/Cost"},
              "Intex-Credit-Cents": {"$ref": "#/components/headers/Credit"}
            },
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Report"}}}
          },
          "400": {
            "$ref": "#/components/responses/Error",
            "description": "Not a project upload: no form field project, nor a .zip or .tar.gz."
          },
          "401": {"$ref": "#/components/responses/Error"},
          "402": {"$ref": "#/components/responses/Error"},
          "413": {"$ref": "#/components/responses/Error"},
          "422": {"$ref": "#/components/responses/Error"},
          "429": {"$ref": "#/components/responses/Error"},
          "403": {
            "description": "The key's account may not use the API.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "503": {
            "description": "The service is paused, or every build slot is busy; see Retry-After.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        },
        "parameters": [
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {"type": "string"},
            "description": "The main .tex file, when the archive is the body and holds more than one."
          }
        ]
      }
    },
    "/all": {
      "post": {
        "operationId": "all",
        "summary": "A LaTeX project in; the tagged PDF, the web page, the report and an archival copy out, in one zip. 10 cents a page.",
        "externalDocs": {"url": "https://intex.institute/all#docs"},
        "x-status": "open",
        "x-price": {"cents": 10, "per": "page"},
        "requestBody": {"$ref": "#/components/requestBodies/Project"},
        "responses": {
          "200": {
            "description": "NAME.pdf, NAME/index.html with its figures, NAME.report.json, NAME.report.txt and NAME.archive.pdf.",
            "headers": {
              "Intex-Pages": {"$ref": "#/components/headers/Pages"},
              "Intex-Cost-Cents": {"$ref": "#/components/headers/Cost"},
              "Intex-Credit-Cents": {"$ref": "#/components/headers/Credit"}
            },
            "content": {"application/zip": {"schema": {"type": "string", "format": "binary"}}}
          },
          "400": {
            "$ref": "#/components/responses/Error",
            "description": "Not a project upload: no form field project, nor a .zip or .tar.gz."
          },
          "401": {"$ref": "#/components/responses/Error"},
          "402": {"$ref": "#/components/responses/Error"},
          "413": {"$ref": "#/components/responses/Error"},
          "422": {"$ref": "#/components/responses/Error"},
          "429": {"$ref": "#/components/responses/Error"},
          "403": {
            "description": "The key's account may not use the API.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          },
          "503": {
            "description": "The service is paused, or every build slot is busy; see Retry-After.",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
          }
        },
        "parameters": [
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {"type": "string"},
            "description": "The main .tex file, when the archive is the body and holds more than one."
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "key": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your key, made on your portal's API page (https://app.intex.university/api-keys), after signing up free at https://intex.university/signup."
      }
    },
    "requestBodies": {
      "Project": {
        "required": true,
        "content": {
          "multipart/form-data": {
            "schema": {
              "type": "object",
              "required": ["project"],
              "properties": {
                "project": {
                  "type": "string",
                  "format": "binary",
                  "description": "The LaTeX project as one .zip or .tar.gz, up to 64 MB: .tex files, figures, bibliography, and any class or style files of your own."
                },
                "main": {
                  "type": "string",
                  "description": "Optional: the path of the main .tex file inside the archive, when there is more than one."
                }
              }
            }
          },
          "application/zip": {
            "schema": {"type": "string", "format": "binary"},
            "description": "The archive itself as the body; name the main file with ?main= when needed."
          },
          "application/gzip": {
            "schema": {"type": "string", "format": "binary"},
            "description": "A .tar.gz as the body; name the main file with ?main= when needed."
          }
        }
      }
    },
    "headers": {
      "Pages": {"description": "The pages billed.", "schema": {"type": "integer"}},
      "Cost": {"description": "What this request cost, in cents.", "schema": {"type": "integer"}},
      "Credit": {"description": "The credit left on the key's account, in whole cents.", "schema": {"type": "integer"}}
    },
    "responses": {
      "Error": {
        "description": "A sentence a person can act on, and the place in the source when the trouble is there.",
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}
      }
    },
    "schemas": {
      "Formula": {
        "type": "object",
        "properties": {
          "formula": {"type": "string", "description": "The formula as it was read."},
          "reads_as": {
            "type": "string",
            "description": "Its grouping, with every bracket the notation leaves unwritten written out."
          },
          "speech": {"type": "string", "description": "What a screen reader says for it."},
          "copy": {"type": "string", "description": "The text it should copy out as."},
          "mathml": {
            "type": "string",
            "description": "MathML, with the speech as alt text and the LaTeX as an annotation."
          }
        }
      },
      "Count": {
        "type": "object",
        "properties": {
          "pages": {"type": "integer"},
          "formulas": {"type": "integer"},
          "figures": {"type": "integer"},
          "tables": {"type": "integer"},
          "cost_cents": {
            "type": "object",
            "description": "What each service would charge for this project, in cents.",
            "properties": {
              "pdf": {"type": "integer"},
              "page": {"type": "integer"},
              "report": {"type": "integer"},
              "all": {"type": "integer"}
            }
          }
        }
      },
      "Report": {
        "type": "object",
        "properties": {
          "verdict": {
            "type": "string",
            "enum": ["yes", "no", "not established"],
            "description": "The headline for the whole document."
          },
          "criteria": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "criterion": {"type": "string", "description": "The WCAG 2.1 success criterion, such as 1.1.1."},
                "name": {"type": "string"},
                "verdict": {"type": "string", "enum": ["passed", "failed", "not established", "needs a person"]},
                "places": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {"file": {"type": "string"}, "line": {"type": "integer"}, "needs": {"type": "string"}}
                  }
                }
              }
            }
          },
          "text": {"type": "string", "description": "The report in plain sentences, as the PDF carries it."},
          "other": {
            "type": "array",
            "description": "Places a person is needed that no criterion covers (a citation with no entry, a date to decide).",
            "items": {
              "type": "object",
              "properties": {"file": {"type": "string"}, "line": {"type": "integer"}, "needs": {"type": "string"}}
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "ok": {"type": "boolean", "const": false},
          "error": {"type": "string", "description": "A sentence a person can act on."},
          "file": {"type": "string"},
          "line": {"type": "integer"}
        }
      }
    }
  }
}
