Hi community,
I just have a question how api calls are counted for billing.
Let’s say I start an operation, is fetching the operation status counted as an api call?
Like when I have an operation that runs quite long, and I fetch the status every second, are those called as hundreds of api-calls?
Best regards
Artur
@a.hellmann
Yes, fetching the operation status is indeed counted as an API call. When you initiate an operation using the start_convert
method, you will need to periodically check the status of that operation using the get_operation_status
method. Each time you call this method, it counts as a separate API call.
For example, if you are checking the operation status every second while the operation is running, and it takes a long time to complete, this could result in a significant number of API calls, potentially hundreds, depending on the duration of the operation.
It’s important to keep this in mind for billing purposes, as each call to get_operation_status
will contribute to your total API call count.
If you have further questions about API usage or billing, feel free to ask!
Sources:
[1]: Gateway Timeout Error when Converting Large PPTX Files to PDF
[2]: Request Body Is Too Large after Moving to Newer API
Ah ok, that explains by bill.
Thank you!
@a.hellmann,
We are sorry for the misunderstanding. In fact, if the GetOperationStatus
method is called multiple times for the same operation, only one of those calls is included in the billing—specifically, the first call in which the status was “finished.” Accordingly, there should be no more than one billing entry per operation for GetOperationStatus
. If all operations succeed, then there should be exactly one billing entry per operation.