Read the file upload size ceilings
The three size ceilings file upload applies, so your client can refuse an oversized file before sending it. Set by deployment configuration.
GET
/
knowledge
/
uploads
/
limits
curl "$MITHUNAI_URL/mithunai/api/v1/knowledge/uploads/limits" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
response = requests.get(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/knowledge/uploads/limits",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
limits = response.json()
print(f"{limits['max_files']} files, {limits['max_file_bytes']} bytes each")
# Check before sending, so the refusal arrives from you, not from a failed upload.
too_big = [p for p in paths if os.path.getsize(p) > limits["max_file_bytes"]]
// From your backend. Never send an API key to a browser.
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/knowledge/uploads/limits`,
{
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
const limits = await response.json()
console.log(limits.max_file_bytes)
{
"max_file_bytes": 1048576,
"max_files": 200,
"max_request_bytes": 67108864
}
{ "code": "authentication_error", "message": "Authentication is required." }
The three ceilings Upload files applies. Read them once at start-up and check a file against them in your own interface, so a user who picks a file that is too large is told immediately instead of after the upload has finished.
These are deployment configuration, not per-organisation settings: every caller in a deployment reads the same three figures, and they are the same figures the refusal uses, so a client that checks against them and a server that enforces them cannot disagree.
Any authenticated caller in the organisation may read them.
Response
integer
required
The largest single file accepted. A file over it is refused by ingestion.
integer
required
The most files accepted in one upload.
integer
required
The largest whole upload body, across every part. A request over it is refused with
413.curl "$MITHUNAI_URL/mithunai/api/v1/knowledge/uploads/limits" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
response = requests.get(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/knowledge/uploads/limits",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
limits = response.json()
print(f"{limits['max_files']} files, {limits['max_file_bytes']} bytes each")
# Check before sending, so the refusal arrives from you, not from a failed upload.
too_big = [p for p in paths if os.path.getsize(p) > limits["max_file_bytes"]]
// From your backend. Never send an API key to a browser.
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/knowledge/uploads/limits`,
{
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
const limits = await response.json()
console.log(limits.max_file_bytes)
{
"max_file_bytes": 1048576,
"max_files": 200,
"max_request_bytes": 67108864
}
{ "code": "authentication_error", "message": "Authentication is required." }
Last modified on November 7, 2026
curl "$MITHUNAI_URL/mithunai/api/v1/knowledge/uploads/limits" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os
import requests
response = requests.get(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/knowledge/uploads/limits",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
limits = response.json()
print(f"{limits['max_files']} files, {limits['max_file_bytes']} bytes each")
# Check before sending, so the refusal arrives from you, not from a failed upload.
too_big = [p for p in paths if os.path.getsize(p) > limits["max_file_bytes"]]
// From your backend. Never send an API key to a browser.
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/knowledge/uploads/limits`,
{
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
const limits = await response.json()
console.log(limits.max_file_bytes)
{
"max_file_bytes": 1048576,
"max_files": 200,
"max_request_bytes": 67108864
}
{ "code": "authentication_error", "message": "Authentication is required." }