Skip to Content
Presentations.AI
Api

Files

Upload source files for deck generation.

Upload File

POST
/files

Upload a file and enqueue extraction.

Up to 150 MB. Accepted: PDF, PPTX, DOCX, XLS/XLSX, TXT, CSV, TSV, Markdown, HTML, JSON, EPUB, PNG, JPEG and WebP, and code files (.py, .js, .jsx, .ts, .tsx, .java, .go, .cs, .sql, .yaml, .yml, .sh). Its extracted text counts toward the plan's content limit when used as a deck source.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Request Body

multipart/form-data
  1. body
file*File

Response Body

Successful Response

application/json
  1. response

External upload response keyed only by file ID.

file_id*File Id

Pass in a file source to outline or deck creation.

Formatuuid
filename*Filename

Original filename, for display.

status*AsyncTaskStatus

Text-extraction state; the file is usable once COMPLETED.

Value in"CREATED""RUNNING""COMPLETED""FAILED"
created_at*Created At

Upload time.

Formatdate-time
Example Request
curl -X POST 'https://api.presentations.ai/api/v1/files' \  -F 'file=string'
Example Response
{  "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",  "filename": "string",  "status": "CREATED",  "created_at": "2019-08-24T14:15:22Z"}

Get File

GET
/files/{file_id}

Get file metadata and extraction status.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

file_id*File Id

ID of the uploaded file, from POST /files.

Formatuuid

Response Body

Successful Response

application/json
  1. response

External file metadata and extraction status keyed only by file ID.

file_id*File Id

File id.

Formatuuid
filename*Filename

Original filename, for display.

status*|

Text-extraction state; the file is usable once COMPLETED. Null when no extraction task exists.

error*|

Extraction failure message; null unless FAILED.

size_bytes*Size Bytes

Uploaded file size in bytes.

content_type*Content Type

MIME type of the uploaded file.

char_count*|

Characters of extracted text; null before extraction.

content_sha256*|

Hex SHA-256 of the extracted text; null before extraction.

extracted_at*|

When extraction finished; null before then.

created_at*Created At

Upload time.

Formatdate-time
Example Request
curl -X GET 'https://api.presentations.ai/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",  "filename": "string",  "status": "CREATED",  "error": "string",  "size_bytes": 0,  "content_type": "string",  "char_count": 0,  "content_sha256": "string",  "extracted_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}

Delete File

DELETE
/files/{file_id}

Delete an uploaded file and any extraction state, including a hung extraction.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

file_id*File Id

ID of the uploaded file, from POST /files.

Formatuuid

Response Body

Successful Response

Example Request
curl -X DELETE 'https://api.presentations.ai/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty