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

# [DEPRECATED] Create File

> Create a new file in Extend for use in an evaluation set.

**Deprecation Notice**: This endpoint is deprecated and will be removed in a future release. Use the [`/upload` endpoint](/api-reference/endpoint/upload_file) instead.

Creating a new File is a prerequisite for using that file with the evaluation sets API.

This endpoint will pre-process the contents of the file, and store it in the Extend platform for use in evaluation sets. For files that require pre-processing (e.g. pdfs, images, etc.) this endpoint can take up to 30 seconds to complete.

Supported file types can be found [here](/api-reference/supported_file_types).

### Body

<ParamField body="name" type="string">
  The name of the file.
</ParamField>

<ParamField body="url" type="string">
  A pre signed URL for the file.
</ParamField>

<ParamField body="rawText" type="string">
  The raw text content of the file.
</ParamField>

<ParamField body="mediaType" type="string" optional>
  The media type of the file. (e.g. `application/pdf`). Will be inferred if not provided.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  A true or false value for whether the file was processed successfully or not.
</ResponseField>

<ResponseField name="file" type="File">
  A File object representing the newly created file. See the [File
  object](/api-reference/objects/file) for more details.
</ResponseField>

<ResponseExample>
  ```json Example Response theme={null}
  {
    "success": true,
    "file": {
      "object": "file",
      "id": "file_1234",
      "name": "example_file",
      "type": "PDF",
      "contents": {
        "rawText": "This is the raw text content of the file..."
      },
      "metadata": {"pageCount": 10},
      "presignedUrl": "https://s3.example.com/file_1234.pdf",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-01T00:00:00Z"
    }
  }
  ```
</ResponseExample>
