Citation pills
The citationPills array flattens the inline source chips Gemini attaches to its answer into one entry per cited page, so you can read each reference without parsing the rendered chip.
Overview
Citation pills arrive as part of the standard Gemini extraction — there is no dedicated request. When you call the Gemini endpoint and Gemini decorates its answer with chain-link citation chips, cloro returns those chips as result.citationPills. The field is left out of result whenever the answer carries no pills.
Some chips point at a single page, while "section-summary" chips fold several sources behind one visible pill. cloro denormalizes both cases: every source becomes its own object. Objects that came from the same visible chip share a citationPillId, so grouping by that value reconstructs the original pill and its full set of sources. Each entry also carries its own label, url, domain, and position, letting you treat a source in isolation without walking back to the chip.
Citation pill fields
| Field | Type | Description |
|---|---|---|
label | string | The page title as shown in Gemini's sources rail, for example "Wikipedia - Quantum Computing". Always returned, but can be an empty string when the rail exposes no title — fall back to domain or url to identify the source in that case. |
citationPillId | integer | A 1-based ordinal shared by every entry that originated from the same visible chip. Group on this value to rebuild pill-level structure. |
url | string | The direct link to the cited page. |
domain | string | Host parsed from url, convenient for grouping and display. |
description | string | The snippet Gemini surfaces for the source in its rail. Omitted when no snippet is available. |
position | integer | 1-based index of this source within the sibling result.sources array. |
Response example
{
"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
}
]
}
}
Notes
The two entries above share citationPillId 1, meaning Gemini grouped both sources behind a single section-summary chip. Their position values (1 and 3) point back into result.sources, so you can cross-reference the full source record when you need more than the pill carries. If you hit an unexpected shape or a missing field, reach out at [email protected].