Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

api: add version api handler

Michael Yang0db4706ec243
diff --git a/api/client.go b/api/client.go
index 44af222cc..3751c87d5 100644
--- a/api/client.go
+++ b/api/client.go
@@ -311,3 +311,15 @@ func (c *Client) CreateBlob(ctx context.Context, digest string, r io.Reader) err
return nil
}
+
+func (c *Client) Version(ctx context.Context) (string, error) {
+ var version struct {
+ Version string `json:"version"`
+ }
+
+ if err := c.do(ctx, http.MethodGet, "/api/version", nil, &version); err != nil {
+ return "", err
+ }
+
+ return version.Version, nil
+}