-
Notifications
You must be signed in to change notification settings - Fork 130
Description
The Batch API provides a 50% discount on token costs, and higher rate limits; with the downside being that the results aren't available straight away (could be up to 24hr delay).
I think for a lot of JS reversing use cases, these tradeoffs of cost/benefit would likely make enough sense to explore implementing.
- https://platform.openai.com/docs/guides/batch
-
While some uses of the OpenAI Platform require you to send synchronous requests, there are many cases where requests do not need an immediate response or rate limits prevent you from executing a large number of queries quickly. Batch processing jobs are often helpful in use cases like:
- Running evaluations
- Classifying large datasets
- Embedding content repositories
The Batch API offers a straightforward set of endpoints that allow you to collect a set of requests into a single file, kick off a batch processing job to execute these requests, query for the status of that batch while the underlying requests execute, and eventually retrieve the collected results when the batch is complete.
Compared to using standard endpoints directly, Batch API has:
- Better cost efficiency: 50% cost discount compared to synchronous APIs
- Higher rate limits: Substantially more headroom compared to the synchronous APIs
- Fast completion times: Each batch completes within 24 hours (and often more quickly)
-
- https://platform.openai.com/docs/pricing
See Also
- Add support for OpenAI Flex Processing #406
- [Error] Too many requests #2
- Suggestions : Alternative Models, Batch and Auto-renaming #84
- Parallel renames #167
- Failed when processing a large file (13MB) #174
This would potentially also have relevance to the stable renaming / resumability / etc issues; as I suspect there may be a need to export some kind of ‘status’ file that might contain a hash of the source file + extract of the scopes + identifier names or similar: