> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Citation pills

> Inline citation pills returned by the Gemini endpoint, with each cited source carried as a self-contained entry alongside the visible pill chip it came from.

This section documents the **citationPills** data returned by the [Gemini endpoint](/api-reference/endpoint/monitor-gemini). Citation pills are part of the Gemini response — no separate API call is needed.

## Example request

```json theme={null}
{
  "prompt": "what is quantum computing",
  "country": "US"
}
```

This produces a response containing the `citationPills` array documented below.

## Overview

Gemini renders inline citation chips (icon-only chain-link glyphs, and "section-summary" chips that group multiple sources behind a single visible pill) next to its answer text. The `result.citationPills` array exposes those chips denormalized: each entry is one **(pill, source)** pair carrying a per-source `label` (the source's own page title), a `citationPillId` that groups entries from the same chip, and the per-source `url`/`domain`/`description`/`position`.

When a chip cites N sources (including section-summary chips), the array contains N entries sharing the same `citationPillId` but carrying different per-source `label`, `url`, and `domain`. Group by `citationPillId` to recover the pill-level structure.

The field is omitted from `result` when the answer has no pills.

## Citation pill structure

| Field            | Type    | Description                                                                                                                                                                                                                  |
| ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`          | string  | Per-source title from the sources rail (e.g. `"Wikipedia - Quantum Computing"`). Always present; may be an empty string when the rail has no title for this source — read `domain` / `url` for source identity in that case. |
| `citationPillId` | integer | 1-based ordinal shared by all entries from the same chip.                                                                                                                                                                    |
| `url`            | string  | Direct URL of the cited source.                                                                                                                                                                                              |
| `domain`         | string  | Host extracted from `url`, for grouping and display.                                                                                                                                                                         |
| `description`    | string  | Source snippet from the sources rail when Gemini ships one. Omitted when absent.                                                                                                                                             |
| `position`       | integer | 1-based position of this source in the sibling [`result.sources`](/api-reference/endpoint/gemini/sources) array.                                                                                                             |

## Response example

```json theme={null}
{
  "success": true,
  "result": {
    "text": "Quantum computing is a multidisciplinary field...",
    "sources": [
      {
        "position": 1,
        "url": "https://en.wikipedia.org/wiki/Quantum_computing",
        "label": "Wikipedia - Quantum Computing",
        "description": "Quantum computing is a multidisciplinary field..."
      },
      {
        "position": 2,
        "url": "https://www.ibm.com/quantum",
        "label": "IBM Quantum",
        "description": "IBM's quantum computing program"
      },
      {
        "position": 3,
        "url": "https://research.google.com/quantum",
        "label": "Google Quantum AI",
        "description": "Google's quantum research"
      }
    ],
    "citationPills": [
      {
        "label": "Wikipedia - Quantum Computing",
        "citationPillId": 1,
        "url": "https://en.wikipedia.org/wiki/Quantum_computing",
        "domain": "en.wikipedia.org",
        "description": "Quantum computing is a multidisciplinary field...",
        "position": 1
      },
      {
        "label": "Google Quantum AI",
        "citationPillId": 1,
        "url": "https://research.google.com/quantum",
        "domain": "research.google.com",
        "description": "Google's quantum research",
        "position": 3
      }
    ]
  }
}
```
