The Brain Age prediction endpoint rejects uploads with a 413 (Content Too Large) error. This occurs with a standard 7T MP2RAGE T1-weighted scan compressed as .nii.gz.
Error:
POST https://brainage-885179799162.us-central1.run.app/predict net::ERR_FAILED 413 (Content Too Large)
processFile @ brainage_simple.html:366
Steps to reproduce:
- Go to https://www.brainiac-platform.com
- Select Brain Age
- Upload a .nii.gz file (~47 MB)
- Request fails immediately with 413
File details:
- Format: .nii.gz (gzipped NIfTI)
- Size: ~47 MB
- Source: 7T MP2RAGE UNI-DEN, 0.5mm isotropic (336x448x224)
- The uncompressed .nii is ~65 MB
Note: the smaller 0.7mm acquisition (~28 MB .nii.gz) was not tested but may also exceed the limit depending on the threshold.
Potential fix:
The Google Cloud Run service's request body size limit needs to be increased from the default 32mb.
This can be set via:
gcloud run services update --max-request-body-size
Environment:
- Browser: Chrome (Linux)
- Date: 2026-02-17
The Brain Age prediction endpoint rejects uploads with a 413 (Content Too Large) error. This occurs with a standard 7T MP2RAGE T1-weighted scan compressed as .nii.gz.
Error:
Steps to reproduce:
File details:
Note: the smaller 0.7mm acquisition (~28 MB .nii.gz) was not tested but may also exceed the limit depending on the threshold.
Potential fix:
The Google Cloud Run service's request body size limit needs to be increased from the default 32mb.
This can be set via:
gcloud run services update --max-request-body-sizeEnvironment: