Integrations

go-tinker

Try it

Unofficial Go client for the Thinking Machines Tinker API, generated with oapi-codegen. `tinker.NewClientWithResponses(baseURL, auth)` from `github.com/psyb0t/go-tinker` gives typed methods for every endpoint of the Tinker training API (create and unload LoRA models, forward and forward-backward passes, optimizer steps, sampling, saving and loading weights, retrieving futures, server capabilities, health). Auth is an `X-API-Key` header set in a request editor. Use when Go code needs to call the Tinker API, or the project already imports go-tinker.

What it does

Typed Go client for the Thinking Machines Tinker API. Every endpoint is a method on , and responses decode into and the other status fields.

The skill document

go-tinker

Typed Go client for the Thinking Machines Tinker API. Every endpoint is a method on *tinker.ClientWithResponses, and responses decode into JSON200 and the other status fields.

For install, the endpoint table and the futures flow in detail, see references/setup.md.

Security & safety

  • Read the API key from the TINKER_API_KEY environment variable. Never hardcode it, commit it or log it, and never print request headers.
  • Requests go only to the base URL the code passes to NewClientWithResponses. Use the default Tinker host unless the user names another one.
  • Training calls (CreateModel, ForwardBackward, OptimStep, SaveWeights) use paid compute and UnloadModel drops a model's state. Make these calls only on models the task created or the user named, and only when the user asked for them.

When to use

  • Go code needs to train or sample from a model through the Tinker API.
  • The project already imports github.com/psyb0t/go-tinker.

When NOT to use

  • The code is Python. Use Thinking Machines' official tinker package.
  • You need the official SDK's extras: token-level training loops, retries, JWT credential exchange or the futures poller. This client sends single HTTP requests and leaves those to the caller.

Usage

import (
	"context"
	"net/http"
	"os"

	"github.com/psyb0t/go-tinker"
)

auth := tinker.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
	req.Header.Set("X-API-Key", os.Getenv("TINKER_API_KEY"))

	return nil
})

client, err := tinker.NewClientWithResponses(
	"https://tinker.thinkingmachines.dev/services/tinker-prod",
	auth,
)
if err != nil {
	return err
}

caps, err := client.GetServerCapabilitiesWithResponse(ctx)
if err != nil {
	return err // transport error
}

if caps.JSON200 == nil {
	return fmt.Errorf("server capabilities: status %d: %s", caps.StatusCode(), caps.Body)
}

for _, model := range caps.JSON200.SupportedModels {
	_ = model.ModelName // *string
}

Most work calls return a future, not a result:

created, err := client.CreateModelWithResponse(ctx, tinker.CreateModelRequest{
	BaseModel:  "",
	LoraConfig: &tinker.LoraConfig{Rank: 16},
})
if err != nil {
	return err
}

if created.JSON200 == nil {
	return fmt.Errorf("create model: status %d", created.StatusCode())
}

result, err := client.RetrieveFutureWithResponse(ctx, *created.JSON200)
if err != nil {
	return err
}

if result.JSON408 != nil {
	// still running: call RetrieveFuture again later
}

if result.JSON200 != nil {
	model, err := result.JSON200.AsCreateModelResponse()
	if err != nil {
		return err
	}

	_ = model.ModelId // pass it to ForwardBackward, OptimStep, Sample and so on
}

Errors come back two ways: a non-nil err is a transport or decode failure, and an API error is a nil JSON200 with JSON400, JSON404 or another status field set (ErrorResponse with Error and Message). Always check StatusCode() or the matching field before using JSON200.

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván561 installs18 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván857 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from psyb0t

Browse all skills

Drive a user-deployed mt5-httpapi MetaTrader 5 bridge over HTTP, with per-action confirmation on every real-money call.

by psyb0t108 installs4 stars

Docker-packaged browser automation for QA against anti-bot stacks and authorized detection testing.

by psyb0t138 installs2 stars

Self-hosted OpenAI-compatible speech service — transcription, translation, and synthesis from one container.

by psyb0t13 installs

Run ffmpeg, sox, and ImageMagick jobs against your files in a fixed-allowlist SSH sandbox.

by psyb0t71 installs

Generate speech audio via Qwen3-TTS over SSH with preset voices, voice cloning, and voice design.

by psyb0t55 installs

Drive one or more IMAP/SMTP mailboxes through a single REST + MCP endpoint — read, search, send, mark-seen, and delete across accounts in parallel.

by psyb0t15 installs