API
Submit Formall source code and receive interpreted output files.
Upload & Run
Upload a .fl file or paste source code directly to interpret:
Endpoints
POST /api/run
Submit source code for interpretation. Accepts either a file upload or raw source text.
POST /api/runRequest (file upload)
Content-Type: multipart/form-data
| Parameter | Type | Description |
|---|---|---|
file | file | Formall source file (.fl). Max 2 MB. |
Request (source text)
Content-Type: multipart/form-data or application/x-www-form-urlencoded
| Parameter | Type | Description |
|---|---|---|
source | string | Formall source code as plain text. Max 2 MB. |
Response
{
"success": true,
"token": "aBcDeFgHiJkLmNoPqRsTuVxYz012345",
"status_url": "/api/status?token=aBcDeFgHiJkLmNoPqRsTuVxYz012345",
"files": {
"source": "/files/TOKEN/source.fl",
"output": "/files/TOKEN/output.txt",
"result": "/files/TOKEN/result.txt",
"statements": "/files/TOKEN/statements.txt",
"log": "/files/TOKEN/log.txt",
"messages": "/files/TOKEN/messages.txt",
"tree": "/files/TOKEN/tree.txt",
"links": "/files/TOKEN/links.txt",
"labels": "/files/TOKEN/labels.txt"
}
}
status_url to poll for results.GET /api/status
Check whether the interpretation has finished. Once ready is true, download result files via the URLs returned by /api/run.
GET /api/status?token=TOKEN| Parameter | Type | Description |
|---|---|---|
token | string | 32-character alphanumeric session token returned by /api/run. |
Response (processing)
{ "ready": false }
Response (ready)
{ "ready": true, "ok": true, "exit_code": 0 }
ok is true when the code is checked without errors
(exit code 0); exit code 1 means an error in the code, other codes a failure of the interpreter.
GET /files/{token}/{filename}
Download individual result files directly once interpretation is complete.
Available files (the interpreter runs as formall source.fl -o DIR, see
the command line):
source.fl— the sourceoutput.txt— what the interpreter printed: the error, warnings and notices about the source, and the result lineOK <seconds>orERROR <seconds>result.txt— the result line alone, written laststatements.txt— every statement with its positionlog.txt— every command with the statements it gives and all messagesmessages.txt— all errors, warnings, notices and remarks, also about imported fileslabels.txt— labels and their statementslinks.txt— the premises of every statementtree.txt— the block tree (for debugging the interpreter)
Runs made before 2026-10-11 keep their old file names (out.fl,
log.fl, log.messages.fl, …).
Command line
The same interpreter runs locally:
formall FILE.fl [options] -o, --out DIR all reports with standard names in DIR (created if missing); result.txt last --log FILE every command with the statements it gives and all messages --statements FILE every statement with its position --messages FILE all errors, warnings, notices and remarks, also about imported files --links FILE, --labels FILE, --tree FILE, --result FILE --certificate-journal FILE a certificate of every statement (JSON lines), checked by the independent kernel --trust FILE the axioms, definitions, rules and conditions of every theorem T:: --profile FILE where the time went --cache DIR where module objects are kept (default: .formall next to formall.project, else ~/.cache/formall) -j, --jobs N modules compiled in parallel --import-root DIR also allow import() from DIR; --allow-any-import --explicit every value and fact is written (calls) --prefix, --no-fold printing; -q, --quiet only the error on stderr; -h, --help
Imported files are modules: each is checked once and kept as an object in the cache; only what changed is checked again (import).
The last line on stdout is OK <seconds> or
ERROR <seconds>; the exit code is 0 (OK), 1 (an error in the file) or 2 (a wrong
command line, a file that cannot be read or written). The error, and the warnings and notices about the file itself
(not about imported files, not about text generated by decide), go to stderr.
Errors
Error responses use standard HTTP status codes:
| Code | Meaning |
|---|---|
400 | No input provided |
405 | Method not allowed (use POST for /api/run) |
413 | File or source too large |
500 | Internal server error |
Examples
cURL — file upload
curl -X POST -F "file=@example.fl" https://formall.mooo.com/api/run
cURL — source text
curl -X POST -d "source=for x (do)" https://formall.mooo.com/api/run
cURL — check status
curl https://formall.mooo.com/api/status?token=YOUR_TOKEN
JavaScript (fetch)
// Create file input element
const fileInput = document.createElement('input');
fileInput.type = 'file';
document.body.appendChild(fileInput);
// Handle file selection
fileInput.onchange = async () => {
try {
// Prepare form data with selected file
const form = new FormData();
form.append('file', fileInput.files[0]);
// Upload file
const res = await fetch('https://formall.mooo.com/api/run', {
method: 'POST',
body: form
});
const data = await res.json();
// Poll for completion
const poll = async (token) => {
const r = await fetch(`https://formall.mooo.com/api/status?token=${token}`);
const s = await r.json();
if (s.ready) return s;
await new Promise(r => setTimeout(r, 1000));
return poll(token);
};
await poll(data.token);
// Download output file
const output = await fetch(`https://formall.mooo.com${data.files.output}`)
.then(r => r.text());
console.log(output);
} catch (error) {
console.error('Error:', error);
}
};
// Open file picker
fileInput.click();
Python (requests)
import requests, time
# Upload file
r = requests.post('https://formall.mooo.com/api/run',
files={'file': open('example.fl', 'rb')})
data = r.json()
token = data['token']
# Poll for results
while True:
s = requests.get(f'https://formall.mooo.com/api/status?token={token}').json()
if s['ready']:
break
time.sleep(1)
# Download output
output = requests.get(f'https://formall.mooo.com{data["files"]["output"]}').text
print(output)