Developer API for Step-by-Step Math
There is no public API yet. Here are the three real /api/ routes, their access rules, examples, and limits.
The short version
- There is no public API today. You cannot get a key, and there is no waiting list to join.
- Three /api/ routes exist, but they serve this site's own pages, not outside developers.
- Two of them require a signed-in browser session and a CSRF token, so a script cannot call them.
- GET /api/health is the one route you can open in a browser right now.
The honest status
Plenty of sites publish an API page that describes something that does not exist yet. This one will not. Here is the real position: MathGPT.now has no public developer API. There is no key to request, no token to generate, no rate-limit tier to buy, and no sandbox. The routes under /api/ are real and they are documented below, but they exist to serve this website's own pages. They are blocked in robots.txt, they are locked to a browser session, and calling them from your own code will fail. If you want to build on top of the math, the honest first step is to email [email protected] and tell us what you would call, because right now that shapes the roadmap more than anything else.
Why the endpoints are locked down
Three reasons, and none of them are about being precious with the content.
- Every tutor answer is a paid request to an AI provider, so an open endpoint is an open bill.
- The endpoints check a token that is only issued to a page loaded from this site, which stops another website calling them as you.
- Without a stable, versioned response shape, anything you built would break the next time we improved the answer format.
What actually exists today
These three routes are the whole surface. The status column is the important one: "internal" means the route works only from a page on this site, with a valid session token. It is not a soft limit or a courtesy request; a call without the right token gets a 400 back and nothing else.
| Method | Path | What it does | Status |
|---|---|---|---|
| POST | /api/solve | Takes a typed problem, an image, or both, and returns a worked solution in Markdown plus token usage for that request. | Internal. Needs a signed-in Google session and an X-CSRF-Token header. |
| POST | /api/assessment-questions | Generates a practice or test set for one course: each question has four choices, one correct index, a hint, and a worked solution. | Internal. Needs an X-CSRF-Token header from a page on this site. |
| GET | /api/health | Reports whether the app is running and whether the solver is configured. | Open. No key and no session needed, though robots.txt asks crawlers to skip it. |
What a request and a response look like
Since you cannot call the internal routes yourself, here is exactly what the site sends and gets back, so you can judge whether the shape would be useful to you. The health check is the one you can try right now in a browser or with curl. The solve request is sent as a normal form post, which is what lets an image ride along with the text.
The one you can run
This works today, from anywhere, with no credentials.
curl https://mathgpt.now/api/health- It returns
ok, which is true whenever the app is up. - It also returns
solver_configured, which tells you whether the tutor has a working key behind it. When it is false, the solver returns a placeholder answer instead of a real one.
GET /api/health
200 OK
{
"ok": true,
"solver_configured": true
}POST /api/solve
Content-Type: multipart/form-data
X-CSRF-Token: <token from the page's csrf-token meta tag>
problem = Solve 3x + 2 = 14
image = <optional PNG, JPG, WEBP, or GIF, under 8 MB>
200 OK
{
"answer": "## Understanding the problem\n...\n## Final answer\nx = 4\n## Check\n3(4) + 2 = 14\n...",
"usage": {
"input_tokens": 431,
"cached_input_tokens": 0,
"output_tokens": 372,
"total_tokens": 803,
"estimated_cost_usd": 0.004797
}
}POST /api/solve (not signed in)
401 Unauthorized
{
"error": "Sign in with Google to use the AI tutor.",
"login_url": "/auth/google?next=/solver"
}Limits and errors
These are the limits the code enforces today. They apply to the site's own pages, and they are the numbers any future public interface would start from. The rate limits are counted per browser session over a rolling five-minute window, and a request that trips one comes back with a Retry-After header telling you how many seconds to wait.
Input limits
Anything outside these gets a 400 with a plain-English message rather than a stack trace.
- A typed problem must be under 12,000 characters.
- An image must be under 8 MB and under 25 megapixels.
- An image must be a PNG, JPG, WEBP, or GIF, and must actually be a valid image file.
- A generated question set must be between 1 and 15 questions.
Rate limits and status codes
The full set of responses you can get, so nothing is a surprise.
/api/solve: 30 requests per session in any five minutes./api/assessment-questions: 12 requests per session in any five minutes.400for a missing or wrong CSRF token, an empty problem, a bad image, or invalid settings.401when the solver is called without being signed in.404when a course or unit does not exist.429when a rate limit is hit, with a Retry-After header.502or503when the AI provider fails or cannot be reached.
What we would build first
If and when a public interface happens, these are the things it would need before it deserved to be called stable, and they are also the questions we would ask you about your use case. Until then, the most useful thing you can do is describe what you would build. Send it to [email protected] with the volume you expect, the subjects you need, and how a learner in your product would see and question a wrong answer. Schools and learning platforms should also read the partnerships page, which sets out which kinds of collaboration are open right now and which are not. In the meantime, every public page and tool is free to link to, and the sitemap lists all of them.
The design rules any future version would follow
These come from what already goes wrong when AI output is dropped into a learning product.
- Keep the learner's original problem visible next to the answer, unchanged.
- Label which parts are generated and which parts are exact calculation.
- Return the assumptions and the check step, not just the final line.
- Give the learner a way to disagree with a step and see it another way.
- Version the response shape, so an improvement never silently breaks your product.
- Plan for the error cases before the happy path, because they will be a real share of traffic.
What to send us instead of a key request
There is no key, so the useful email is not "can I have access". It is a description of what you would build: the calls you would make, roughly how often, which subjects you need, and how a learner in your product would see, question, and correct a wrong answer. That last part is the one that decides whether an integration is a good idea at all. Send it to [email protected], and read the partnerships page for the collaboration tracks that are open today.
Questions people ask about this page
How do I get an API key?
You cannot, because there are no API keys. There is no public developer programme, no waiting list, and no private beta running quietly in the background. If that changes, this page changes with it, since it is written from the routes that actually exist in the code.
Can I call /api/solve from my own app?
No. It requires a signed-in Google session and a CSRF token that is only issued to a page served by this site, so a request from your own code gets a 400 or a 401 rather than an answer. Trying to work around that is also against the terms of use.
Is scraping the site an acceptable alternative?
No, and the terms of use prohibit it. Automated traffic costs real money on the AI endpoints and slows the site down for students. If you need something at scale, email [email protected] and describe it. A short honest description of a real use case gets further than a scraper does.
What can I use today, then?
Everything on the site is free and free to link to, with no account needed for the tools. Point people at the calculators, the guides, or the formula library, and use the sitemap to find the exact page you want.
Contact MathGPT.now
For questions related to this page, email [email protected]. Include the page address and enough non-sensitive detail to reproduce the question or problem.