{"id":30523938,"url":"https://github.com/lightonai/js-lightonmuse","last_synced_at":"2025-08-26T20:52:11.709Z","repository":{"id":41575384,"uuid":"502930786","full_name":"lightonai/js-lightonmuse","owner":"lightonai","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-09T18:26:12.000Z","size":290,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-04-25T18:44:12.131Z","etag":null,"topics":["muse"],"latest_commit_sha":null,"homepage":"https://lightonai.github.io/js-lightonmuse/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightonai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-13T11:39:53.000Z","updated_at":"2022-06-22T12:19:24.000Z","dependencies_parsed_at":"2022-08-20T14:10:52.902Z","dependency_job_id":null,"html_url":"https://github.com/lightonai/js-lightonmuse","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/lightonai/js-lightonmuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightonai%2Fjs-lightonmuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightonai%2Fjs-lightonmuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightonai%2Fjs-lightonmuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightonai%2Fjs-lightonmuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightonai","download_url":"https://codeload.github.com/lightonai/js-lightonmuse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightonai%2Fjs-lightonmuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272254516,"owners_count":24901059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["muse"],"created_at":"2025-08-26T20:52:05.196Z","updated_at":"2025-08-26T20:52:11.679Z","avatar_url":"https://github.com/lightonai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://muse.lighton.ai/img/logo.ed57408e.png\" width=60/\u003e LightOn Muse JS Bindings\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Twitter](https://img.shields.io/twitter/follow/LightOnIO?style=social)](https://twitter.com/LightOnIO)\n\nJavaScript bindings for the Muse API: production-ready intelligence primitives powered by state-of-the-art language models. By LightOn.\n\n\u003e Create. Process. Understand. Learn.\n\nUplift your product with the natural language generation \u0026 understanding capabilities of Muse. State-of-the-art large language models in French, English, Italian, and Spanish—with more to come—are just an API call away. Our models can help you build conversational AI, copywriting tools, text classifiers, semantic search, and more.\n\n\u003e 🛣️ Accessing the Muse API public beta\n\u003e\n\u003e The Muse API is currently in public beta. Learn more about Muse and sign up at [muse.lighton.ai](https://muse.lighton.ai/).\n\n## Installation and documentation\n\nTo add the Muse API client to your project, run one of the following commands:\n\n```bash\nyarn add lighton-muse\n```\n\nor\n\n```bash\nnpm install lighton-muse\n```\n\nThe library documentation is available at [lightonai.github.io/js-lightonmuse/](https://lightonai.github.io/js-lightonmuse/).\nGuides and documentation can be found at the [API docs website](https://muse-docs.lighton.ai).\n\n## Examples\n\nYou can find more examples in the [repository](https://github.com/lightonai/lightonmuse/blob/master/examples/)\n\n```bash\nyarn build-examples\n# and then\nnode examples/\u003cexample-name\u003e.js\n```\n\n## Quickstart\n\nUsing `lighton-muse` is pretty simple, the interface matches the endpoints offered by the Muse API. The whole API is typed.\n\nYou can initialize the client with your token.\n\n```js\nimport { MuseRequest, ApiModel, Endpoint } from 'lighton-muse';\n\nconst client = new MuseRequest('\u003cyour-api-key\u003e');\n// or\nconst client = new MuseRequest('API_KEY', 'Your own API base URL');\n```\n\n### Create\n\n```js\nlet { error, response } = client.query(ApiModel.OrionFr, Endpoint.Create, {\n\ttext: 'Hello, world!',\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n### Select\n\n```js\nlet { error, response } = client.query(ApiModel.OrionFr, Endpoint.Select, {\n\treference: 'Quel nom est correct ?',\n\tcandidates: ['pain au chocolat', 'chocolatine'],\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n### Analyse\n\n```js\nlet { error, response } = client.query(ApiModel.OrionFr, Endpoint.Analyse, {\n\ttext: \"Avec `Analyse` on peut toujours trouver les parties plus surprenantes d'une phrase.\",\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n### Embed\n\n```js\nlet { error, response } = client.query(ApiModel.LyraEn, Endpoint.Embed, {\n\ttext: 'This sentence will be transformed in a nice matrix of numbers.',\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n### Compare\n\n```js\nlet { error, response } = client.query(ApiModel.LyraEn, Endpoint.Compare, {\n\treference: 'This is the reference.',\n\tcandidates: [\n\t\t'This is close to the reference',\n\t\t'While this is most definitely not',\n\t],\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n### Tokenize\n\n```js\nlet { error, response } = client.query(ApiModel.LyraEn, Endpoint.Tokenize, {\n\ttext: \"Let's discover how many tokens is this text\",\n});\n\nif (error) {\n\tconsole.error(error);\n} else {\n\tconsole.log(response);\n}\n```\n\n## Access to LightOn Muse\n\nAccess the public beta of LightOn Muse and try our intelligence primitives at [muse.lighton.ai](https://muse.lighton.ai/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightonai%2Fjs-lightonmuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightonai%2Fjs-lightonmuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightonai%2Fjs-lightonmuse/lists"}