GuidesAPI ReferenceProcessor Changelog
GuidesAPI ReferenceProcessor Changelog
    • Getting Started
    • API Versioning
    • SDKs
  • Processor Endpoints
    • POSTRun Processor
    • GETList Processor Runs
    • GETGet Processor Run
    • POSTCancel Processor Run
    • DELDelete Processor Run
    • GETGet Batch Processor Run
    • POSTCreate Processor
    • POSTUpdate Processor
    • POSTPublish Processor Version
    • GETGet Processor Version
    • GETList Processor Versions
  • 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
  • Parse Endpoints
    • POSTParse File
    • POSTParse File Async
    • GETGet Parser Run
    • DELDelete Parser Run
  • File Endpoints
    • POSTUpload File
    • GETGet File
    • DELDelete File
    • GETList Files
    • POSTCreate File
  • Evaluation Set Endpoints
    • GETGet Evaluation Set
    • GETList Evaluation Sets
    • POSTCreate Evaluation Set
    • GETList Evaluation Set Items
    • POSTCreate Evaluation Set Item
    • POSTUpdate Evaluation Set Item
    • POSTBulk Create Evaluation Set Items
LogoLogo
File Endpoints

Create File

Deprecated
POST
https://api.extend.ai/files
POST
/files
1curl -X POST https://api.extend.ai/files \
2 -H "x-extend-api-version: " \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "name": "string"
7}'
Try it
200Successful
1{
2 "success": true,
3 "file": {
4 "object": "file",
5 "id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
6 "name": "Invoices.pdf",
7 "metadata": {
8 "pageCount": 30,
9 "parentSplit": {
10 "id": "string",
11 "type": "Invoice",
12 "identifier": "other_2_9",
13 "startPage": 1,
14 "endPage": 10
15 }
16 },
17 "createdAt": "2024-03-21T15:30:00Z",
18 "updatedAt": "2024-03-21T16:45:00Z",
19 "type": "PDF",
20 "presignedUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
21 "parentFileId": "file_Zk9mNP12Qw4yTv8BdR3H",
22 "contents": {
23 "rawText": "string",
24 "markdown": "string",
25 "pages": [
26 {
27 "pageNumber": 1,
28 "pageHeight": 10,
29 "pageWidth": 10,
30 "rawText": "This is the raw text of the page.",
31 "markdown": "# Heading\n\nThis is a paragraph with **bold** and *italic* text.\n\n- List item 1\n- List item 2\n\n> This is a blockquote",
32 "html": "<div>This is the html of the page.</div>"
33 }
34 ],
35 "sheets": [
36 {
37 "sheetName": "Sheet1",
38 "rawText": "This is the raw text of the sheet."
39 }
40 ]
41 },
42 "usage": {
43 "credits": 10
44 }
45 }
46}
Create a new file in Extend for use in an evaluation set. This endpoint is deprecated, use /files/upload instead.
Was this page helpful?
Previous

Get Evaluation Set

Next
Built with
Get Evaluation Set

Create a new file in Extend for use in an evaluation set. This endpoint is deprecated, use /files/upload instead.

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](/developers/api-versioning) for more details.

Request

This endpoint expects an object.
namestringRequired
The name of the file
urlstringOptional
A pre signed URL for the file
rawTextstringOptional
The raw text content of the file
mediaTypestringOptional
The media type of the file (e.g. application/pdf)

Response

Successfully created file
successboolean or null
fileobject or null

Errors

The name of the file
A pre signed URL for the file
The raw text content of the file
Successfully created file

The media type of the file (e.g. application/pdf)

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

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.