Limai Docs
API ReferenceClassification

Get Classifier Upload URL

Get a pre-signed URL for uploading files to be classified.

GET/api/v1/classify/{classifierId}/get-url

Request a pre-signed URL for uploading files that need to be classified. Returns both the upload URL and a file ID that you will use in the classification request.

Parameters

NameTypeInRequiredDescription
classifierIdstringpathYesThe classifier ID. Found in your classifier settings in the platform.
filenamestringqueryYesThe original filename of the document to classify.

Request

const response = await fetch(
`https://app.limai.io/api/v1/classify/${CLASSIFIER_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": "abc123def456"
}

Response Fields

FieldTypeDescription
urlstringPre-signed URL for uploading the file. Temporary and expires after a short period.
fileIdstringUnique file identifier. Use this in the classification request after uploading.

Next Steps

After receiving the upload URL:

  1. Upload your file to the pre-signed URL using a PUT request
  2. Classify the document using sync classification or async classification