---
title: "File refused"
description: "The uploaded file is too large, the wrong type or not what its name says. The message names the reason and the stored file is removed."
---

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

# File refused

## What it means

The API answered with HTTP 422 and the error code `invalid_file`.

The uploaded file is too large, the wrong type or not what its name says. The message names the reason and the stored file is removed.

## How to handle it

Every error is an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document (`application/problem+json`). Match on `code`, never on the message text. See [errors](/docs/api/errors) for the full list.

Source: https://tarkle.com/docs/api/errors/invalid_file/index.mdx
