Skip to content

Get a presigned upload URL

POST
/api/v1/models/{modelId}/uploads
curl --request POST \
--url https://api.langparse.dev/api/v1/models/example/uploads \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <X-Api-Key>' \
--data '{ "fileName": "invoice.pdf", "contentType": "application/pdf" }'

Returns a one-time S3 URL. PUT the raw file bytes to it, then call POST /models/{modelId}/parse with the returned { sourceKey }. No size limit.

modelId
required
string
Media typeapplication/json
object
fileName
string
Example
invoice.pdf
contentType
string
Example
application/pdf

Presigned upload ticket

Media typeapplication/json
object
id
string
sourceKey
string
uploadUrl

PUT the raw file bytes here.

string
method
string
Allowed values: PUT
expiresInSeconds
integer
Example
{
"method": "PUT"
}

Missing or invalid API key

Model not found