Files

Upload a reusable file

POST
/files

Upload bytes directly to OpenParser's Eigenpal-compatible tenant file pool. Files may be reused by later parse or extract requests through file_id; bytes do not pass through Vercel.

Authorization

bearerAuth
AuthorizationBearer <token>

Existing Eigenpal API key presented as a bearer token.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/files" \  -H "Authorization: Bearer $OPENPARSER_API_KEY" \  -F file="string"
{  "id": "string",  "filename": "string",  "contentType": "string",  "size": 0,  "purpose": null,  "createdAt": "2019-08-24T14:15:22Z"}
{  "error": {    "code": "malformed_request",    "message": "multipart field `request` is not valid JSON",    "request_id": "req_01h2example",    "retryable": false  }}
{  "error": {    "code": "unauthorized",    "message": "invalid API key",    "request_id": "req_01h2example",    "retryable": false  }}
{  "error": {    "code": "forbidden",    "message": "API key lacks required scope",    "request_id": "req_01h2example",    "retryable": false  }}
{  "error": {    "code": "limit_exceeded",    "message": "source exceeds 50 MiB admission limit",    "request_id": "req_01h2example",    "retryable": false,    "details": {      "limit": "max_input_bytes",      "max_value": 52428800    }  }}
{  "error": {    "code": "unsupported_media_type",    "message": "only PDF, PNG, and JPEG uploads are accepted",    "request_id": "req_01h2example",    "retryable": false  }}

{  "error": {    "code": "rate_limited",    "message": "request rate limit exceeded",    "request_id": "req_01h2example",    "retryable": true  }}