What it is for
- Alt text for an equation in a slide, a course page or an email, worded the way a screen reader would say it.
- Hearing what a student with a screen reader will hear, before the lecture rather than after it.
- An agent that writes mathematics for people, and needs each formula to read correctly aloud.
Price
Free without a key: thirty formulas every ten minutes from one network. With a key, a dollar for a thousand formulas, up to six hundred every ten minutes: send it as Authorization: Bearer YOUR_KEY, and the Intex-Credit-Cents header says what is left. The key is the same one the other services take.
Documentation
GET https://app.intex.university/api/formula?tex=FORMULA
Or POST to the same address, with the formula as tex in a JSON body or a form. Any website may call it from the browser: it answers every origin.
The request
| Field | What goes in it |
|---|---|
tex | One formula as LaTeX, as you would write it between dollar signs, without them. One line, at most 1,000 characters. |
The response
JSON, with five fields:
| Field | What it holds |
|---|---|
formula | The formula as it was read. |
reads_as | Its grouping, with every bracket the notation leaves unwritten written out, so you can see what binds to what. |
speech | What a screen reader says for it. |
copy | The text it should copy out as when someone selects it. |
mathml | MathML, with the speech as its alt text and the LaTeX as an annotation. |
An example
curl -G https://app.intex.university/api/formula \
--data-urlencode 'tex=\frac{1}{2}mv^2'
{
"formula": "\\frac{1}{2}mv^2",
"reads_as": "(1/2)·m·(v^2)",
"speech": "one half m v squared",
"copy": "1/2 m v²",
"mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"inline\" alttext=\"one half m v squared\">…</math>"
}
The MathML is shortened here; the rest is the answer exactly as it came back.
Errors
| Status | When, and what comes back |
|---|---|
| 422 | The formula could not be read. error is a sentence that names the column, for example Column 9: this '{' is never closed. |
| 429 | Too many formulas in a few minutes. Wait the seconds in Retry-After, then try again. |
Related
- Try it in a browser, with the speech read aloud: the formula reader at Intex Academy.
- How a formula is read aloud, and why the words change when its structure does: Hear an equation, and why a reading needs its closing words.
- What the copy text follows, and why: what a copied formula should paste as.
- For whole documents, every formula read the same way: Tagged PDF and Web page.