Skip to main content
The Reducto Go SDK provides a strongly-typed interface to the Reducto API. It handles authentication, request formatting, and response parsing automatically.
The Go SDK is in alpha (v0.1.0-alpha.1). Edit and Pipeline endpoints are not yet supported. Use the REST API directly for those features.

Quick Start


Key Features

Strong Typing

Full type safety with Go’s type system and generated types for all API responses.

Context Support

All methods accept context.Context for cancellation and timeouts.

Error Handling

Standard Go error handling with detailed error types.

Concurrent Safe

Client instances are safe for concurrent use.

Installation

Requires Go 1.18+. The SDK requires no additional dependencies.

Authentication

Set your API key as an environment variable:
The SDK reads it automatically:
Get your API key from Reducto Studio → API Keys.

Core Methods

The SDK provides methods for all Reducto endpoints:

Upload

Upload documents to Reducto’s servers before processing:

Upload Documentation

File upload options, size limits, and presigned URLs.

Parse

Convert documents into structured JSON with text, tables, and figures:

Parse Documentation

Parse configuration, chunking options, and response structure.

Extract

Pull specific fields from documents using JSON schemas:

Extract Documentation

Schema design, array extraction, and citations.

Split

Divide documents into sections based on content descriptions:

Split Documentation

Split configuration and section types.

Edit & Pipeline

Edit and Pipeline endpoints are not available in the Go SDK. Use the REST API directly or the client’s Post method. See Edit and Pipeline pages for workarounds.

Async Jobs

For long-running operations, use RunJob methods to get a job ID:

Async Processing

Concurrent processing with goroutines and async job management.

Type System

The Go SDK uses a strongly-typed system with param.Field wrappers and union types:

Param Fields

All request parameters use param.Field[T] to distinguish zero values from null or omitted fields:

Union Types

Response types that can have different structures use union types. Use AsUnion() to cast:

Error Handling

The SDK uses standard Go error handling:

Error Handling Guide

Complete error handling reference with all error types.

Next Steps

1

Get your API key

Create an API key in Reducto Studio and set it as REDUCTO_API_KEY.
2

Try the quickstart

Run your first parse operation with the quickstart example.
3

Explore the methods

Check out the core methods documentation for detailed usage.