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

# Code - Go SDK

> Code type definition

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

## Example Usage

```go lines theme={null}
import (
	"github.com/OpenRouterTeam/go-sdk/models/components"
)

value := components.CodeServerError

// Open enum: custom values can be created with a direct type cast
custom := components.Code("custom_value")
```

## Values

| Name                              | Value                             |
| --------------------------------- | --------------------------------- |
| `CodeServerError`                 | server\_error                     |
| `CodeRateLimitExceeded`           | rate\_limit\_exceeded             |
| `CodeInvalidPrompt`               | invalid\_prompt                   |
| `CodeVectorStoreTimeout`          | vector\_store\_timeout            |
| `CodeInvalidImage`                | invalid\_image                    |
| `CodeInvalidImageFormat`          | invalid\_image\_format            |
| `CodeInvalidBase64Image`          | invalid\_base64\_image            |
| `CodeInvalidImageURL`             | invalid\_image\_url               |
| `CodeImageTooLarge`               | image\_too\_large                 |
| `CodeImageTooSmall`               | image\_too\_small                 |
| `CodeImageParseError`             | image\_parse\_error               |
| `CodeImageContentPolicyViolation` | image\_content\_policy\_violation |
| `CodeInvalidImageMode`            | invalid\_image\_mode              |
| `CodeImageFileTooLarge`           | image\_file\_too\_large           |
| `CodeUnsupportedImageMediaType`   | unsupported\_image\_media\_type   |
| `CodeEmptyImageFile`              | empty\_image\_file                |
| `CodeFailedToDownloadImage`       | failed\_to\_download\_image       |
| `CodeImageFileNotFound`           | image\_file\_not\_found           |
