baseten-go

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT

README

Baseten Go SDK

Go SDK for Baseten.

⚠️ Under active development. Nothing should be considered stable at this time.

Usage

Current SDK only has barebones client. Here is usage example of the barebones underlying client:

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/basetenlabs/baseten-go/client"
	"github.com/basetenlabs/baseten-go/client/managementapi"
)

func main() {
	// Create a management client
	cl, err := client.NewManagementClient(client.ManagementClientOptions{
		APIKey: "my-api-key",
	})
	if err != nil {
		log.Fatal(err)
	}

	// List all models
	resp, err := cl.API().GetModels(context.Background(), managementapi.GetV1ModelsParams{})
	if err != nil {
		log.Fatal(err)
	}

	// Print each model name
	for _, m := range resp.Models {
		fmt.Println(m.Name)
	}
}

Directories

Path Synopsis
Package client provides Go clients for the Baseten management and inference APIs.
Package client provides Go clients for the Baseten management and inference APIs.
inferenceapi
Package inferenceapi is a generated client for the Baseten inferenceapi.
Package inferenceapi is a generated client for the Baseten inferenceapi.
managementapi
Package managementapi is a generated client for the Baseten managementapi.
Package managementapi is a generated client for the Baseten managementapi.
modelarchive
Package modelarchive builds uncompressed tar archives of model directories for upload to Baseten.
Package modelarchive builds uncompressed tar archives of model directories for upload to Baseten.
modelconfig
Package modelconfig contains generated types for Baseten model configuration (also known as Truss config).
Package modelconfig contains generated types for Baseten model configuration (also known as Truss config).
internal
require
Package require loosely mimics testify/require but keeps the dependency out of the module.
Package require loosely mimics testify/require but keeps the dependency out of the module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL