Install
openclaw skills install @psyb0t/go-zeroentropyUnofficial Go client for the ZeroEntropy retrieval API, generated with oapi-codegen from the full public OpenAPI spec. Package zeroentropy (github.com/psyb0t/go-zeroentropy) provides typed ...WithResponse methods on ClientWithResponses for collections, documents, top-documents, top-pages and top-snippets retrieval queries, reranking, embeddings, indexing status, usage and administration, with a bearer API key set through WithRequestEditorFn. Use when Go code needs ZeroEntropy search, reranking or embeddings, or a project already imports go-zeroentropy.
openclaw skills install @psyb0t/go-zeroentropyUnofficial, typed Go client for the ZeroEntropy API, in package zeroentropy at the module root.
Read references/setup.md before choosing methods or writing requests. It lists authentication, all operations, pagination and response pitfalls.
ZEROENTROPY_API_KEY. The request editor sets Authorization: Bearer <key>. Never hardcode, commit or log the key, authorization header or document download tokens.https://api.zeroentropy.dev/v1 or https://eu-api.zeroentropy.dev/v1. Select the region that holds the user's data. Keep /v1 in the base URL.httptest server for tests. Do not send test documents or keys to the live service.github.com/psyb0t/go-zeroentropy.AGENTS.md instead.The usage below covers one call. Every operation in the spec has a generated method, and the spec's descriptions are on them as Go doc comments. Look names and fields up instead of guessing. After go get github.com/psyb0t/go-zeroentropy, from inside your module:
go doc github.com/psyb0t/go-zeroentropy ClientWithResponsesInterface # every endpoint method
go doc github.com/psyb0t/go-zeroentropy TopDocumentsRequest # one method, params type or model
go doc -all github.com/psyb0t/go-zeroentropy # the whole package
The same documentation is at https://pkg.go.dev/github.com/psyb0t/go-zeroentropy.
Method names come from the spec's operation IDs. <OperationId>WithResponse takes the context, then the path parameters in order, then *<OperationId>Params when the operation has query or header parameters, then the request body when it has one. The JSON200 field (or JSON201 and so on, per declared status) holds the decoded body; it is nil for any other status.
Install github.com/psyb0t/go-zeroentropy, create a ClientWithResponses with WithRequestEditorFn, and call GetCollectionListCollectionsGetCollectionListPostWithResponse with EmptyRequest{} to list collections. This is the repository's example_test.go:
import (
"context"
"net/http"
"os"
"github.com/psyb0t/go-zeroentropy"
)
auth := zeroentropy.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
req.Header.Set("Authorization", "Bearer "+os.Getenv("ZEROENTROPY_API_KEY"))
return nil
})
client, err := zeroentropy.NewClientWithResponses("https://api.zeroentropy.dev/v1", auth)
if err != nil {
return err
}
res, err := client.GetCollectionListCollectionsGetCollectionListPostWithResponse(
context.Background(),
zeroentropy.EmptyRequest{},
)
if err != nil {
return err
}
_ = res.JSON200 // *zeroentropy.GetCollectionListResponse
The error return covers transport and decoding failures. HTTP errors require inspecting StatusCode() and Body; a nil Go error does not prove success. Read JSON200.CollectionNames only after checking JSON200 for nil. Some successful calls use another status, such as 201 for a newly added document.
Method names retain the operation IDs, including their resource and HTTP verb suffixes. Most reads use POST. Scores and numeric embeddings use float64; nullable or optional fields can be pointers, while required fields can be values. Check the generated type before constructing a request.
Finish by compiling and testing the consumer's code, checking the selected host and ensuring every account mutation matches the user's request.