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
ProductAPI ReferenceChangelogModel Versioning
ProductAPI ReferenceChangelogModel Versioning
    • Authentication
    • API Versioning
  • Workflow Endpoints
    • Run Workflow
    • Workflow Run
    • List Workflow Runs
    • Update Workflow Run
    • Create Workflow
    • Batch Run Workflow
    • Correct Workflow Run (Deprecated)
  • Processor Endpoints
    • Run Processor
    • Get Processor Run
    • Batch Processor Run
    • Create Processor
    • Update Processor
    • Publish Processor Version
    • Processor Version
    • List Processor Versions
  • Parse Endpoints
    • Parse File
  • File Endpoints
    • Upload File
    • Get File
    • List Files
    • Create File (Deprecated)
  • Evaluation Set Endpoints
    • Create Evaluation Set
    • Create Evaluation Set Item
    • Update Evaluation Set Item
    • Bulk Create Evaluation Set Item
  • Objects
    • Block
    • Evaluation Set
    • Evaluation Set Item
    • File
    • Processor
    • Processor Run
    • Batch Processor Run
    • Processor Version
    • Workflow
    • Workflow Run
    • Workflow Run Summary
  • Guides
    • Processor Configs
    • Output Types
    • Bounding Boxes
    • Supported File Types
    • Rate Limits
    • User Roles and Permissions
  • Webhooks
    • Configuration
    • Events
LogoLogo
Book a demoLog in
File Endpoints

Upload File

Upload and create a new file in Extend.
$curl --request POST \
> --url https://api-prod.extend.app/files/upload \
> --header 'Authorization: Bearer <token>' \
> --form 'file=@/path/to/document.pdf'
$
Example File
1{
2 "object": "file",
3 "id": "file_1234",
4 "name": "example_file",
5 "type": "PDF",
6 "presignedUrl": "https://s3.example.com/file_1234.pdf",
7 "parentFileId": "file_5678", // Optional, only set if this file is a derivative of another file
8 "createdAt": "2024-01-01T00:00:00Z",
9 "updatedAt": "2024-01-01T00:00:00Z"
10}
Was this page helpful?
Previous

Get File

Fetch a file by its ID to obtain additional details and the raw file content.
Next
Built with

This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation sets, 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).

Headers

Content-Type
string

A multi-part/form-data header containing the boundary, such as multi-part/form-data; boundary="...".

Body

A multipart/form-data body containing a single file field and its binary data. For more information, see the MDN documenation.

The Content-Type field header is currently ignored and Extend will infer the type automatically based on the field’s Content-Disposition and the file’s contents.

Response

success
boolean

A true or false value for whether the file was processed successfully or not.

file
File

A File object representing the newly created file. See the File object for more details. Note: Since the file is not parsed, it will not contain contents nor metadata.