Skip to content

Get upload URLs

POST /document-intelligence/v1/collections/{collection_id}/documents/upload-urls

Step 1 of a three-step upload for large files. Ask for one upload slot per file; you get back an upload_url and a file_url for each.

  1. Call this with your file names and content types.
  2. PUT each file's bytes straight to its upload_url - the bytes go to storage, not through this API, so there is no size ceiling from us.
  3. Call POST /documents with file_url set to the value returned here, to start processing.

Prefer this over POST /documents/files when files are large or many - it keeps the bytes off this API entirely. The slots are short-lived, so upload promptly.

Parameters

Name In Required Notes
collection_id path yes -

Request body

Field Type Required Notes
files array of UploadUrlFile yes The files you intend to upload. One slot comes back per file.

Example

curl -X POST "https://api.futuresmart.ai/document-intelligence/v1/collections/{collection_id}/documents/upload-urls" \
  -H "Authorization: Bearer $FS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {
        "file_name": "<file_name>",
        "content_type": "<content_type>"
      }
    ]
  }'

Responses

200

Field Type Required Notes
uploads array of UploadTarget yes -

Every failure, a malformed request included, comes back in the shared envelope with a stable code to branch on. See Errors.