Go SDK

View as Markdown

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

$go get github.com/meshapi/meshapi-go-sdk

Authentication

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

1import "github.com/meshapi/meshapi-go-sdk"
2
3client := meshapi.New(meshapi.Config{
4 BaseURL: "https://api.meshapi.ai",
5 Token: "rsk_...",
6})

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.