> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-a46887cf.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Citation - Go SDK

> Citation type definition

<Warning>
  The Go SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/go-sdk/issues).
</Warning>

## Supported Types

### AnthropicCitationCharLocationParam

```go lines theme={null}
citation := components.CreateCitationCharLocation(components.AnthropicCitationCharLocationParam{/* values here */})
```

### AnthropicCitationContentBlockLocationParam

```go lines theme={null}
citation := components.CreateCitationContentBlockLocation(components.AnthropicCitationContentBlockLocationParam{/* values here */})
```

### AnthropicCitationPageLocationParam

```go lines theme={null}
citation := components.CreateCitationPageLocation(components.AnthropicCitationPageLocationParam{/* values here */})
```

### AnthropicCitationSearchResultLocation

```go lines theme={null}
citation := components.CreateCitationSearchResultLocation(components.AnthropicCitationSearchResultLocation{/* values here */})
```

### AnthropicCitationWebSearchResultLocation

```go lines theme={null}
citation := components.CreateCitationWebSearchResultLocation(components.AnthropicCitationWebSearchResultLocation{/* values here */})
```

## Union Discrimination

Use the `Type` field to determine which variant is active, then access the corresponding field:

```go lines theme={null}
switch citation.Type {
	case components.CitationTypeCharLocation:
		// citation.AnthropicCitationCharLocationParam is populated
	case components.CitationTypeContentBlockLocation:
		// citation.AnthropicCitationContentBlockLocationParam is populated
	case components.CitationTypePageLocation:
		// citation.AnthropicCitationPageLocationParam is populated
	case components.CitationTypeSearchResultLocation:
		// citation.AnthropicCitationSearchResultLocation is populated
	case components.CitationTypeWebSearchResultLocation:
		// citation.AnthropicCitationWebSearchResultLocation is populated
}
```
