{
  "rootUrl": "https://deepreview.googleapis.com/",
  "discoveryVersion": "v1",
  "name": "deepreview",
  "fullyEncodeReservedExpansion": true,
  "basePath": "",
  "documentationLink": "https://research.google/deepreview",
  "schemas": {
    "DownloadDocumentResponse": {
      "type": "object",
      "properties": {},
      "description": "Response message for downloading a Document's raw content using media download.",
      "id": "DownloadDocumentResponse"
    },
    "ListReviewsResponse": {
      "id": "ListReviewsResponse",
      "type": "object",
      "properties": {
        "reviews": {
          "items": {
            "$ref": "Review"
          },
          "type": "array",
          "description": "The list of Review resources."
        },
        "nextPageToken": {
          "description": "A token to retrieve the next page of results, or empty if no further pages exist.",
          "type": "string"
        }
      },
      "description": "Response message for listing Review resources."
    },
    "CitationMetadata": {
      "id": "CitationMetadata",
      "description": "Structured bibliographic metadata for an extracted or retrieved work.",
      "properties": {
        "authors": {
          "description": "Output only. Ordered list of authors.",
          "type": "array",
          "readOnly": true,
          "items": {
            "$ref": "Author"
          }
        },
        "urls": {
          "type": "array",
          "readOnly": true,
          "items": {
            "type": "string"
          },
          "description": "Output only. URLs associated with the reference."
        },
        "doi": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Digital Object Identifier (DOI)."
        },
        "pages": {
          "type": "string",
          "description": "Output only. Page range or article number.",
          "readOnly": true
        },
        "volume": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Volume identifier."
        },
        "publicationDate": {
          "$ref": "Date",
          "description": "Output only. Publication date (month and day left as 0 if just year).",
          "readOnly": true
        },
        "source": {
          "readOnly": true,
          "description": "Output only. Source database for retrieved metadata (e.g., \"openalex\", \"crossref\"). Empty on `extracted_metadata`.",
          "type": "string"
        },
        "journal": {
          "type": "string",
          "description": "Output only. Journal, conference, or venue name.",
          "readOnly": true
        },
        "title": {
          "readOnly": true,
          "description": "Output only. Work title.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "AnchoredReviewComment": {
      "properties": {
        "suggestedEdit": {
          "description": "Output only. Optional suggested replacement text or edit for the anchored span.",
          "type": "string",
          "readOnly": true
        },
        "location": {
          "description": "Output only. Polymorphic location in the document where this comment is anchored.",
          "$ref": "DocumentLocation",
          "readOnly": true
        },
        "commentId": {
          "readOnly": true,
          "description": "Output only. Unique identifier for the comment within the review.",
          "type": "string"
        },
        "bodyMarkdown": {
          "type": "string",
          "description": "Output only. Detailed markdown explanation of the review comment.",
          "readOnly": true
        },
        "summary": {
          "description": "Output only. Short one-line summary of the review comment.",
          "readOnly": true,
          "type": "string"
        },
        "citationReport": {
          "readOnly": true,
          "description": "Output only. Optional structured citation verification report when this comment corresponds to a bibliography reference.",
          "$ref": "CitationReport"
        },
        "severity": {
          "enumDescriptions": [
            "Default unspecified severity.",
            "Critical flaw in proofs, methodology, or empirical claims.",
            "Major issue affecting key conclusions or experimental validity.",
            "Minor issue, presentation clarity, or missing detail.",
            "Constructive suggestion or optional improvement."
          ],
          "enum": [
            "SEVERITY_UNSPECIFIED",
            "CRITICAL",
            "MAJOR",
            "MINOR",
            "SUGGESTION"
          ],
          "description": "Output only. Severity classification of the comment.",
          "type": "string",
          "readOnly": true
        }
      },
      "description": "A structured review comment anchored to a specific location in the document.",
      "id": "AnchoredReviewComment",
      "type": "object"
    },
    "DriveSource": {
      "id": "DriveSource",
      "properties": {
        "revisionId": {
          "description": "Optional. Input only. Immutable. Importing a specific revision is not currently supported; non-empty values return INVALID_ARGUMENT.",
          "type": "string"
        },
        "fileId": {
          "type": "string",
          "description": "Required. Immutable. The Google Drive file ID (e.g. \"1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\"). For Google Drive shortcuts, callers must pass the resolved target file's `file_id` and `resource_key`."
        },
        "resourceKeySet": {
          "description": "Output only. Indicates whether a resource key was provided for this Drive source.",
          "type": "boolean",
          "readOnly": true
        },
        "resourceKey": {
          "type": "string",
          "description": "Optional. Input only. Immutable. Resource key (`^[a-zA-Z0-9_-]{1,128}$`) required to access certain older link-shared Google Drive files returned by the Google Drive Picker (for shortcuts, pass the resolved target file's resource key). Never persisted in database records or returned in Document resources (see companion field `resource_key_set`, AIP-147)."
        }
      },
      "type": "object",
      "description": "Configuration for importing a document directly from Google Drive."
    },
    "PdfLocation": {
      "properties": {
        "quoteSelector": {
          "$ref": "TextQuoteSelector",
          "description": "Output only. W3C Web Annotation TextQuoteSelector (https://www.w3.org/TR/annotation-model/#text-quote-selector) for exact text span highlighting.",
          "readOnly": true
        },
        "pageNumber": {
          "description": "Output only. 1-indexed page number within the PDF document.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        },
        "boundingBoxes": {
          "readOnly": true,
          "description": "Output only. Normalized bounding boxes [0.0, 1.0] relative to page width and height. At most 50 bounding boxes are returned per anchored span.",
          "items": {
            "$ref": "NormalizedBoundingBox"
          },
          "type": "array"
        }
      },
      "id": "PdfLocation",
      "description": "Location anchor within a PDF document.",
      "type": "object"
    },
    "DurationRange": {
      "properties": {
        "minDuration": {
          "description": "Output only. Lower bound of the estimated review duration.",
          "type": "string",
          "format": "google-duration",
          "readOnly": true
        },
        "maxDuration": {
          "description": "Output only. Upper bound of the estimated review duration.",
          "readOnly": true,
          "format": "google-duration",
          "type": "string"
        }
      },
      "type": "object",
      "id": "DurationRange",
      "description": "Estimated wall-clock duration range for a review run."
    },
    "Empty": {
      "type": "object",
      "id": "Empty",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "properties": {}
    },
    "EstimateReviewCostResponse": {
      "type": "object",
      "description": "Response message for estimating what a review would cost and how long it will take on the caller's Gemini API key. Structural guidance fields (`document_token_count`, `estimated_model_calls`, `paid_tier1_estimated_duration`, `paid_tier2_plus_estimated_duration`, and `explicit_caching_supported`) are populated whenever the document can be measured and PAT is configured, even when too few past reviews exist (or the model has no listed price) to compute USD cost percentiles. When USD cost can't be estimated, `low_cost`, `median_cost`, and `high_cost` are unset and `past_review_count` is 0.",
      "properties": {
        "paidTier2PlusEstimatedDuration": {
          "readOnly": true,
          "description": "Output only. Estimated wall-clock turnaround range on a Paid Tier 2 or Paid Tier 3 Gemini API key (unconstrained up to worker concurrency).",
          "$ref": "DurationRange"
        },
        "medianCost": {
          "$ref": "Money",
          "description": "The median of what comparable past reviews would cost for this document."
        },
        "estimatedModelCalls": {
          "readOnly": true,
          "type": "integer",
          "format": "int32",
          "description": "Output only. Planned PAT workflow topology model call budget for the configured depth and enabled modules (including dynamic prompt-writer calls when enabled and 3 progress slots for citation checking; actual citation verification runs additional per-reference lookups)."
        },
        "pastReviewCount": {
          "description": "Number of past reviews the estimate is based on.",
          "type": "integer",
          "format": "int32"
        },
        "lowCost": {
          "description": "The 20th percentile of what comparable past reviews would cost for this document.",
          "$ref": "Money"
        },
        "paidTier1EstimatedDuration": {
          "description": "Output only. Estimated wall-clock turnaround range on a Paid Tier 1 Gemini API key (bounded by Paid Tier 1's 1M-2M tokens/min ceilings and retry/spend throttle backoff; single-attempt worker runs cap at 55 minutes until multi-slice continuations are enabled).",
          "$ref": "DurationRange",
          "readOnly": true
        },
        "highCost": {
          "$ref": "Money",
          "description": "The 95th percentile of what comparable past reviews would cost for this document."
        },
        "explicitCachingSupported": {
          "description": "Output only. Whether explicit context caching applies on Paid Tier Gemini API keys for the configured model and document size, and is reflected in the cost estimate (false when post-launch BYOK analytics show explicit caching is falling back inline; Free-Tier keys do not create explicit caches).",
          "type": "boolean",
          "readOnly": true
        },
        "documentTokenCount": {
          "format": "int64",
          "type": "string",
          "description": "Output only. Estimated size of the document in tokens (matching the stored `Document.estimated_tokens` used by submission gates when available).",
          "readOnly": true
        }
      },
      "id": "EstimateReviewCostResponse"
    },
    "TextQuoteSelector": {
      "properties": {
        "suffix": {
          "description": "Output only. Characters immediately following `exact` for disambiguation.",
          "type": "string",
          "readOnly": true
        },
        "prefix": {
          "description": "Output only. Characters immediately preceding `exact` for disambiguation.",
          "readOnly": true,
          "type": "string"
        },
        "exact": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Verbatim substring extracted from the document character stream."
        }
      },
      "type": "object",
      "description": "W3C Web Annotation TextQuoteSelector for resilient text anchoring (see https://www.w3.org/TR/annotation-model/#text-quote-selector for details).",
      "id": "TextQuoteSelector"
    },
    "Status": {
      "id": "Status",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
      "properties": {
        "message": {
          "type": "string",
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client."
        },
        "code": {
          "format": "int32",
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "type": "integer"
        },
        "details": {
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            }
          },
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array"
        }
      },
      "type": "object"
    },
    "Document": {
      "properties": {
        "displayName": {
          "description": "Optional. User-provided display title or filename for the document.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Identifier. Resource name in format `documents/{document}`."
        },
        "driveSource": {
          "$ref": "DriveSource",
          "description": "Optional. Reference to a Google Drive file to import."
        },
        "latestReviewSummary": {
          "description": "Output only. Summary of the most recent review run for this document, if any. Populated by `GetDocument` and `ListDocuments`; unset on the document returned by `CreateDocument`, which has no reviews yet.",
          "$ref": "ReviewSummary",
          "readOnly": true
        },
        "createTime": {
          "description": "Output only. Timestamp when the document was initially created.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        }
      },
      "description": "A document uploaded for automated review. Documents are immutable post-creation; to review a new version, create a new Document.",
      "id": "Document",
      "type": "object"
    },
    "NormalizedBoundingBox": {
      "properties": {
        "top": {
          "readOnly": true,
          "format": "float",
          "description": "Output only. Top coordinate in [0.0, 1.0].",
          "type": "number"
        },
        "bottom": {
          "format": "float",
          "description": "Output only. Bottom coordinate in [0.0, 1.0].",
          "readOnly": true,
          "type": "number"
        },
        "left": {
          "type": "number",
          "readOnly": true,
          "format": "float",
          "description": "Output only. Left coordinate in [0.0, 1.0]."
        },
        "right": {
          "type": "number",
          "description": "Output only. Right coordinate in [0.0, 1.0].",
          "format": "float",
          "readOnly": true
        }
      },
      "type": "object",
      "id": "NormalizedBoundingBox",
      "description": "Bounding box in normalized [0.0, 1.0] page coordinates (origin top-left)."
    },
    "ListDocumentsResponse": {
      "id": "ListDocumentsResponse",
      "properties": {
        "documents": {
          "items": {
            "$ref": "Document"
          },
          "type": "array",
          "description": "The list of Document resources."
        },
        "nextPageToken": {
          "description": "A token to retrieve the next page of results, or empty if no further pages exist.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Response message for listing Document resources."
    },
    "DeepReviewRunConfig": {
      "properties": {
        "model": {
          "description": "Optional. The Gemini model identifier to use for the review. If omitted, the server uses its default model. Unsupported values return INVALID_ARGUMENT.",
          "type": "string"
        },
        "topology": {
          "enum": [
            "TOPOLOGY_UNSPECIFIED",
            "EXTRA_HIGH",
            "HIGH",
            "MID",
            "LOW"
          ],
          "enumDescriptions": [
            "Default unspecified topology. The server uses its default topology (`MID`).",
            "Extra high quality topology with exhaustive evaluation passes.",
            "Standard high quality conference review topology.",
            "Medium quality topology balancing review latency and depth.",
            "Low latency / fast turnaround topology."
          ],
          "description": "Optional. Review execution topology profile to use.",
          "type": "string"
        },
        "thinkingLevel": {
          "description": "Optional. Reasoning effort level for model calls in the review pipeline. Defaults to `THINKING_LEVEL_MEDIUM` when omitted or `THINKING_LEVEL_UNSPECIFIED`. Non-`THINKING_LEVEL_MEDIUM` thinking levels require `gemini_api_key` when calling `CreateReview`; otherwise `CreateReview` returns `INVALID_ARGUMENT`.",
          "enum": [
            "THINKING_LEVEL_UNSPECIFIED",
            "THINKING_LEVEL_LOW",
            "THINKING_LEVEL_MEDIUM",
            "THINKING_LEVEL_HIGH"
          ],
          "enumDescriptions": [
            "Default unspecified thinking level. The server uses its default thinking level (`THINKING_LEVEL_MEDIUM`).",
            "Low reasoning effort for faster turnaround and lower token cost.",
            "Balanced reasoning effort. Used by default and for all reviews created without a developer Bring-Your-Own-Key Gemini API key.",
            "Maximum reasoning effort for deep mathematical, theoretical, and logical verification."
          ],
          "type": "string"
        },
        "geminiApiKey": {
          "description": "Optional. Input only. Developer Bring-Your-Own-Key Gemini API key. When provided, requests are billed to the caller's Gemini API project. Input only; forwarded to the asynchronous review runner in the task payload and never persisted in database records or returned in review resources (see companion field `gemini_api_key_set`, AIP-147).",
          "type": "string"
        },
        "userPrompt": {
          "description": "Optional. User-provided guidance, focus areas, or custom evaluation instructions passed to the review agents.",
          "type": "string"
        },
        "geminiApiKeySet": {
          "readOnly": true,
          "type": "boolean",
          "description": "Output only. Indicates whether a developer Bring-Your-Own-Key Gemini API key was provided for this review run."
        }
      },
      "id": "DeepReviewRunConfig",
      "type": "object",
      "description": "Configuration options for the multi-agent document review execution pipeline."
    },
    "TextLocation": {
      "id": "TextLocation",
      "type": "object",
      "description": "Location anchor within a plain-text, Markdown, or LaTeX source document.",
      "properties": {
        "firstColumn": {
          "type": "integer",
          "format": "int32",
          "readOnly": true,
          "description": "Output only. Optional 1-indexed inclusive first column offset within `first_line`."
        },
        "quotedLinePreview": {
          "readOnly": true,
          "description": "Output only. Verbatim snippet of the anchored source line(s).",
          "type": "string"
        },
        "lastColumn": {
          "type": "integer",
          "format": "int32",
          "description": "Output only. Optional 1-indexed inclusive last column offset within `last_line`.",
          "readOnly": true
        },
        "lastLine": {
          "format": "int32",
          "type": "integer",
          "description": "Output only. 1-indexed inclusive last line number.",
          "readOnly": true
        },
        "firstLine": {
          "readOnly": true,
          "description": "Output only. 1-indexed inclusive first line number.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "Money": {
      "description": "Represents an amount of money with its currency type.",
      "properties": {
        "nanos": {
          "format": "int32",
          "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.",
          "type": "integer"
        },
        "currencyCode": {
          "type": "string",
          "description": "The three-letter currency code defined in ISO 4217."
        },
        "units": {
          "type": "string",
          "format": "int64",
          "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar."
        }
      },
      "id": "Money",
      "type": "object"
    },
    "GroundingUrl": {
      "properties": {
        "url": {
          "description": "Output only. Source URL.",
          "type": "string",
          "readOnly": true
        },
        "title": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Source page title or domain."
        }
      },
      "description": "Web source URL surfaced during Google Search grounding verification.",
      "type": "object",
      "id": "GroundingUrl"
    },
    "DocumentLocation": {
      "properties": {
        "pdf": {
          "description": "Output only. Location within a rendered PDF document.",
          "$ref": "PdfLocation",
          "readOnly": true
        },
        "text": {
          "$ref": "TextLocation",
          "description": "Output only. Location within a plain-text, Markdown, or LaTeX source document.",
          "readOnly": true
        }
      },
      "type": "object",
      "id": "DocumentLocation",
      "description": "A location targeting either a PDF page region/quote or text lines in the document."
    },
    "Date": {
      "properties": {
        "month": {
          "format": "int32",
          "type": "integer",
          "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day."
        },
        "day": {
          "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
          "format": "int32",
          "type": "integer"
        },
        "year": {
          "type": "integer",
          "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
          "format": "int32"
        }
      },
      "id": "Date",
      "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp",
      "type": "object"
    },
    "Operation": {
      "type": "object",
      "description": "This resource represents a long-running operation that is the result of a network API call.",
      "properties": {
        "error": {
          "$ref": "Status",
          "description": "The error result of the operation in case of failure or cancellation."
        },
        "done": {
          "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.",
          "type": "boolean"
        },
        "name": {
          "type": "string",
          "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`."
        },
        "metadata": {
          "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.",
          "additionalProperties": {
            "description": "Properties of the object. Contains field @type with type URL.",
            "type": "any"
          },
          "type": "object"
        },
        "response": {
          "type": "object",
          "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          }
        }
      },
      "id": "Operation"
    },
    "UserQuota": {
      "description": "Singleton resource representing the authenticated caller's review quota limits, sliding-window usage, and non-expiring bonus credits.",
      "id": "UserQuota",
      "properties": {
        "usedReviewCount": {
          "format": "int32",
          "description": "Output only. Number of free-tier reviews used in the past 7 days.",
          "type": "integer",
          "readOnly": true
        },
        "customLimitEnabled": {
          "type": "boolean",
          "readOnly": true,
          "description": "Output only. Whether a custom per-user quota override is active for this user."
        },
        "name": {
          "description": "Identifier. Resource name of the singleton user quota (`userQuota`).",
          "type": "string"
        },
        "nextAvailableTime": {
          "readOnly": true,
          "format": "google-datetime",
          "type": "string",
          "description": "Output only. Timestamp when the next review quota slot becomes available if `remaining_review_count` is 0; unset when quota is currently available."
        },
        "remainingReviewCount": {
          "description": "Output only. Total remaining free-tier reviews currently available, combining the remaining rolling 7-day weekly allowance and any non-expiring bonus credits (`max(0, max_review_count_per_week - used_review_count) + bonus_review_count`).",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "bonusReviewCount": {
          "format": "int32",
          "type": "integer",
          "readOnly": true,
          "description": "Output only. Remaining non-expiring bonus free-tier review credits. Bonus credits are consumed only after the rolling 7-day weekly allowance is exhausted and are included in `remaining_review_count`."
        },
        "maxReviewCountPerWeek": {
          "format": "int32",
          "type": "integer",
          "description": "Output only. Maximum free-tier reviews allowed per rolling 7-day window.",
          "readOnly": true
        }
      },
      "type": "object"
    },
    "FieldComparison": {
      "properties": {
        "detail": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Human-readable comparison detail (e.g., \"extracted=2023, found=2024 (diff=1)\")."
        },
        "fieldKey": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Field key (\"title\", \"authors\", \"year\", \"journal\", \"volume\", \"pages\", \"doi\")."
        },
        "match": {
          "type": "boolean",
          "description": "Output only. Whether the extracted and retrieved values matched.",
          "readOnly": true
        }
      },
      "description": "Per-field comparison result between extracted and retrieved metadata.",
      "id": "FieldComparison",
      "type": "object"
    },
    "Author": {
      "id": "Author",
      "type": "object",
      "properties": {
        "givenName": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Author given name / initials."
        },
        "familyName": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Author family name / surname (or organization name)."
        }
      },
      "description": "Author name components."
    },
    "ReviewSummary": {
      "type": "object",
      "description": "Lightweight summary of a Review execution run for display in Document views.",
      "properties": {
        "review": {
          "description": "Output only. Resource name of the Review.",
          "readOnly": true,
          "type": "string"
        },
        "state": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Current review lifecycle state.",
          "enumDescriptions": [
            "Default unspecified state.",
            "Review created and queued, awaiting worker scheduling.",
            "Review worker is actively evaluating the document.",
            "Review succeeded with generated report.",
            "Review failed after exhausting retry attempts."
          ],
          "enum": [
            "STATE_UNSPECIFIED",
            "PENDING",
            "RUNNING",
            "SUCCEEDED",
            "FAILED"
          ]
        },
        "createTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. Timestamp when this review attempt was initiated.",
          "readOnly": true
        }
      },
      "id": "ReviewSummary"
    },
    "EstimateReviewCostRequest": {
      "type": "object",
      "description": "Request message for estimating what a review would cost.",
      "properties": {
        "review": {
          "description": "Required. The review to estimate, as it would be passed to `CreateReview`. Only its `run_config` is read, and `gemini_api_key` is ignored.",
          "$ref": "Review"
        }
      },
      "id": "EstimateReviewCostRequest"
    },
    "Result": {
      "description": "Encapsulates the synthesized output or failure details of a single review execution.",
      "properties": {
        "reviewMarkdown": {
          "readOnly": true,
          "description": "Output only. Synthesized review report markdown.",
          "type": "string"
        },
        "anchoredComments": {
          "description": "Output only. Structured review comments anchored to specific locations in the document. At most 300 anchored comments are returned per review.",
          "items": {
            "$ref": "AnchoredReviewComment"
          },
          "readOnly": true,
          "type": "array"
        },
        "error": {
          "readOnly": true,
          "description": "Output only. Failure status details if review execution failed.",
          "$ref": "Status"
        }
      },
      "type": "object",
      "id": "Result"
    },
    "Review": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Identifier. Resource name in format `documents/{document}/reviews/{review}`."
        },
        "result": {
          "description": "Output only. Review output (markdown, errors, and future modalities).",
          "readOnly": true,
          "$ref": "Result"
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "PENDING",
            "RUNNING",
            "SUCCEEDED",
            "FAILED"
          ],
          "readOnly": true,
          "description": "Output only. Current review lifecycle state.",
          "enumDescriptions": [
            "Default unspecified state.",
            "Review created and queued, awaiting worker scheduling.",
            "Review worker is actively evaluating the document.",
            "Review succeeded with generated report.",
            "Review failed after exhausting retry attempts."
          ],
          "type": "string"
        },
        "startTime": {
          "readOnly": true,
          "description": "Output only. Timestamp when the worker started evaluation.",
          "type": "string",
          "format": "google-datetime"
        },
        "runConfig": {
          "description": "Optional. Run configuration parameters used for this review.",
          "$ref": "DeepReviewRunConfig"
        },
        "createTime": {
          "format": "google-datetime",
          "description": "Output only. Timestamp when this review attempt was initiated.",
          "type": "string",
          "readOnly": true
        },
        "progressPercent": {
          "readOnly": true,
          "description": "Output only. Estimated completion progress percentage of the review in [0, 100].",
          "type": "integer",
          "format": "int32"
        },
        "endTime": {
          "readOnly": true,
          "description": "Output only. Timestamp when the review reached a terminal state.",
          "format": "google-datetime",
          "type": "string"
        }
      },
      "id": "Review",
      "description": "An evaluation run of a document."
    },
    "CitationReport": {
      "properties": {
        "finalVerdict": {
          "description": "Output only. Final combined verdict after database lookup and search grounding.",
          "readOnly": true,
          "enum": [
            "VERDICT_UNSPECIFIED",
            "OK",
            "MINOR_MISMATCH",
            "MAJOR_MISMATCH",
            "VERIFIED_BY_SEARCH",
            "NOT_FOUND",
            "HALLUCINATED",
            "SKIPPED"
          ],
          "enumDescriptions": [
            "Default unspecified verdict.",
            "Reference metadata matches scholarly database record.",
            "Minor discrepancy (e.g., publication year off by 1 or venue variation).",
            "Major discrepancy in authors, year, or venue.",
            "Reference verified using Google Search grounding.",
            "Reference not found in scholarly databases and unverified by search.",
            "Reference flagged as likely hallucinated by Google Search grounding.",
            "Non-paper entry (e.g., software package or URL) skipped during lookup."
          ],
          "type": "string"
        },
        "lookupVerdict": {
          "enumDescriptions": [
            "Default unspecified verdict.",
            "Reference metadata matches scholarly database record.",
            "Minor discrepancy (e.g., publication year off by 1 or venue variation).",
            "Major discrepancy in authors, year, or venue.",
            "Reference verified using Google Search grounding.",
            "Reference not found in scholarly databases and unverified by search.",
            "Reference flagged as likely hallucinated by Google Search grounding.",
            "Non-paper entry (e.g., software package or URL) skipped during lookup."
          ],
          "readOnly": true,
          "type": "string",
          "description": "Output only. Verdict from scholarly database lookup (OpenAlex / Crossref) before search grounding.",
          "enum": [
            "VERDICT_UNSPECIFIED",
            "OK",
            "MINOR_MISMATCH",
            "MAJOR_MISMATCH",
            "VERIFIED_BY_SEARCH",
            "NOT_FOUND",
            "HALLUCINATED",
            "SKIPPED"
          ]
        },
        "entryType": {
          "description": "Output only. BibTeX entry type (e.g., \"article\", \"inproceedings\", \"misc\").",
          "type": "string",
          "readOnly": true
        },
        "firstAuthorFamilyNameMatch": {
          "type": "boolean",
          "readOnly": true,
          "description": "Output only. Whether the first author's family name matched between extracted and retrieved metadata."
        },
        "retrievedMetadata": {
          "$ref": "CitationMetadata",
          "readOnly": true,
          "description": "Output only. Metadata retrieved from OpenAlex / Crossref. Populated only when the retrieved work's title matches the extracted title. Omitted when no candidate matches the title so unrelated papers are never displayed as candidates."
        },
        "fieldComparisons": {
          "type": "array",
          "description": "Output only. Per-field comparisons (populated only when `retrieved_metadata` is present).",
          "readOnly": true,
          "items": {
            "$ref": "FieldComparison"
          }
        },
        "refNum": {
          "format": "int32",
          "type": "integer",
          "description": "Output only. 1-indexed bibliography reference number in the paper.",
          "readOnly": true
        },
        "retrievedBibtex": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Formatted BibTeX entry for the verified `retrieved_metadata` when present. Empty when `retrieved_metadata` is absent."
        },
        "searchMethod": {
          "description": "Output only. Strategy that produced the scholarly database match (e.g., \"doi\", \"title\", \"title_author\", \"autocomplete\"). Empty when no title-matching candidate was found.",
          "readOnly": true,
          "type": "string"
        },
        "citationKey": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Generated BibTeX citation key (e.g., \"smith2023deep\")."
        },
        "rawReference": {
          "readOnly": true,
          "description": "Output only. Verbatim reference string extracted from the paper's bibliography.",
          "type": "string"
        },
        "searchVerdict": {
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Default unspecified search verdict (search grounding not run).",
            "Google Search grounding confirmed the work exists.",
            "Google Search grounding determined the reference is likely hallucinated.",
            "Google Search grounding encountered an execution or parsing error."
          ],
          "description": "Output only. Verdict from Google Search grounding verification (when run).",
          "enum": [
            "SEARCH_VERDICT_UNSPECIFIED",
            "NOT_HALLUCINATED",
            "HALLUCINATED_BY_SEARCH",
            "SEARCH_ERROR"
          ]
        },
        "groundingUrls": {
          "type": "array",
          "description": "Output only. Web sources surfaced during Google Search grounding.",
          "readOnly": true,
          "items": {
            "$ref": "GroundingUrl"
          }
        },
        "extractedMetadata": {
          "readOnly": true,
          "description": "Output only. Metadata parsed from the paper's bibliography entry.",
          "$ref": "CitationMetadata"
        },
        "searchRationale": {
          "readOnly": true,
          "description": "Output only. Explanation from the Google Search grounding verification step (when run).",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Structured citation verification report for a single bibliography reference.",
      "id": "CitationReport"
    }
  },
  "resources": {
    "media": {
      "methods": {
        "download": {
          "parameterOrder": [
            "name"
          ],
          "description": "Downloads the original document content (PDF binary) using media streaming. Pass `alt=media` as a query parameter to stream the binary PDF bytes. Without `alt=media`, a JSON response is returned.",
          "supportsMediaDownload": true,
          "useMediaDownloadService": true,
          "id": "deepreview.media.download",
          "path": "v1/{+name}:download",
          "response": {
            "$ref": "DownloadDocumentResponse"
          },
          "flatPath": "v1/documents/{documentsId}:download",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^documents/[^/]+$",
              "description": "Required. The resource name of the document to download.",
              "location": "path",
              "required": true
            }
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ]
        },
        "upload": {
          "flatPath": "v1/documents",
          "request": {
            "$ref": "Document"
          },
          "supportsMediaUpload": true,
          "path": "v1/documents",
          "response": {
            "$ref": "Document"
          },
          "parameterOrder": [],
          "httpMethod": "POST",
          "parameters": {
            "requestId": {
              "type": "string",
              "description": "Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string.",
              "location": "query"
            },
            "documentId": {
              "location": "query",
              "type": "string",
              "description": "Optional. The ID to use for the document, which will become the final component of the document's resource name. If not provided, a unique server-generated UUID will be assigned."
            }
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "id": "deepreview.media.upload",
          "mediaUpload": {
            "maxSize": "20971520",
            "accept": [
              "*/*"
            ],
            "protocols": {
              "simple": {
                "path": "/upload/v1/documents",
                "multipart": true
              },
              "resumable": {
                "path": "/resumable/upload/v1/documents",
                "multipart": true
              }
            }
          },
          "description": "Creates a new Document resource and ingests the manuscript using media upload or Google Drive."
        }
      }
    },
    "documents": {
      "methods": {
        "delete": {
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "location": "path",
              "required": true,
              "pattern": "^documents/[^/]+$",
              "type": "string",
              "description": "Required. The resource name of the document to delete."
            },
            "allowMissing": {
              "type": "boolean",
              "location": "query",
              "description": "Optional. If set to `true`, and the document is not found, the request succeeds."
            },
            "force": {
              "type": "boolean",
              "location": "query",
              "description": "Optional. If set to `true`, any child resources (e.g. review resources) are also deleted. If `false` and the document has existing reviews, the request fails with `FAILED_PRECONDITION`."
            }
          },
          "flatPath": "v1/documents/{documentsId}",
          "description": "Deletes a document and its stored content. If `force` is set to `true`, any associated reviews are also deleted.",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "response": {
            "$ref": "Empty"
          },
          "id": "deepreview.documents.delete",
          "parameterOrder": [
            "name"
          ],
          "path": "v1/{+name}"
        },
        "get": {
          "id": "deepreview.documents.get",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "flatPath": "v1/documents/{documentsId}",
          "description": "Retrieves document metadata. The returned document includes its `latest_review_summary` when a review exists.",
          "response": {
            "$ref": "Document"
          },
          "path": "v1/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "pattern": "^documents/[^/]+$",
              "description": "Required. The resource name of the document to retrieve.",
              "required": true,
              "location": "path",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ]
        },
        "estimateReviewCost": {
          "id": "deepreview.documents.estimateReviewCost",
          "response": {
            "$ref": "EstimateReviewCostResponse"
          },
          "httpMethod": "POST",
          "parameters": {
            "document": {
              "description": "Required. The document to review.",
              "required": true,
              "location": "path",
              "pattern": "^documents/[^/]+$",
              "type": "string"
            }
          },
          "flatPath": "v1/documents/{documentsId}:estimateReviewCost",
          "request": {
            "$ref": "EstimateReviewCostRequest"
          },
          "description": "Estimates what a review of a document would cost and how long it will take on the caller's Gemini API key. The USD cost range comes from what comparable past reviews with the same model, depth, and thinking level cost, adjusted to this document's size, repriced at the Gemini API's current list prices, and including explicit context cache creation and storage fees when supported. It covers one review run to completion and doesn't include retries after errors. Structural guidance (document token count, estimated model calls, explicit context caching support, and tier-split turnaround durations) is populated whenever the document can be measured, even when too few comparable past reviews exist to compute USD cost percentiles.",
          "parameterOrder": [
            "document"
          ],
          "path": "v1/{+document}:estimateReviewCost",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ]
        },
        "list": {
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "description": "Lists documents for the authenticated caller with cursor pagination. Each returned document includes its `latest_review_summary` when a review exists.",
          "id": "deepreview.documents.list",
          "response": {
            "$ref": "ListDocumentsResponse"
          },
          "httpMethod": "GET",
          "parameters": {
            "pageSize": {
              "type": "integer",
              "location": "query",
              "description": "Optional. The maximum number of documents to return in a single page. The server may return fewer than this value. If unspecified, at most 50 documents will be returned. The maximum value is 100; values above 100 will be coerced to 100.",
              "format": "int32"
            },
            "pageToken": {
              "description": "Optional. A page token received from a previous `ListDocuments` call.",
              "type": "string",
              "location": "query"
            },
            "filter": {
              "description": "Optional. Custom filter expressions are not currently supported; non-empty values return INVALID_ARGUMENT.",
              "location": "query",
              "type": "string"
            },
            "orderBy": {
              "location": "query",
              "type": "string",
              "description": "Optional. Custom order_by expressions are not currently supported; non-empty values return INVALID_ARGUMENT."
            }
          },
          "flatPath": "v1/documents",
          "parameterOrder": [],
          "path": "v1/documents"
        }
      },
      "resources": {
        "reviews": {
          "methods": {
            "create": {
              "parameterOrder": [
                "parent"
              ],
              "path": "v1/{+parent}/reviews",
              "response": {
                "$ref": "Operation"
              },
              "httpMethod": "POST",
              "parameters": {
                "requestId": {
                  "description": "Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string.",
                  "location": "query",
                  "type": "string"
                },
                "reviewId": {
                  "description": "Optional. The ID to use for the review, which will become the final component of the review's resource name. If not provided, a unique server-generated UUID will be assigned.",
                  "location": "query",
                  "type": "string"
                },
                "parent": {
                  "type": "string",
                  "location": "path",
                  "required": true,
                  "description": "Required. The parent Document resource name where this review will be created.",
                  "pattern": "^documents/[^/]+$"
                }
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "flatPath": "v1/documents/{documentsId}/reviews",
              "id": "deepreview.documents.reviews.create",
              "request": {
                "$ref": "Review"
              },
              "description": "Creates and initiates an asynchronous multi-agent review for a document. Returns a google.longrunning.Operation. When the operation completes, the `response` field contains a `Review` and the `metadata` field contains `CreateReviewMetadata`."
            },
            "get": {
              "parameterOrder": [
                "name"
              ],
              "path": "v1/{+name}",
              "response": {
                "$ref": "Review"
              },
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "pattern": "^documents/[^/]+/reviews/[^/]+$",
                  "type": "string",
                  "description": "Required. The resource name of the review to retrieve.",
                  "required": true,
                  "location": "path"
                }
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "description": "Retrieves a specific review execution result.",
              "flatPath": "v1/documents/{documentsId}/reviews/{reviewsId}",
              "id": "deepreview.documents.reviews.get"
            },
            "list": {
              "response": {
                "$ref": "ListReviewsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ],
              "parameterOrder": [
                "parent"
              ],
              "path": "v1/{+parent}/reviews",
              "flatPath": "v1/documents/{documentsId}/reviews",
              "id": "deepreview.documents.reviews.list",
              "description": "Lists all review execution runs for a document.",
              "httpMethod": "GET",
              "parameters": {
                "pageToken": {
                  "type": "string",
                  "location": "query",
                  "description": "Optional. A page token received from a previous `ListReviews` call."
                },
                "orderBy": {
                  "location": "query",
                  "type": "string",
                  "description": "Optional. Custom order_by expressions are not currently supported; non-empty values return INVALID_ARGUMENT."
                },
                "parent": {
                  "type": "string",
                  "description": "Required. The parent Document resource name.",
                  "location": "path",
                  "pattern": "^documents/[^/]+$",
                  "required": true
                },
                "filter": {
                  "type": "string",
                  "location": "query",
                  "description": "Optional. Custom filter expressions are not currently supported; non-empty values return INVALID_ARGUMENT."
                },
                "pageSize": {
                  "type": "integer",
                  "location": "query",
                  "format": "int32",
                  "description": "Optional. The maximum number of reviews to return in a single page. The server may return fewer than this value. If unspecified, at most 50 reviews will be returned. The maximum value is 100; values above 100 will be coerced to 100."
                }
              }
            }
          }
        }
      }
    },
    "v1": {
      "methods": {
        "getUserQuota": {
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "parameterOrder": [
            "name"
          ],
          "description": "Retrieves the review quota limits and sliding-window usage for the authenticated caller.",
          "id": "deepreview.getUserQuota",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^userQuota$",
              "description": "Required. The resource name of the singleton user quota to retrieve.",
              "required": true,
              "location": "path"
            }
          },
          "response": {
            "$ref": "UserQuota"
          },
          "flatPath": "v1/userQuota",
          "path": "v1/{+name}"
        }
      }
    },
    "operations": {
      "resources": {
        "documents": {
          "resources": {
            "reviews": {
              "methods": {
                "get": {
                  "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "location": "path",
                      "pattern": "^operations/documents/[^/]+/reviews/[^/]+$",
                      "required": true,
                      "description": "The name of the operation resource.",
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "scopes": [
                    "https://www.googleapis.com/auth/cloud-platform"
                  ],
                  "path": "v1/{+name}",
                  "response": {
                    "$ref": "Operation"
                  },
                  "flatPath": "v1/operations/documents/{documentsId}/reviews/{reviewsId}",
                  "id": "deepreview.operations.documents.reviews.get"
                }
              }
            }
          }
        }
      }
    }
  },
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "mtlsRootUrl": "https://deepreview.mtls.googleapis.com/",
  "description": "Deep Review API for automated, in-depth document reviews.",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "id": "deepreview:v1",
  "batchPath": "batch",
  "kind": "discovery#restDescription",
  "servicePath": "",
  "version": "v1",
  "revision": "20261203",
  "title": "Deep Review API",
  "ownerDomain": "google.com",
  "parameters": {
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "alt": {
      "location": "query",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "description": "Data format for response.",
      "type": "string",
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string",
      "location": "query"
    },
    "quotaUser": {
      "location": "query",
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "key": {
      "location": "query",
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "prettyPrint": {
      "default": "true",
      "type": "boolean",
      "location": "query",
      "description": "Returns response with indentations and line breaks."
    }
  },
  "version_module": true,
  "protocol": "rest",
  "ownerName": "Google",
  "baseUrl": "https://deepreview.googleapis.com/",
  "canonicalName": "DeepReview"
}
