API ReferenceClassification
Get Classifier Upload URL
Get a pre-signed URL for uploading files to be classified.
GET
/api/v1/classify/{classifierId}/get-urlRequest 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
classifierId | string | path | Yes | The classifier ID. Found in your classifier settings in the platform. |
filename | string | query | Yes | The 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
| Field | Type | Description |
|---|---|---|
url | string | Pre-signed URL for uploading the file. Temporary and expires after a short period. |
fileId | string | Unique file identifier. Use this in the classification request after uploading. |
Next Steps
After receiving the upload URL:
- Upload your file to the pre-signed URL using a PUT request
- Classify the document using sync classification or async classification