Data & analysis

go-opik

Try it

Unofficial Go client for the Opik REST API, generated with oapi-codegen from the specification Comet publishes. Package opik (github.com/psyb0t/go-opik) has typed methods for projects, traces, spans, datasets, experiments, prompts, feedback scores, annotation queues and the other published endpoints. Use when Go code needs Opik LLM observability data or already imports go-opik.

What it does

Unofficial, typed Go client for the Opik REST API, in package at the module root.

The skill document

go-opik

Unofficial, typed Go client for the Opik REST API, in package opik at the module root.

For installation, operations, pagination and response fields, see references/setup.md.

Security & safety

  • Read the API key from OPIK_API_KEY and workspace from OPIK_WORKSPACE. Never hardcode, commit or log credentials or request headers.
  • Cloud requests use https://www.comet.com/opik/api. Put the bare key in Authorization, without a Bearer prefix, and the workspace in Comet-Workspace.
  • Use a self-hosted server only when the user selected its URL. Its authentication policy may differ.
  • Trace and span payloads can contain prompts, model output and other sensitive data. Send, update or delete data only for the action the user requested.

When to use

  • Go code needs to ingest or query Opik traces and spans.
  • Go code needs Opik projects, datasets, experiments, prompts or evaluation feedback.
  • The project already imports github.com/psyb0t/go-opik.

When NOT to use

  • The code is not Go. This module ships a Go package.
  • You need a client maintained by Comet. This module is unofficial.
  • You want to modify generated code. Read the repository's AGENTS.md.

Usage

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

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

auth := opik.WithRequestEditorFn(
	func(_ context.Context, req *http.Request) error {
		req.Header.Set("Authorization", os.Getenv("OPIK_API_KEY"))
		req.Header.Set("Comet-Workspace", os.Getenv("OPIK_WORKSPACE"))

		return nil
	},
)

client, err := opik.NewClientWithResponses(
	"https://www.comet.com/opik/api",
	auth,
)
if err != nil {
	panic(err)
}

res, err := client.FindProjectsWithResponse(
	context.Background(),
	&opik.FindProjectsParams{},
)
if err != nil {
	panic(err)
}

_ = res.JSON200

Check StatusCode() and the decoded response field before reading it. The Go error covers transport and decoding failures; an HTTP error status does not produce a Go error by itself. Optional response fields can be nil.

The spec describes cloud auth in prose and declares no security scheme. Install the request editor explicitly. Base URLs include /api, while the main resource paths start with /v1/private/ and OAuth paths use /oauth/.

Related skills

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

by johnpatternai22 installs8 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

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

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