Answer to the Core Question
As of the current Kaggle CLI (v1.5.12) and the public Kaggle API, there is no endpoint that returns the per‑competition submission size limit. The metadata and files endpoints expose competition details, but none of them include a size‑limit field. Consequently, the CLI does not perform any client‑side file‑size validation before starting an upload.
There is also no configuration flag, environment variable, or command‑line option that instructs the CLI to check the file size locally. The only place the limit is enforced is on the server side, where a full HTTP 400 is returned after the file has already been transmitted.
Why the Gap Exists
- Submission limits are competition‑specific and can change at any time.
- Because the limits are not part of the public API schema, the CLI cannot reliably expose them without risking stale information.
- Implementing a local check would require maintaining an up‑to‑date mapping of competition IDs to limits, which would add maintenance overhead for the Kaggle team.
Practical Work‑Arounds
Consult the competition’s Rules page on Kaggle to read the current size limit (often expressed in megabytes or gigabytes).
Use a simple shell or Python script to verify the file size before invoking kaggle competitions submit. Example for a Unix‑like shell:
FILE=your_submission.csv
MAX_BYTES=104857600 # 100 MB
if [ $(stat -c%s "$FILE") -gt $MAX_BYTES ]; then
echo "Error: $FILE exceeds the 100 MB limit."
exit 1
fi
kaggle competitions submit -c $COMPETITION -f $FILE -m "Auto‑size check passed"
In CI pipelines, add a pre‑upload step that reads the file size and aborts if it exceeds a threshold you know to be safe.
Optionally, write a small wrapper around the CLI that performs the size check, then calls the standard command.
Future Plans?
No official roadmap entry currently indicates an upcoming CLI flag or API change that would expose size limits or add local validation. The Kaggle API repository’s issue tracker shows no open feature requests for this specific functionality, and the latest CHANGELOG (as of 2026‑10‑19) contains no mention of such a feature.
What to Do Next
- Verify the competition’s size limit directly on Kaggle’s website.
- Implement the pre‑upload check in your local or CI environment.
- Keep an eye on the Kaggle API and CLI release notes for any future changes that might expose size limits.
Missing Diagnostic Detail
To tailor the recommended size threshold for your workflow, could you tell me which competition you’re submitting to? Knowing the exact competition name or ID would allow us to look up the documented limit from its Rules page.