{"id":41952217,"url":"https://github.com/modzy/sdk-go","last_synced_at":"2026-01-25T21:33:33.293Z","repository":{"id":45444567,"uuid":"386400811","full_name":"modzy/sdk-go","owner":"modzy","description":"The Golang library for Modzy Machine Learning Operations (MLOps) Platform","archived":false,"fork":false,"pushed_at":"2021-12-14T15:28:07.000Z","size":13946,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T18:08:04.884Z","etag":null,"topics":["ai-security","api-client","api-client-go","docker","drift-detection","explainable-ai","golang","kubernetes","machine-learning-operations","microservices","mlops","model-serving","production-machine-learning","serving"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.adoc","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-15T19:19:38.000Z","updated_at":"2024-06-13T16:03:33.000Z","dependencies_parsed_at":"2022-09-10T02:22:22.622Z","dependency_job_id":null,"html_url":"https://github.com/modzy/sdk-go","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/modzy/sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modzy","download_url":"https://codeload.github.com/modzy/sdk-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28759411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-security","api-client","api-client-go","docker","drift-detection","explainable-ai","golang","kubernetes","machine-learning-operations","microservices","mlops","model-serving","production-machine-learning","serving"],"created_at":"2026-01-25T21:33:32.317Z","updated_at":"2026-01-25T21:33:33.285Z","avatar_url":"https://github.com/modzy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modzy Golang SDK\n\n![Modzy Logo](https://www.modzy.com/wp-content/uploads/2020/06/MODZY-RGB-POS.png)\n\n\u003cdiv align=\"center\"\u003e\n\n**Modzy's Golang SDK queries models, submits inference jobs, and returns results directly to your editor.**\n\n\n![GitHub contributors](https://img.shields.io/github/contributors/modzy/sdk-go)\n![GitHub last commit](https://img.shields.io/github/last-commit/modzy/sdk-go)\n![GitHub Release Date](https://img.shields.io/github/issues-raw/modzy/sdk-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/modzy/sdk-go)](https://goreportcard.com/report/github.com/modzy/sdk-go)\n\n[The job lifecycle](https://docs.modzy.com/reference/the-job-lifecycle) | [API Keys](https://docs.modzy.com/reference/api-keys-1) | [Samples](https://github.com/modzy/sdk-go/tree/main/samples) | [Documentation](https://docs.modzy.com/docs)\n\n\u003c/div\u003e\n\n## Installation\n\nAdd the dependency\n\n```bash\ngo get -u github.com/modzy/sdk-go\n```\n\n\n### Get your API key\n\n\n\nAPI keys are security credentials required to perform API requests to Modzy. Our API keys are composed of an ID that is split by a dot into two parts: a public and private part.\n\nThe *public* part is the API keys' visible part only used to identify the key and by itself, it’s unable to perform API requests.\n\nThe *private* part is the public part's complement and it’s required to perform API requests. Since it’s not stored on Modzy’s servers, it cannot be recovered. Make sure to save it securely. If lost, you can [replace the API key](https://docs.modzy.com/reference/update-a-keys-body).\n\n\nFind your API key in your user profile. To get your full API key click on \"Get key\":\n\n\u003cimg src=\"key.png\" alt=\"get key\" width=\"10%\"/\u003e\n\n\n\n## Initialize\n\nOnce you have a `model` and `version` identified, get authenticated with your API key.\n\n```go\nclient := modzy.NewClient(\"http://url.to.modzy/api\").WithAPIKey(\"API Key\")\n```\n\n## Basic usage\n\n### Browse models\n\nModzy’s Marketplace includes pre-trained and re-trainable AI models from industry-leading machine learning companies, accelerating the process from data to value.\n\nThe Model service drives the Marketplace and can be integrated with other applications, scripts, and systems. It provides routes to list, search, and filter model and model-version details.\n\n[List models](https://docs.modzy.com/reference/list-models):\n\n```go\nout, err := client.Models().ListModels(ctx, input)\nif err != nil {\n\treturn err\n}\nfor _, modelSummary := range out.Models {\n\tfmt.Println(\"Model: \", modelSummary)\n}\n```\n\nTags help categorize and filter models. They make model browsing easier.\n\n[List tags](https://docs.modzy.com/reference/list-tags):\n\n```go\nout, err := client.Models().GetTags(ctx)\nif err != nil {\n    return err\n}\nfor _, tag := range out.Tags {\n    fmt.Println(\"Tag: \", tag)\n}\n```\n\n[List models by tag](https://docs.modzy.com/reference/list-models-by-tag):\n\n```go\nout, err := client.Models().GetTagModels(ctx)\nif err != nil {\n    return err\n}\nfor _, model := range out.Models {\n    fmt.Println(\"Model: \", model)\n}\n```\n\n### Get a model's details\n\nModels accept specific *input file [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) types*. Some models may require multiple input file types to run data accordingly. In this sample, we use a model that requires `text/plain`.\n\nModels require inputs to have a specific *input name* declared in the job request. This name can be found in the model’s details. In this sample, we use a model that requires `input.txt`.\n\nAdditionally, users can set their own input names. When multiple input items are processed in a job, these names are helpful to identify and get each input’s results. In this sample, we use a model that requires `input-1` and `input-2`.\n\n[Get a model's details](https://docs.modzy.com/reference/list-model-details):\n\n```go\nout, err := client.Models().GetModelDetails(ctx, \u0026modzy.GetModelDetailsInput{ModelID: \"ed542963de\"})\nif err != nil {\n    return err\n}\nfmt.Println(\"Model: \", out.Details)\n```\n\nModel specific sample requests are available in the version details and in the Model Details page.\n\n[Get version details](https://docs.modzy.com/reference/get-version-details):\n\n```go\nout, err := client.Models().GetModelVersionDetails(ctx, \u0026modzy.GetModelVersionDetailsInput{ModelID: \"ed542963de\", Version: \"0.0.27\"})\nif err != nil {\n    return err\n}\n// then you'll get all the details about the specific model version\nfmt.Printf(\"ModelVersion Details %s\\n\", out.Details)\n// Probably the more interesting are the ones related with the inputs and outputs of the model\nfmt.Println(\"  inputs:\")\nfor _, input := range out.Details.Inputs {\n    fmt.Printf(\n        \"    key %s, type %s, description: %s\\n\", input.Name, input.AcceptedMediaTypes, input.Description\n    )\n}\nfmt.Println(\"  outputs:\")\nfor _, output := range out.Details.Outputs {\n    fmt.Printf(\n        \"    key %s, type %s, description: %s\\n\", output.Name, output.MediaType, output.Description\n    )\n}\n```\n\n### Submit a job and get results\n\nA *job* is the process that sends data to a model, sets the model to run the data, and returns results.\n\nModzy supports several *input types* such as `text`, `embedded` for Base64 strings, `aws-s3` and `aws-s3-folder` for inputs hosted in buckets, and `jdbc` for inputs stored in databases. In this sample, we use `text`.\n\n[Here](https://github.com/modzy/sdk-go/blob/main/samples.adoc) are samples to submit jobs with `embedded`, `aws-s3`, `aws-s3-folder`, and `jdbc` input types.\n\n[Submit a job with the model, version, and input items](https://docs.modzy.com/reference/create-a-job-1):\n\n```go\nsubmitResponse, err := client.Jobs().SubmitJobText(ctx, \u0026modzy.SubmitJobTextInput{\n    ModelIdentifier:\"ed542963de\",\n    ModelVersion:\"0.0.27\",\n    Inputs:map[string]string{\n        \"my-input\": {\n            \"input.txt\": \"Modzy is great!\"\n        }\n    }\n})\n```\n\n[Hold until the inference is complete and results become available](https://docs.modzy.com/reference/get-job-details):\n\n```go\njobDetails, err := submitResponse.WaitForCompletion(ctx, 20*time.Second)\n```\n\n[Get the results](https://docs.modzy.com/reference/get-results):\n\nResults are available per input item and can be identified with the name provided for each input item upon job request. You can also add an input name to the route and limit the results to any given input item.\n\nJobs requested for multiple input items may have partial results available prior to job completion.\n\n```go\nresults, err := jobDetails.GetResults(ctx)\n```\n\n### Fetch errors\n\nErrors may arise for different reasons. Fetch errors to know what is their cause and how to fix them.\n\nError      | Description\n---------- | ---------\n`ModzyHTTPError` | Wrapper for different errors, check code, message, url attributes.\n\nSubmitting jobs:\n\n```go\nsubmitResponse, err := client.Jobs().SubmitJobText(ctx, \u0026modzy.SubmitJobTextInput{\n\tModelIdentifier=\"ed542963de\", \n\tModelVersion=\"0.0.27\", \n\tInputs=map[string]string{\n\t\t\"my-input\": {\n\t\t\t\"input.txt\": \"Modzy is great!\"\n\t\t}\n    }\n})\nif err != nil {\n    log.Fatalf(\"The job submission fails with code %s and message %s\", err.Status, err.Message)\n    return\n}\n```\n\n## Features\n\nModzy supports [batch processing](https://docs.modzy.com/reference/batch-processing), [explainability](https://docs.modzy.com/reference/explainability), and [model drift detection](https://docs.modzy.com/reference/model-drift-1).\n\n## APIs\n\nHere is a list of Modzy APIs. To see all the APIs, check our [Documentation](https://docs.modzy.com/reference/introduction).\n\n\n| Feature | Code |Api route\n| ---     | ---  | ---\n|List models|client.Models().ListModels()|[api/models](https://docs.modzy.com/reference/list-models)|\n|Get model details|client.Models().GetModelDetails()|[api/models/:model-id](https://docs.modzy.com/reference/list-model-details)|\n|List models by name|client.Models().GetModelDetailsByName()|[api/models](https://docs.modzy.com/reference/list-models)|\n|List models by tags|client.Models().GetTagsModels()|[api/models/tags/:tag-id](https://docs.modzy.com/reference/list-models-by-tag) |\n|Get related models|client.Models().GetRelatedModels()|[api/models/:model-id/related-models](https://docs.modzy.com/reference/get-related-models)|\n|Get a model's versions|client.Models().ListModelVersions()|[api/models/:model-id/versions](https://docs.modzy.com/reference/list-versions)|\n|Get version details|client.Models().GetModelVersionsDetails()|[api/models/:model-id/versions/:version-id](https://docs.modzy.com/reference/get-version-details)|\n|List tags|client.Models().ListTags()|[api/models/tags](https://docs.modzy.com/reference/list-tags)|\n|Submit a Job (Text)|client.Jobs().SubmitJobText()|[api/jobs](https://docs.modzy.com/reference/create-a-job-1)|\n|Submit a Job (Embedded)|client.Jobs().SubmitJobEmbedded()|[api/jobs](https://docs.modzy.com/reference/create-a-job-1)|\n|Submit a Job (AWS S3)|client.Jobs().SubmitJobS3()|[api/jobs](https://docs.modzy.com/reference/create-a-job-1)|\n|Submit a Job (JDBC)|client.Jobs().SubmitJobJDBC()|[api/jobs](https://docs.modzy.com/reference/create-a-job-1)|\n|Cancel a job|lient.Jobs().CancelJob()|[api/jobs/:job-id](https://docs.modzy.com/reference/cancel-a-job)  |\n|Hold until inference is complete|client.Jobs().WaitForJobCompletion()|[api/jobs/:job-id](https://docs.modzy.com/reference/get-job-details)  |\n|Get job details|client.Jobs().GetJobDetails()|[api/jobs/:job-id](https://docs.modzy.com/reference/get-job-details)  |\n|Get results|client.Jobs().getJobResults()|[api/results/:job-id](https://docs.modzy.com/reference/get-results)  |\n|List the job history|client.Jobs().GetJobsHistory()|[api/jobs/history](https://docs.modzy.com/reference/list-the-job-history)  |\n\n## Samples\n\nCheck out our [samples](https://github.com/modzy/sdk-go/tree/main/samples) for details on specific use cases.\n\nTo run samples:\n\nSet the base url and api key in each sample file:\n\n```go\n// TODO: set the base url of modzy api and you api key\nclient := modzy.NewClient(\"http://url.to.modzy/api\").WithAPIKey(\"API Key\")\n```\n\nOr follow the instructions [here](https://github.com/modzy/sdk-go/tree/main/contributing.adoc#set-environment-variables-in-bash) to learn more.\n\nAnd then, you can:\n\n```bash\n$ go run samples/models/main.go\n```\n## Contributing\n\nWe are happy to receive contributions from all of our users. Check out our [contributing file](https://github.com/modzy/sdk-go/tree/main/contributing.adoc) to learn more.\n\n## Code of conduct\n\n\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/modzy/sdk-go/tree/main/CODE_OF_CONDUCT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodzy%2Fsdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodzy%2Fsdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodzy%2Fsdk-go/lists"}