Processing Priority
Introduction
When submitting drawing requests to the Werk24 API, each request is assigned a processing priority that determines its position in the processing queue. Understanding priorities helps you optimize your workflow, especially when handling both time-sensitive and batch processing tasks.
What Is Processing Priority?
Processing priority determines the order in which drawing requests are processed by the Werk24 API. Higher priority requests are picked up before lower priority ones, allowing time-sensitive work to complete faster while batch jobs can be queued at lower priority.
The Werk24 API has three priority levels. Each is a promise on how soon a request is picked up (99th percentile), not on how long the read itself takes:
| Level | Value | Pickup (p99) | How you get it |
|---|---|---|---|
| Best-effort | PRIO3 | within 10 minutes | Included on every plan, Pay as You Go and Production among them |
| Priority | PRIO2 | within 60 seconds | An add-on on Production (and on the retired Essential and Growth plans), or part of a contract |
| Express | PRIO1 | within 10 seconds | An add-on on Production (and on the retired Essential and Growth plans), or part of a contract |
The pickup time counts from when one of your slots is free. A request sent while all of them are busy first waits for one of your own requests to finish, and that wait is not part of the promise.
werk24.io/pricing lists the add-ons and their prices. Accounts on the retired Essential and Growth plans keep the level they had.
Your Account's Level and Priority
Your account's level is the highest priority you can ask for:
- Express (
PRIO1): can usePRIO1,PRIO2orPRIO3 - Priority (
PRIO2): can usePRIO2orPRIO3 - Best-effort (
PRIO3): can only usePRIO3
By default, requests use your account's level. The priority override lets you use a lower one, for example to keep a batch out of the way of your own interactive requests. To ask for a higher one, book the Priority or Express add-on first; until then the API refuses it with PRIORITY_TOO_HIGH.
Why Use Priority Override?
Priority override is useful when you want to:
- Batch Processing: Queue large volumes of drawings at lower priority without impacting your real-time requests
- Resource Management: Separate urgent work from background tasks
- Fair Queuing: Allow other users' urgent requests to process while your batch jobs wait
The page rate is the same whatever the priority, so a lower priority does not make a read cheaper.
Using Priority Override
Basic Usage with read_drawing()
Using with Hooks
Using with Callbacks
Using CURL with Callbacks
You can also submit callback requests directly via the REST API with a priority override:
The response contains the request ID for tracking:
Your callback endpoint will receive the results once processing completes.
curl sends the drawing inside the request body, so the callback size limit of about 4.6 MB applies, and nothing checks it before the upload: a larger drawing is refused without a request_id. See Drawing File Size Limit.
Priority Values Are Case-Insensitive
The client accepts priority values in any case:
The client normalizes the value to uppercase before sending to the server.
Error Handling
PriorityTooHighError
This exception is raised when you request a priority higher than your account tier allows.
Exception attributes:
account_tier: Your account's maximum allowed priority (e.g., "PRIO2")requested_priority: The priority you attempted to use (e.g., "PRIO1")
InvalidPriorityError
This exception is raised when you provide an invalid priority value.
Exception attributes:
invalid_value: The invalid priority string you provided
Best Practices
1. Use Default Priority for Interactive Requests
For user-facing applications where response time matters, don't specify a priority; let it default to your account's maximum:
2. Use PRIO3 for Batch Processing
When processing large volumes of drawings in the background:
3. Handle Priority Errors Gracefully
Always catch priority-related exceptions in production code:
4. Separate Queues by Priority
For applications with mixed workloads, consider separating requests by priority:
See Also
- API Requests - Basic usage of the Python client
- Hooks - Using hooks for asynchronous processing
- HTTP Error Codes - Complete error handling reference