For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
      • Overview
      • Chat Completions
      • Prompt Templates
      • Files & Batches
      • Embeddings
      • Image Generation
      • Responses (Reasoning)
      • Compare (Multi-model)
      • Models
      • Error Handling
LogoLogo
On this page
  • Go SDK
  • Installation
  • Authentication
  • Features
Go SDK

Go SDK

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Error Handling

Next

Chat Completions

Built with

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.