cURL
Edit Document
POST
cURL
Submit an uploaded file, an internet-reachable URL, or any kind of raw text for document editing. If you have configured a webhook,
we will notify you when the job is complete, be it a success or a failure.
The API will edit the document based on the provided prompt and options.
Once submitted, the API will return a job ID.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- file_id
- file_url
- raw_text
File source - must be exactly one of: file_id, file_url, or raw_text
ID of the file previously uploaded to Tensorlake. Has tensorlake- (V1) or file_ (V2) prefix.
Example:
"file_abc123xyz"
Comma-separated list of page numbers or ranges to parse (e.g., '1,2,3-5'). Default: all pages.
Example:
"1-5,8,10"
Name of the file. Only populated when using file_id.
Example:
"document.pdf"
Available options:
application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/msword, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.ms-powerpoint, application/vnd.apple.keynote, image/jpeg, image/tiff, text/plain, text/html, text/markdown, text/x-markdown, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel.sheet.macroenabled.12, application/vnd.ms-excel, text/xml, text/csv, image/png, text/rtf, application/rtf, application/octet-stream, application/pkcs7-mime, application/x-pkcs7-mime, application/pkcs7-signature Additional metadata to identify the edit request. The labels are returned in the edit response.
Example:
{ "priority": "high", "source": "email" }