---
title: "Track Gemini answers"
method: POST
path: "/v1/monitor/gemini"
---

# Track Gemini answers

`POST /v1/monitor/gemini`

## Request

- Base URL: `https://api.answerline.dev`
- URL: `https://api.answerline.dev/v1/monitor/gemini`
- Auth: HTTP bearer

Get structured output from Google Gemini for any prompt: the generated answer and the sources it cites, exportable as Markdown

## Request body

- GeminiMonitorRequest
  - `prompt` string, required: Prompt submitted to Gemini. Gemini takes up to 2,000 characters; a longer prompt is refused with a 400.
  - `country` string, required: Code of the country or region used to localize the response
  - `include` object: Flags that add extra output formats to the response (optional)
    - `markdown` boolean: Add a markdown version of the response to the result
    - `html` boolean: Not available for Gemini: its answer is read without a page to snapshot, so `true` is refused with a validation error.
    - `rawResponse` boolean: Return the answer as normalized stream events. For the engine's answer as received, use `include.rawWire`.
    - `rawWire` boolean: Return the engine's upstream answer as received in result.rawWire: the answer stream, or the provider's answer record, without the provider's billing data and account traces. Free. See https://answerline.dev/docs/output-formats#raw-wire
  - `state` string: State code for targeting below the country level (e.g., "CA"; "DC" included). Allowed only when country is "US". Served for Gemini; on a model that cannot place a state yet, a request that includes it is rejected as a validation error and is not charged.

## Response `200`

Gemini monitoring result (success)

- GeminiMonitorResponse
  - `success` boolean, required
  - `result` object, required: Data from Gemini's reply
    - `text` string: Text of Gemini's reply
    - `markdown` string: Gemini's reply as Markdown
    - `html` string: Link to the response's complete HTML; it stops working 24 hours after it is generated.
    - `sources` object[]: Sources that Gemini cited
      - `position` integer: Where the source sits in the list
      - `label` string: Title or label of the source
      - `url` string: Link to the source
      - `description` string: Snippet or description text for the source
    - `citationPills` object[]: Citation pills that appear inline in the Gemini answer. Every element pairs one chip with one source: a chip backed by N sources (Gemini's equivalent of `+N`, or a section-summary chip) yields N elements with the same `citationPillId`, each holding that source's own `label`, `url` and `domain`. Grouping by `citationPillId` rebuilds the pills. `label` is always sent; it may be an empty string if the rail gives that source no title. Not present in `result` if the answer has no pills.
      - `label` string, required: Title of this individual source as shown in the sources rail (e.g. `"Quantum computing — Wikipedia"`). The field is always sent, though it can be an empty string if the rail gives no title for it — then identify the source by `domain` / `url`.
      - `citationPillId` integer, required: One-based number common to every entry that comes from one chip. Grouping on `citationPillId` rebuilds the chip as displayed; each entry's `label` is specific to its source, so it varies inside a chip.
      - `url` string, required: Link straight to the cited source.
      - `domain` string, required: Hostname taken from `url`, useful for grouping and display.
      - `description` string: Source snippet shown in the sources rail, if Gemini supplies one; otherwise omitted.
      - `position` integer, required: Index of this source within the sibling `result.sources` array, starting at 1.
    - `places` object[]: Place cards included in lodging and local answers
      - `index` integer, required: Index of the place's position in the results
      - `title` string, required: Place name
      - `link` string, uri, required: The place's URL on Google
      - `thumbnail` string, uri: URL of a photo of the place
      - `rating` number: Rating in stars (0-5)
      - `reviews` integer: Review count
      - `type` string: Category or type of the place
      - `description` string: Brief summary of the place
      - `price` string: Per-night price exactly as Gemini shows it
    - `rawResponse` unknown[]: Unprocessed stream from the upstream provider, recorded while the request ran. Every item is a single chunk of the engine's raw response. The format varies by engine, is not documented and can change at any time without warning; use it to debug or to read data not yet exposed by the structured fields above.
      - unknown
    - `shoppingCards` object[]: Product cards Gemini shows beside a shopping-related answer, in display order. Absent when the answer has none.
      - `position` integer, required: 1-based order of the card among the answer's products.
      - `title` string, required: Product name on the card.
      - `productLink` string, uri, required: Google Shopping link for the product.
      - `productId` string, required: Google's identifier for the product.
      - `price` object: Current price on the card.
        - `value` number: The amount as a number.
        - `currency` string: ISO 4217 currency code.
        - `raw` string: The price exactly as displayed.
      - `oldPrice` object: Previous price, shown when the product is discounted.
        - `value` number: The amount as a number.
        - `currency` string: ISO 4217 currency code.
        - `raw` string: The price exactly as displayed.
      - `store` string: Store offering the shown price.
      - `storeLink` string, uri: Link to the offer at that store, when the card has one.
      - `storeCount` integer: How many stores sell the product.
      - `shipping` string: Shipping note as displayed, when present.
      - `deliveryTime` string: Delivery estimate as displayed, when present.
      - `rating` number: Average review score.
      - `reviews` integer: Number of reviews behind the rating.
      - `brand` string: Manufacturer or brand.
      - `description` string: Short product description from the card.
      - `thumbnail` string, uri: URL of the main product image.
      - `images` string[]: URLs of the product images, main image first.
      - `catalogId` string: Google Shopping catalog identifier.
      - `gpcId` string: Google product cluster identifier.

## Other responses

- `400`: Bad Request - the request failed validation
- `401`: Unauthorized - authentication failed
- `403`: Forbidden - missing permissions or not enough balance
- `404`: Not Found - No such route
- `409`: Conflict - the resource is in a conflicting state
- `429`: Too Many Requests - the request went over a rate limit or concurrency limit, or the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`); that case returns `Retry-After` without any limit headers
- `499`: Client Closed Request - the client cancelled the request
- `500`: Internal Server Error
- `502`: Bad Gateway - an upstream service failed

---

[API](https://skmtc.dev/answerline/apis/answerline-api.md) · [All operations](https://skmtc.dev/answerline/apis/answerline-api/llms.txt) · [OpenAPI document](https://skmtc.dev/answerline/apis/answerline-api/revisions/a9dc35794662?raw)
