Estimates what a review of a document would cost on the caller's Gemini API key.
The estimate comes from what past reviews with the same model and depth cost, adjusted to this document's size and repriced at the Gemini API's current list prices. It covers one review attempt that runs to completion, and doesn't include retries after errors.
HTTP request
POST https://deepreview.googleapis.com/v1/{document=documents/*}:estimateReviewCost
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
document |
Required. The document to review. It takes the form |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"review": {
object ( |
| Fields | |
|---|---|
review |
Required. The review to estimate, as it would be passed to |
Response body
Response message for estimating what a review would cost. When the cost can't be estimated, for example because too few past reviews used the same model and depth, the costs are unset and pastReviewCount is 0.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "lowCost": { object ( |
| Fields | |
|---|---|
lowCost |
The 20th percentile of what comparable past reviews would cost for this document. |
medianCost |
The median of what comparable past reviews would cost for this document. |
highCost |
The 95th percentile of what comparable past reviews would cost for this document. |
pastReviewCount |
Number of past reviews the estimate is based on. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.
Money
Represents an amount of money with its currency type.
| JSON representation |
|---|
{ "currencyCode": string, "units": string, "nanos": integer } |
| Fields | |
|---|---|
currencyCode |
The three-letter currency code defined in ISO 4217. |
units |
The whole units of the amount. For example if |
nanos |
Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If |