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

# Embedding - Go SDK

> Embedding type definition

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

Embedding vector as an array of floats or a base64 string

## Supported Types

###

```go lines theme={null}
embedding := operations.CreateEmbeddingArrayOfNumber([]float64{/* values here */})
```

###

```go lines theme={null}
embedding := operations.CreateEmbeddingStr(string{/* values here */})
```

## Union Discrimination

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

```go lines theme={null}
switch embedding.Type {
	case operations.EmbeddingTypeArrayOfNumber:
		// embedding.ArrayOfNumber is populated
	case operations.EmbeddingTypeStr:
		// embedding.Str is populated
}
```
