For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
GuidesAPI ReferenceChangelogModel Versioning
GuidesAPI ReferenceChangelogModel Versioning
    • Getting Started
    • Authentication
    • API Versioning
    • SDKs
    • Deployments
  • Processor Endpoints
    • POSTRun Processor
    • GETGet Processor Run
    • GETList Processor Runs
    • POSTCancel Processor Run
    • DELDelete Processor Run
    • GETGet Batch Processor Run
    • GETList Processors
    • POSTCreate Processor
    • POSTUpdate Processor
    • POSTPublish Processor Version
    • GETGet Processor Version
    • GETList Processor Versions
  • Parse Endpoints
    • POSTParse File
    • POSTParse File Async
    • GETGet Parser Run
    • DELDelete Parser Run
  • Workflow Endpoints
    • POSTRun Workflow
    • GETGet Workflow Run
    • GETList Workflow Runs
    • POSTUpdate Workflow Run
    • POSTCancel Workflow Run
    • DELDelete Workflow Run
    • POSTCreate Workflow
    • POSTBatch Run Workflow
    • POSTCorrect Workflow Run Outputs
  • File Endpoints
    • POSTUpload File
    • GETGet File
    • DELDelete File
    • GETList Files
    • POSTCreate File
  • Edit Endpoints
    • POSTEdit File
    • POSTEdit File Async
    • POSTGenerate Edit Schema
    • GETGet Edit Run
    • DELDelete Edit Run
    • GETGet Edit Template
  • Evaluation Set Endpoints
    • GETGet Evaluation Set
    • GETList Evaluation Sets
    • POSTCreate Evaluation Set
    • GETList Evaluation Set Items
    • POSTCreate Evaluation Set Item
    • POSTUpdate Evaluation Set Item
    • DELDelete Evaluation Set Item
    • POSTBulk Create Evaluation Set Items
LogoLogo
Book a demoLog in
File Endpoints

Upload File

POST
https://api.extend.ai/files/upload
POST
/files/upload
1from extend_ai import Extend
2
3client = Extend(
4 token="YOUR_TOKEN_HERE",
5 extend_api_version="2025-04-21",
6)
7
8client.files.upload(
9 file="example_file",
10)
1{
2 "success": true,
3 "file": {
4 "object": "file",
5 "id": "file_dmuFrLrcdW0Jv6f78f20a",
6 "name": "My File",
7 "metadata": {},
8 "createdAt": "2025-05-12T20:57:39.105000+00:00",
9 "updatedAt": "2025-05-12T20:57:39.111000+00:00",
10 "type": "PDF",
11 "contents": {}
12 }
13}
Upload and create a new file in Extend. This endpoint accepts file contents and registers them as a File in Extend, which can be used for [running workflows](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/run-workflow), [creating evaluation set items](https://docs.extend.ai/2025-04-21/developers/api-reference/evaluation-set-endpoints/bulk-create-evaluation-set-items), [parsing](https://docs.extend.ai/2025-04-21/developers/api-reference/parse-endpoints/parse-file), etc. If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF. Supported file types can be found [here](https://docs.extend.ai/2025-04-21/product/general/supported-file-types). This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).
Was this page helpful?
Previous

Get File

Next
Built with

Upload and create a new file in Extend.

This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation set items, parsing, etc.

If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.

Supported file types can be found here.

This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-extend-api-version"2025-04-21"OptionalDefaults to 2025-04-21

API version to use for the request. If you do not specify a version, you will either receive a 400 Bad Request or be set to a previous legacy version. See API Versioning for more details.

x-extend-workspace-idstringOptional

The workspace ID to target. Required when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See Authentication for details on API key scopes.

Query parameters

convertToPdfbooleanOptionalDefaults to false

When true, converts the uploaded file to PDF. Supported file types include images (JPEG, PNG, TIFF, GIF, BMP, WebP, HEIC/HEIF), Word documents, PowerPoint, Excel, and HTML.

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The file contents to upload

Response

Successfully uploaded file
successboolean
fileobject

Errors

400
Bad Request Error
401
Unauthorized Error