> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mithunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read the file upload size ceilings

> The three ceilings file upload applies, so your client can refuse an oversized file before sending it. Deployment configuration: the figures the refusal uses.

The three ceilings [Upload files](/api-reference/knowledge/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

<ResponseField name="max_file_bytes" type="integer" required>
  The largest single file accepted. A file over it is refused by ingestion.
</ResponseField>

<ResponseField name="max_files" type="integer" required>
  The most files accepted in one upload.
</ResponseField>

<ResponseField name="max_request_bytes" type="integer" required>
  The largest whole upload body, across every part. A request over it is refused with `413`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl "$MITHUNAI_URL/arukz/api/v1/knowledge/uploads/limits" \
    --header "Authorization: Bearer $MITHUNAI_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os

  import requests

  response = requests.get(
      f"{os.environ['MITHUNAI_URL']}/arukz/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"]]
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // From your backend. Never send an API key to a browser.
  const response = await fetch(`${process.env.MITHUNAI_URL}/arukz/api/v1/knowledge/uploads/limits`, {
    headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
  })
  const limits = await response.json()
  console.log(limits.max_file_bytes)
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "max_file_bytes": 1048576,
    "max_files": 1000,
    "max_request_bytes": 67108864
  }
  ```

  ```json 401 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authentication_error", "message": "Authentication is required." }
  ```
</ResponseExample>
