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

# InputUnion - Go SDK

> InputUnion type definition

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

The input to the generation — either a prompt string or an array of messages

## Supported Types

### Input1

```go lines theme={null}
inputUnion := components.CreateInputUnionInput1(components.Input1{/* values here */})
```

### Input2

```go lines theme={null}
inputUnion := components.CreateInputUnionInput2(components.Input2{/* values here */})
```

## Union Discrimination

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

```go lines theme={null}
switch inputUnion.Type {
	case components.InputUnionTypeInput1:
		// inputUnion.Input1 is populated
	case components.InputUnionTypeInput2:
		// inputUnion.Input2 is populated
}
```
