> ## 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.

# OutputItems - Go SDK

> OutputItems type definition

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

An output item from the response

## Supported Types

### OutputApplyPatchCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsApplyPatchCall(components.OutputApplyPatchCallItem{/* values here */})
```

### OutputCodeInterpreterCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsCodeInterpreterCall(components.OutputCodeInterpreterCallItem{/* values here */})
```

### OutputComputerCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsComputerCall(components.OutputComputerCallItem{/* values here */})
```

### OutputCustomToolCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsCustomToolCall(components.OutputCustomToolCallItem{/* values here */})
```

### OutputFileSearchCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsFileSearchCall(components.OutputFileSearchCallItem{/* values here */})
```

### OutputFunctionCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsFunctionCall(components.OutputFunctionCallItem{/* values here */})
```

### OutputImageGenerationCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsImageGenerationCall(components.OutputImageGenerationCallItem{/* values here */})
```

### OutputMessageItem

```go lines theme={null}
outputItems := components.CreateOutputItemsMessage(components.OutputMessageItem{/* values here */})
```

### OutputApplyPatchServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterApplyPatch(components.OutputApplyPatchServerToolItem{/* values here */})
```

### OutputBashServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterBash(components.OutputBashServerToolItem{/* values here */})
```

### OutputBrowserUseServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterBrowserUse(components.OutputBrowserUseServerToolItem{/* values here */})
```

### OutputCodeInterpreterServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterCodeInterpreter(components.OutputCodeInterpreterServerToolItem{/* values here */})
```

### OutputDatetimeItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterDatetime(components.OutputDatetimeItem{/* values here */})
```

### OutputSearchModelsServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterExperimentalSearchModels(components.OutputSearchModelsServerToolItem{/* values here */})
```

### OutputFileSearchServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterFileSearch(components.OutputFileSearchServerToolItem{/* values here */})
```

### OutputFusionServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterFusion(components.OutputFusionServerToolItem{/* values here */})
```

### OutputImageGenerationServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterImageGeneration(components.OutputImageGenerationServerToolItem{/* values here */})
```

### OutputMcpServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterMcp(components.OutputMcpServerToolItem{/* values here */})
```

### OutputMemoryServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterMemory(components.OutputMemoryServerToolItem{/* values here */})
```

### OutputTextEditorServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterTextEditor(components.OutputTextEditorServerToolItem{/* values here */})
```

### OutputToolSearchServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterToolSearch(components.OutputToolSearchServerToolItem{/* values here */})
```

### OutputWebFetchServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterWebFetch(components.OutputWebFetchServerToolItem{/* values here */})
```

### OutputWebSearchServerToolItem

```go lines theme={null}
outputItems := components.CreateOutputItemsOpenrouterWebSearch(components.OutputWebSearchServerToolItem{/* values here */})
```

### OutputReasoningItem

```go lines theme={null}
outputItems := components.CreateOutputItemsReasoning(components.OutputReasoningItem{/* values here */})
```

### OutputWebSearchCallItem

```go lines theme={null}
outputItems := components.CreateOutputItemsWebSearchCall(components.OutputWebSearchCallItem{/* values here */})
```

## Union Discrimination

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

```go expandable lines theme={null}
switch outputItems.Type {
	case components.OutputItemsTypeApplyPatchCall:
		// outputItems.OutputApplyPatchCallItem is populated
	case components.OutputItemsTypeCodeInterpreterCall:
		// outputItems.OutputCodeInterpreterCallItem is populated
	case components.OutputItemsTypeComputerCall:
		// outputItems.OutputComputerCallItem is populated
	case components.OutputItemsTypeCustomToolCall:
		// outputItems.OutputCustomToolCallItem is populated
	case components.OutputItemsTypeFileSearchCall:
		// outputItems.OutputFileSearchCallItem is populated
	case components.OutputItemsTypeFunctionCall:
		// outputItems.OutputFunctionCallItem is populated
	case components.OutputItemsTypeImageGenerationCall:
		// outputItems.OutputImageGenerationCallItem is populated
	case components.OutputItemsTypeMessage:
		// outputItems.OutputMessageItem is populated
	case components.OutputItemsTypeOpenrouterApplyPatch:
		// outputItems.OutputApplyPatchServerToolItem is populated
	case components.OutputItemsTypeOpenrouterBash:
		// outputItems.OutputBashServerToolItem is populated
	case components.OutputItemsTypeOpenrouterBrowserUse:
		// outputItems.OutputBrowserUseServerToolItem is populated
	case components.OutputItemsTypeOpenrouterCodeInterpreter:
		// outputItems.OutputCodeInterpreterServerToolItem is populated
	case components.OutputItemsTypeOpenrouterDatetime:
		// outputItems.OutputDatetimeItem is populated
	case components.OutputItemsTypeOpenrouterExperimentalSearchModels:
		// outputItems.OutputSearchModelsServerToolItem is populated
	case components.OutputItemsTypeOpenrouterFileSearch:
		// outputItems.OutputFileSearchServerToolItem is populated
	case components.OutputItemsTypeOpenrouterFusion:
		// outputItems.OutputFusionServerToolItem is populated
	case components.OutputItemsTypeOpenrouterImageGeneration:
		// outputItems.OutputImageGenerationServerToolItem is populated
	case components.OutputItemsTypeOpenrouterMcp:
		// outputItems.OutputMcpServerToolItem is populated
	case components.OutputItemsTypeOpenrouterMemory:
		// outputItems.OutputMemoryServerToolItem is populated
	case components.OutputItemsTypeOpenrouterTextEditor:
		// outputItems.OutputTextEditorServerToolItem is populated
	case components.OutputItemsTypeOpenrouterToolSearch:
		// outputItems.OutputToolSearchServerToolItem is populated
	case components.OutputItemsTypeOpenrouterWebFetch:
		// outputItems.OutputWebFetchServerToolItem is populated
	case components.OutputItemsTypeOpenrouterWebSearch:
		// outputItems.OutputWebSearchServerToolItem is populated
	case components.OutputItemsTypeReasoning:
		// outputItems.OutputReasoningItem is populated
	case components.OutputItemsTypeWebSearchCall:
		// outputItems.OutputWebSearchCallItem is populated
	default:
		// Unknown type - use outputItems.GetUnknownRaw() for raw JSON
}
```
