Hii everyone,
I am willing to integrate AlphaGenome’s API into my research workflow. But for that i need to be aware of it’s performance capabilities i.e., API daily input limit , API daily use time limit, API per-day prediction limit, etc.
Since documentation only partly explains query formats, but not the API usage constraints (such as query size limits, daily request caps, or timeout thresholds), for an optimized workflow I would appreciate clarification on the following points regarding API usage:
Data Limits:
What’s the maximum input size (e.g., sequence length or batch size) that can be submitted in a single API request?
Are there restrictions on the number of variants/queries per request?
Request Frequency:
Is there a daily or hourly limit on the number of API requests per user?
Are there any restrictions on the frequency of requests, such as limits per second, minute, or hour?
Timeouts and Processing:
What is the typical response time for a query?
Is there a time limit after which the query will fail or terminate?
What’s the maximum input size (e.g., sequence length or batch size) that can be submitted in a single API request?
Each API request can be up to 1Mb in sequence length, and are of batch size 1.
Are there restrictions on the number of variants/queries per request?
Each API request is a single variant query per request. The dna_model_service definition captures the underlying API if you’re interested.
Is there a daily or hourly limit on the number of API requests per user?
Are there any restrictions on the frequency of requests, such as limits per second, minute, or hour?
Yes, we have some heuristics on the number of requests and the size of predictions each user can make. The quota limits are regularly changed based on our available resources, so it is a little difficult to provide a concrete maximum per se. We try and make it as high as possible
What is the typical response time for a query?
As reported in our paper, the model prediction is < 1s, but depending on your internet connection and size of the requested prediction, it can take a lot longer to download the generated predictions.
Is there a time limit after which the query will fail or terminate?
Assuming your internet connection is sufficiently capable of downloading the requested predictions in a reasonable timeframe, the query shouldn’t timeout.
Thanks for all of the work your team has put into making this available! It is understandable that the limits could fluctuate; is there a “safe” set of recommendations?
I’d like to calculate predictions for a relatively large number of SNPs and have been able to set up a batched sets of inputs, but also want to stay within your guidelines. I saw that the default max workers for predict_variants is set to 5, but is there a reasonable upper bound for what that number can be while not running the risk of exceeding the quota?
It’s hard to say what would constitute as “safe”, but so long as you’re not spamming the servers with requests (which would cause your connection to be throttled), I’d try upping the number of workers until you start getting RESOURCE_EXHAUSTED errors
With the Python API, there’s some retry code that should somewhat gracefully retry with exponential backoff to try and mitigate getting throttled.