{"id":35234391,"url":"https://github.com/modzy/sdk-javascript","last_synced_at":"2026-03-17T16:02:16.174Z","repository":{"id":42013484,"uuid":"284075045","full_name":"modzy/sdk-javascript","owner":"modzy","description":"The official JavaScript SDK for the Modzy Machine Learning Operations (MLOps) Platform.","archived":false,"fork":false,"pushed_at":"2022-09-22T13:41:03.000Z","size":1676,"stargazers_count":16,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-02T10:55:27.367Z","etag":null,"topics":["ai-security","api-client","api-rest","drift-detection","explainable-ai","javascript","kubernetes","machine-learning","machine-learning-operations","microservices","mlops","model-serving","production-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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":"CHANGES.md","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":"2020-07-31T15:59:19.000Z","updated_at":"2022-12-19T12:04:37.000Z","dependencies_parsed_at":"2023-01-18T12:00:12.761Z","dependency_job_id":null,"html_url":"https://github.com/modzy/sdk-javascript","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/modzy/sdk-javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modzy","download_url":"https://codeload.github.com/modzy/sdk-javascript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modzy%2Fsdk-javascript/sbom","scorecard":{"id":656245,"data":{"date":"2025-08-11","repo":{"name":"github.com/modzy/sdk-javascript","commit":"c5303981ad2ee4503b7aa287bf5ba47f114b6a5e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":7,"reason":"Found 8/11 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T14:43:19.222Z","repository_id":42013484,"created_at":"2025-08-21T14:43:19.222Z","updated_at":"2025-08-21T14:43:19.222Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30626906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"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-rest","drift-detection","explainable-ai","javascript","kubernetes","machine-learning","machine-learning-operations","microservices","mlops","model-serving","production-machine-learning"],"created_at":"2025-12-30T03:30:39.878Z","updated_at":"2026-03-17T16:02:16.168Z","avatar_url":"https://github.com/modzy.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n![javascript-sdk-github-banner.png](javascript-sdk-github-banner.png)\n\n![GitHub contributors](https://img.shields.io/github/contributors/modzy/sdk-javascript?logo=GitHub\u0026style=flat)\n![GitHub last commit](https://img.shields.io/github/last-commit/modzy/sdk-javascript?logo=GitHub\u0026style=flat)\n![GitHub issues](https://img.shields.io/github/issues-raw/modzy/sdk-javascript?logo=github\u0026style=flat)\n![GitHub](https://img.shields.io/github/license/modzy/sdk-javascript?logo=apache\u0026style=flat)\n\n![npm (scoped)](https://img.shields.io/npm/v/@modzy/modzy-sdk?logo=npm)\n![npm](https://img.shields.io/npm/dm/@modzy/modzy-sdk?logo=npm)\n\n**[JavaScript SDK Documentation Page](https://docs.modzy.com/docs/javascript)**\n\n\u003c/div\u003e\n\n# Installation\n\nIntall Modzy's JavaScript SDK with NPM\n\n```bash\nnpm install @modzy/modzy-sdk\n```\nor YARN\n\n```bash\nyarn add @modzy/modzy-sdk\n```\n\n# Usage/Examples\n\n## Initializing the SDK\nInitialize your client by authenticating with an API key. You can [download an API Key](https://docs.modzy.com/docs/view-and-manage-api-keys#download-team-api-key) from your instance of Modzy.\n\n```javascript\nimport { ModzyClient } from \"@modzy/modzy-sdk\";\n\nconst modzyClient = new ModzyClient({\n  apiKey: \"Valid Modzy API Key\", //e.g., \"JbFkWZMx4Ea3epIrxSgA.a2fR36fZi3sdFPoztAXT\"\n  url: \"Valid Modzy URL\", //e.g., \"https://trial.app.modzy.com\"\n});\n```\n\n## Running Inferences\n### Raw Text Inputs\nSubmit an inference job to a text-based model by providing the model ID, version, and raw input text.\n\n```javascript\n//Submit text to v1.0.1 of a Sentiment Analysis model, and to make the job explainable, change explain=True\nconst { jobIdentifier } = await modzyClient.submitJobText({\n  modelId: \"ed542963de\",\n  version: \"1.0.1\",\n  sources: {\n    firstPhoneCall: {\n      \"input.txt\": \"Mr Watson, come here. I want to see you.\",\n    },\n  },\n});\n```\n\n### File Inputs\nPass a file from your local directory to a model by providing the model ID, version, and the filepath of your sample data:\n\n```javascript\n// Submit a job to the Image-Based Geolocation model\nconst { jobIdentifier } = await modzyClient.submitJobFile({\n  modelId: \"aevbu1h3yw\",\n  version: \"1.0.1\",\n  sources: {\n    nyc-skyline: {\n      image: \"./images/nyc-skyline.jpg\",\n    },\n  },\n});\n```\n\n### Embedded Inputs\nConvert images and other large inputs to base64 embedded data and submit to a model by providing a model ID, version number, and dictionary with one or more base64 encoded inputs:\n\n```javascript\nconst fs = require('fs');\n\n//Embed input as a string in base64\nconst imageBytes = fs.readFileSync('images/tower-bridge.jpg');\n//Prepare the source dictionary\nlet sources = { \"tower-bridge\": { \"image\": imageBytes } };\n\n//Submit the image to v1.0.1 of an Imaged-based Geolocation model\nconst { jobIdentifier } = await modzyClient.submitJobEmbedded(\"aevbu1h3yw\", \"1.0.1\", \"application/octet-stream\", sources);\n```\n\n### Inputs from Databases\nSubmit data from a SQL database to a model by providing a model ID, version, a SQL query, and database connection credentials:\n\n```javascript\n//Add database connection and query information\nconst dbUrl = \"jdbc:postgresql://db.bit.io:5432/bitdotio\"\nconst dbUserName = DB_USER_NAME;\nconst dbPassword = DB_PASSWORD;\nconst dbDriver = \"org.postgresql.Driver\";\n//Select as \"input.txt\" becase that is the required input name for this model\nconst dbQuery = \"SELECT \\\"mailaddr\\\" as \\\"input.txt\\\" FROM \\\"user/demo_repo\\\".\\\"atl_parcel_attr\\\" LIMIT 10;\";\n\n//Submit the database query to v0.0.12 of a Named Entity Recognition model\nconst { jobIdentifier } = await modzyClient.submitJobJDBC(\"a92fc413b5\", \"0.0.12\", dbUrl, dbUserName, dbPassword, dbDriver, dbQuery)}\n```\n\n### Inputs from Cloud Storage\nSubmit data directly from your cloud storage bucket (Amazon S3 supported) by providing a model ID, version, and storage-blob-specific parameters.\n\n#### AWS S3\n```javascript\n//Define sources dictionary with bucket and key that points to the correct file in your s3 bucket\nconst bucketName = \"s3-bucket-name\";\nconst fileKey = \"key-to-file.txt\";\nlet sources = { \"sampleText\": { \"input.txt\": { 'bucket': bucketName, 'key': fileKey } } };\n\nconst accessKey = ACCESS_KEY_ID;\nconst secretAccessKey = SECRET_KEY;\nconst region = \"us-east-1\";\n\n//Submit s3 input to v1.0.1 of a Sentiment Analysis model\nconst { jobIdentifier } = await modzyClient.submitJobAWSS3(\"ed542963de\", \"1.0.1\", accessKey, secretAccessKey, region, sources)\n```\n\n## Getting Results\nHold until the inference is complete:\n\n```javascript\nawait modzyClient.blockUntilJobComplete(jobIdentifier);\n```\n\nGet the output results:\n\n```javascript\nconst result = await modzyClient.getResult(jobIdentifier);\n```\n\n## SDK Code Examples\n\n* [`samples`](https://github.com/modzy/sdk-javascript/tree/main/samples) provides details for specific use cases and are intended to be run using Node.js, but most can also run in the browser\n* [`react examples`](https://github.com/modzy/sdk-javascript/tree/main/samples/react%20examples) contains react components that can be used to the browser to send files to, or retrieve files from Modzy.\n \nTo run these examples, make sure to update `API_KEY` and `MODZY_URL` to valid values.\n\n## Running Tests\n\nThe Jest tests expect that there is a .env file at the root of the repo that contains a valid Modzy api key like this:\n\n```\nAPI_KEY=xxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx\n```\n\n# Documentation\n\nModzy's SDK is built on top of the [Modzy HTTP/REST API](https://docs.modzy.com/reference/introduction). For a full list of features and supported routes visit [JavaScript SDK on docs.modzy.com](https://docs.modzy.com/docs/javascript)\n\n# Support\n\nFor support, email opensource@modzy.com or join our [Slack](https://www.modzy.com/slack).\n\n# Contributing\n\nContributions are always welcome!\n\nSee [`contributing.md`](https://github.com/modzy/sdk-javascript/tree/main/contributing.adoc) for ways to get started.\n\nPlease adhere to this project's `code of conduct`.\n\nWe are happy to receive contributions from all of our users. Check out our contributing file to learn more.\n\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/modzy/sdk-javascript/tree/main/CODE_OF_CONDUCT.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodzy%2Fsdk-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodzy%2Fsdk-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodzy%2Fsdk-javascript/lists"}