> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.meshapi.ai/llms.txt.
> For full documentation content, see https://developers.meshapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.meshapi.ai/_mcp/server.

# Go SDK

> Go client for the MeshAPI AI model gateway.

# Go SDK

The MeshAPI Go SDK provides a robust, type-safe client for interacting with the MeshAPI gateway. It has zero external dependencies and requires Go 1.21+.

## Installation

```bash
go get github.com/meshapi/meshapi-go-sdk
```

## Authentication

All requests require a Mesh API key (prefixed with `rsk_`).

```go
import "github.com/meshapi/meshapi-go-sdk"

client := meshapi.New(meshapi.Config{
    BaseURL: "https://api.meshapi.ai",
    Token:   "rsk_...",
})
```

## Features

* **Type-safe**: Comprehensive types for all request and response bodies.
* **Streaming Support**: Native Go channels for SSE streaming.
* **Retries**: Automatic exponential backoff for 429 and 5xx errors.
* **Zero Dependencies**: Lightweight and easy to integrate.