API ReferenceDocument Processing
Get Upload URL
Request a pre-signed URL and file ID for secure document upload.
GET
/api/v1/document/{extractionSchemaId}/get-urlRequest 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
extractionSchemaId | string | path | Yes | The extraction schema ID. Found at the bottom of your model's data page. |
filename | string | query | Yes | The 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
| Field | Type | Description |
|---|---|---|
url | string | Pre-signed upload URL. Temporary and expires after a short period. |
fileId | string | Unique file identifier. Use this in subsequent API calls. |
Error Response
Response400
{
"error": "Missing filename query parameter"
}