OCR, Envelope OCR, Document Detection, Image Enhancement and Image Upscaling, Virus Detection were each a separate plugin. We have switched all six on for every account on Start, Grow and Scale. Usage limits are unchanged, and nothing needs enabling in the dashboard.
| Task | What it returns | Response | Included per month | Overage |
|---|---|---|---|---|
ocr |
Every line of text, with per-word bounding boxes | JSON | 5,000 | $0.03 |
envelope_ocr |
sender, recipient_name, recipient_address | JSON | 1,000 | $0.03 |
doc_detection |
The page deskewed, cropped and binarised | Image | 1,000 | $0.2 |
enhance |
The photo colour corrected, with named presets | Image | 1,000 | $0.04 |
upscale |
The image enlarged, with noise and style options | Image | 1,000 | $0.025 |
virus_detection |
infected and infections_list for each scanned file | JSON | 1,000 | $0.05 |
The image tasks cache at the CDN for about 31 days, so they cost one unit per image however much traffic you send. The JSON tasks answer Cache-Control: private and run again on every request, so call those once and store what comes back.
Key takeaways
- OCR, Envelope OCR, Document Detection, Image Enhancement and Image Upscaling, Virus Detection now run on the Filestack Start, Grow and Scale plans without a separate plugin.
- Included allowances stay as they were, at 5,000 OCR units a month and 1,000 for each of the other four.
- All five run as a path segment in front of a file handle, so a transformation URL is the whole integration.
- The image tasks cache at the CDN, and the JSON tasks answer
Cache-Control: privateand run again on every request. - With application security enabled,
ocr,envelope_ocranddoc_detectionneed a signed policy, whileenhanceandupscaleanswer an unsigned request.
What each of the six tasks returns
OCR reads printed and handwritten text and returns text areas, lines and words, each with a bounding box, plus a flat text field holding everything. 5,000 units a month, then $0.03 each. Bounding boxes let the invoice OCR API locate a total by its position on the page.
Envelope OCR takes a picture of an envelope and returns sender, recipient_name and recipient_address as named fields, so nothing downstream has to work out which block is which. 1,000 units a month, then $0.03 each. Those fields go straight into a mailroom system from the envelope OCR API.
Document Detection finds the page inside a photograph, warps it square, crops away the background and binarises it. The output is an image, not JSON. 1,000 units a month, then $0.2 each, which is the highest per-unit rate of the six. Two parameters decide whether the document detection API returns a binarised page, a colour page or coordinates.
Image Enhancement colour corrects a photograph. Called bare it applies the auto preset, and named presets cover specific problems such as underexposure and colour cast. 1,000 units a month, then $0.04 each. One underexposed photograph shows what each image enhancement preset changes.
Image Upscaling enlarges an image, with noise and style parameters that tune it for artwork or photographs. 1,000 units a month, then $0.025 each. The image upscaling API accepts inputs up to 4,000,000 pixels.
Virus Detection scans a file after it lands in storage and returns an infected boolean and an infections_list holding the name of every detection. ZIP archives, including a ZIP inside a ZIP, are scanned by what they contain. It runs only as a workflow task, and each scan also counts as one workflow execution. 1,000 scans a month, then $0.05 each. A condition on infected lets the virus detection API store a copy only when the file is clean.
How to call any of the six tasks
Every one of the five is a path segment in front of a handle except the Virus Detection. There is no SDK to add and no endpoint to learn:
https://cdn.filestackcontent.com/TASK/HANDLE
The three Intelligence tasks, ocr, envelope_ocr and doc_detection, need a signed policy once application security is switched on. enhance and upscale answer without one, so an enhanced image can go straight into an img tag.
When a policy is missing, the refusal names the task that wanted it:
HTTP 403
security required for tasks: ocr
That makes it the quickest way to tell a missing signature apart from a malformed URL. The policy needs read and convert, and the grammar is in Security Policies.
Which tasks to cache and which to store
The six split cleanly by what they return, and that split decides where the call goes in your application.
Image tasks answer Cache-Control: public with roughly a month of freshness, and a repeat request to the same URL is served from cache. Put enhance in an img tag and the task runs once for that image no matter how much traffic the page takes.
Both OCR tasks answer Cache-Control: private and run again on every request. A page that renders extracted text should read it from your own database, not from a transformation URL. Call the task once when the file arrives, store the JSON, and serve your own copy after that.
How to run these tasks at upload with workflows
OCR and Document Detection are available as Workflow tasks, so they can run the moment a file lands rather than on first request. Attach the workflow to the upload:
import * as filestack from 'filestack-js';
const client = filestack.init(YOUR_API_KEY);
client.picker({
storeTo: { workflows: ['YOUR_WORKFLOW_ID'] },
}).open();
Results arrive on the fs.workflow webhook, keyed by the task name you chose in the developer portal:
{
"action": "fs.workflow",
"text": {
"jobid": "f4f5d926-f0c1-40eb-a816-e8bf8d99418b",
"sources": ["jKQtNddSkIEfFuC5tk9A"],
"results": { "ocr_extract": { "data": { "document": { "text_areas": [] } } } },
"status": "Finished"
}
}
The payload under data matches what the same task returns from a transformation URL, so one parser covers both routes. A policy for a workflow run needs runWorkflow alongside convert, and the payload arrives unsigned until you create a webhook secret, which is a separate step in the portal next to the webhook itself, and then the receiver can verify the webhook signature.
Envelope OCR, Image Enhancement and Image Upscaling are Processing API tasks rather than Workflow tasks, so those three run as a call on the handle after the upload finishes.
The rest of the series
One post per task, each covering what it returns, the failure cases, and where the call belongs. All six are linked above.
If you are already on Start, Grow or Scale, the tasks are answering now, and the only change at your end is the path segment.
FAQ
Do I need to enable anything in the dashboard?
No. All six are switched on for every account on Start, Grow and Scale, with no plugin to add and no setting to change. The only change at your end is the path segment in the URL.
Have the included allowances changed?
No. They are the same as they were as separate plugins, at 5,000 OCR units a month and 1,000 for each of the other four. The overage rates are unchanged too.
Which of the six need a signed policy?
The three Intelligence tasks, ocr, envelope_ocr and doc_detection, once application security is switched on. enhance and upscale answer unsigned, so an enhanced image can go straight into an img tag.
Where should each call live in my application?
Follow the response type. The image tasks cache for about a month, so a delivery URL runs them once per image. The JSON tasks answer private and re-run on every request, so call those once at upload and store what comes back.
Joshua is a web developer with over 4 years of experience building responsive, high-performance websites and web applications. Currently working as an AI Automation Specialist, he combines modern web development with automation to create efficient, scalable digital solutions. He shares practical insights on WordPress, web development, and emerging technologies.
Read More →