Limai Docs
API ReferenceDocument Processing

Get Upload URL

Request a pre-signed URL and file ID for secure document upload.

GET/api/v1/document/{extractionSchemaId}/get-url

Request a pre-signed URL for uploading a file to cloud storage. Returns both the upload URL and a fileId that you will use in subsequent processing requests.

Parameters

NameTypeInRequiredDescription
extractionSchemaIdstringpathYesThe model or deployment's extraction schema ID, returned when listing a project's deployments. It is also shown at the bottom of the data page in the dashboard.
filenamestringqueryYesThe original filename of the document. Used for file type detection and storage.

Request

const response = await fetch(
`https://app.limai.io/api/v1/document/${SCHEMA_ID}/get-url?filename=${filename}`,
{
  headers: { "Authorization": `Bearer ${API_TOKEN}` }
}
)
const { url, fileId } = await response.json()

Response

Response200
{
  "url": "https://s3.amazonaws.com/bucket/path?AWSAccessKeyId=...",
  "fileId": "file_abc123def456"
}

Response Fields

FieldTypeDescription
urlstringPre-signed upload URL. Temporary and expires after a short period.
fileIdstringUnique file identifier. Use this in subsequent API calls.

Error Response

Response400
{
  "error": "Missing filename query parameter"
}

On this page