A source a model cited in its answer, as a provider reports it: where the claim came from and, when the provider says, where in the answer the inline citation sits. Provider-neutral: a provider that does not report a field leaves it None, and nothing here is invented.
Models that search the web by themselves report citations (OpenAI's Chat Completions search models - gpt-5-search-api, since the *-search-preview models were retired on 2026-07-23 - and OpenRouter's :online models, both as url_citation annotations). They arrive on Completion.citations; a completion from any other model has none.
Value parameters
- citedText
-
A passage of the source, when the provider returns one with the citation (OpenRouter's
content). It describes the source, not the answer. - endIndex
-
Where the inline citation ends; see
startIndex. - startIndex
-
Where the inline citation starts, as the provider reports it: a position in Completion.content. OpenAI documents the two indices as the first and last character "of the URL citation in the message": they locate the citation itself, and no provider documents them as the span of prose the source supports, so do not highlight the text between them as the supported claim. Whether
endIndexis inclusive is also the provider's call: check its convention before cuttingcontentwith it. - title
-
The source's title, when the provider reports one.
- url
-
The cited source's URL, exactly as the provider returned it.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any