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 extraction schema ID. Found at the bottom of your model's data page.
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"
}