{"id":39968520,"url":"https://github.com/s0ftik3/rayso-api","last_synced_at":"2026-01-18T22:04:44.593Z","repository":{"id":64975518,"uuid":"452383009","full_name":"s0ftik3/rayso-api","owner":"s0ftik3","description":"🎨 Ray.so API for JavaScript (Node.js). Turn your code into beautiful images.","archived":false,"fork":false,"pushed_at":"2023-02-04T18:14:58.000Z","size":933,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T20:15:50.687Z","etag":null,"topics":["api","code-highlight","ray-so","ray-so-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rayso-api","language":"JavaScript","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/s0ftik3.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-01-26T17:58:24.000Z","updated_at":"2025-08-24T08:18:48.000Z","dependencies_parsed_at":"2023-02-18T18:31:14.885Z","dependency_job_id":null,"html_url":"https://github.com/s0ftik3/rayso-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s0ftik3/rayso-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ftik3%2Frayso-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ftik3%2Frayso-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ftik3%2Frayso-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ftik3%2Frayso-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s0ftik3","download_url":"https://codeload.github.com/s0ftik3/rayso-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ftik3%2Frayso-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28552251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","code-highlight","ray-so","ray-so-api"],"created_at":"2026-01-18T22:04:41.208Z","updated_at":"2026-01-18T22:04:44.587Z","avatar_url":"https://github.com/s0ftik3.png","language":"JavaScript","readme":"# Ray.so API\n\n[![version](https://badgen.net/npm/v/rayso-api)](https://npmjs.com/package/rayso-api)\n[![downloads](https://badgen.net/npm/dm/rayso-api)](https://www.npmjs.com/package/rayso-api)\n[![author on telegram](https://img.shields.io/badge/Author%20on%20-Telegram-blue)](https://t.me/vychs)\n\n[![logotype](https://i.ibb.co/vz8DtqL/rayso-api-preview.png)](https://npmjs.com/package/rayso-api)\n\nThis is unofficial NodeJs (JavaScript) API for [ray.so](https://ray.so) that turns your code into beautiful images. Choose from a range of syntax colors, hide or show the background, and toggle between a dark and light window.\n\n## Navigation\n\n-   [Installing](#installing)\n-   [Usage](#usage)\n-   [Parameters](#parameters)\n-   [Examples](#examples)\n    -   [Default](#default-output)\n    -   [Custom](#custom-parameters)\n    -   [No Background](#output-without-background)\n-   [Themes](#themes)\n    -   [Candy](#candy)\n    -   [Crimson](#crimson)\n    -   [Falcon](#falcon)\n    -   [Meadow](#meadow)\n    -   [Midnight](#midnight)\n    -   [Raindrop](#raindrop)\n    -   [Sunset](#sunset)\n-   [Credits](#credits)\n\n## Installing\n\n```bash\n$ npm i rayso-api\n```\n\n## Usage\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({\n    // parameters, if you want to customize the output\n    // you'll find detailed info about parameters below\n})\n\nraySo\n    .cook(`console.log('Hello, World!');`)\n    .then(response =\u003e {\n        // response is image buffer\n    })\n    .catch(err =\u003e {\n        console.error(err)\n    })\n```\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo()\n```\n\n## Parameters\n\n| Parameter          | Default value      | Type             | Description                                                                                                                                    |\n|--------------------|--------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `title `           | `\"Untitled-1\"`     | String           | The title will be displayed on top of the code box.                                                                                            |\n| `theme`            | `\"breeze\"`         | String           | There are several options of how your box will look like. Available themes: breeze, candy, crimson, falcon, meadow, midnight, raindrop, sunset |\n| `background`       | `true`             | Boolean          | If disabled, it will create an image of code box only, without background.                                                                     |\n| `darkMode`         | `true`             | Boolean          | If disabled, it will change your theme to its light version.                                                                                   |\n| `padding`          | `32`               | String or Number | Distance between borders and code box. Available values: 16, 32, 64 and 128.                                                                   |\n| `language`         | `\"auto\"`           | String           | You better leave it auto :/ However, you can try to pass some language name and if it worked, good for you!                                    |\n| `localPreview`     | `false`            | Boolean          | If enabled, it will create example.png image file of the output in the current directory.                                                      |\n| `localPreviewPath` | `current directory` | String           | Path to create example files. MacOS, Linux and Windows paths supported.                                                                        |\n| `debug`            | `false`            | Boolean          | If enabled, it will show messages in the console during code execution.                                                                        |\n\n## Examples\n\n### Default output\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo()\n```\n\n[![output](https://i.ibb.co/Vv9rD4H/default.png)](https://npmjs.com/package/rayso-api)\n\n### Custom parameters\n\n```javascript\nimport RaySo, {\n    CardTheme,\n    CardPadding,\n    CardProgrammingLanguage,\n} from 'rayso-api'\nconst raySo = new RaySo({\n    title: 'Custom Title',\n    theme: CardTheme.CANDY,\n    padding: CardPadding.md,\n    language: CardProgrammingLanguage.JS,\n    debug: true,\n    localPreview: true,\n    localPreviewPath: '/Users/s0ftik3/rayso_screenshots',\n})\n```\n\n[![output](https://i.ibb.co/Px9C24J/custom.png)](https://npmjs.com/package/rayso-api)\n\n### Output without background\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ background: false })\n```\n\n[![output](https://i.ibb.co/qspMB4t/no-Background.png)](https://npmjs.com/package/rayso-api)\n\n## Themes\n\nThese are all the available themes, so far. As soon Ray.So has a new theme, it will appear here. Default theme `breeze` is not listed here, you saw it in the first picture of this README.\n\n### Candy\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'candy' })\n```\n\n[![candy](https://i.ibb.co/pQnX6pw/candy.png)](https://npmjs.com/package/rayso-api)\n\n### Crimson\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'crimson' })\n```\n\n[![crimson](https://i.ibb.co/qkYB36S/crimson.png)](https://npmjs.com/package/rayso-api)\n\n### Falcon\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'falcon' })\n```\n\n[![falcon](https://i.ibb.co/w7KdqR5/falcon.png)](https://npmjs.com/package/rayso-api)\n\n### Meadow\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'meadow' })\n```\n\n[![meadow](https://i.ibb.co/xJnMc10/meadow.png)](https://npmjs.com/package/rayso-api)\n\n### Midnight\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'midnight' })\n```\n\n[![midnight](https://i.ibb.co/4jng8Fs/midnight.png)](https://npmjs.com/package/rayso-api)\n\n### Raindrop\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'raindrop' })\n```\n\n[![raindrop](https://i.ibb.co/jbjYcVf/raindrop.png)](https://npmjs.com/package/rayso-api)\n\n### Sunset\n\n```javascript\nimport RaySo from 'rayso-api'\nconst raySo = new RaySo({ theme: 'sunset' })\n```\n\n[![sunset](https://i.ibb.co/Q8rFCVn/sunset.png)](https://npmjs.com/package/rayso-api)\n\n## Credits\n\n-   The source is [ray.so](https://ray.so) website.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0ftik3%2Frayso-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs0ftik3%2Frayso-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0ftik3%2Frayso-api/lists"}