{"id":41789304,"url":"https://github.com/skylab-tech/studio_client_js","last_synced_at":"2026-01-25T04:34:09.050Z","repository":{"id":44160181,"uuid":"165716379","full_name":"skylab-tech/studio_client_js","owner":"skylab-tech","description":"A JavaScript client for accessing the Skylab Studio service.","archived":false,"fork":false,"pushed_at":"2024-12-10T19:28:19.000Z","size":821,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-27T01:41:35.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/skylab-tech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-14T18:52:55.000Z","updated_at":"2023-10-19T00:21:56.000Z","dependencies_parsed_at":"2023-02-03T10:15:36.537Z","dependency_job_id":"ea339bd7-c846-4ccd-8f6a-f84ffbddd847","html_url":"https://github.com/skylab-tech/studio_client_js","commit_stats":{"total_commits":41,"total_committers":4,"mean_commits":10.25,"dds":"0.46341463414634143","last_synced_commit":"02cefacb5aede74c0121aea623b8975b174cffc4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skylab-tech/studio_client_js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skylab-tech%2Fstudio_client_js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skylab-tech%2Fstudio_client_js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skylab-tech%2Fstudio_client_js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skylab-tech%2Fstudio_client_js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skylab-tech","download_url":"https://codeload.github.com/skylab-tech/studio_client_js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skylab-tech%2Fstudio_client_js/sbom","scorecard":{"id":830638,"data":{"date":"2025-08-11","repo":{"name":"github.com/skylab-tech/studio_client_js","commit":"02cefacb5aede74c0121aea623b8975b174cffc4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/skylab-tech/studio_client_js/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/skylab-tech/studio_client_js/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/skylab-tech/studio_client_js/main.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"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":"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 24 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":3,"reason":"7 existing vulnerabilities detected","details":["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-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"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-23T17:41:28.042Z","repository_id":44160181,"created_at":"2025-08-23T17:41:28.042Z","updated_at":"2025-08-23T17:41:28.042Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28743519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T02:46:29.005Z","status":"ssl_error","status_checked_at":"2026-01-25T02:44:29.968Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-01-25T04:34:08.988Z","updated_at":"2026-01-25T04:34:09.039Z","avatar_url":"https://github.com/skylab-tech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skylab Studio JavaScript Client\n\n[studio.skylabtech.ai](https://studio.skylabtech.ai)\n\n## Installation\n\n```\nnpm install skylab-studio\n```\n\n## Example usage\n\n```javascript\n// CREATE PROFILE\nconst profilePayload = {\n  \"name\": \"profile name\",\n  \"enable_crop\": false,\n  \"enable_retouch\": true\n}\n\nconst profile = await api.createProfile(profilePayload)\n\n// CREATE JOB\nconst jobPayload = {\n  \"name\": \"job name\",\n  \"profile_id\": profile.id\n}\n\nconst job = await api.createJob(jobPayload)\n\n// UPLOAD JOB PHOTO(S)\nconst filePath = \"/path/to/photo\"\nawait api.uploadJobPhoto(filePath, job.id)\n\n// QUEUE JOB\npayload = { \"callback_url\" = \"YOUR_CALLBACK_ENDPOINT\" }\nawait api.queueJob(job.id, payload)\n\n// NOTE: Once the job is queued, it will get processed then completed\n// We will send a response to the specified callback_url with the output photo download urls\n\n// After job has been completed, either download manually or download 1 photo:\nawait api.downloadPhoto(photoId, 'path/to/output/directory')\n\n// or download all photos for a job:\n\nawait api.downloadPhotos(jobId, 'path/to/output/directory')\n```\n\n## Jobs\n\n### List all Jobs\n\n```javascript\nawait api.listJobs();\n```\n\n### Create a Job\n\n```javascript\nawait api.createJob({\n  name: \"your job name\",\n  profile_id: 123,\n});\n```\n\nFor all payload options, consult the [API documentation](https://studio-docs.skylabtech.ai/#tag/job/operation/createJob).\n\n### Get a Job\n\n```javascript\nawait api.getJob(jobId);\n```\n\n### Get Job by Name\n\n```javascript\nawait api.getJobByName(name);\n```\n\n### Update a Job\n\n```javascript\nawait api.updateJob(jobId, { name: \"updated job name\", profile_id: 456 });\n```\n\nFor all payload options, consult the [API documentation](https://studio-docs.skylabtech.ai/#tag/job/operation/updateJobById).\n\n### Queue Job\n\n```javascript\nconst payload = {\n  callback_url: \"desired_callback_url\",\n};\n\nawait api.queueJob(jobId, payload);\n```\n\n### Jobs in Front\n\n```javascript\nawait api.getJobsInFront(jobId);\n```\n\n### Delete a Job\n\n```javascript\nawait api.deleteJob(jobId);\n```\n\n### Cancel a Job\n\n```javascript\nawait api.cancelJob(jobId);\n```\n\n## Profiles\n\n### List all Profiles\n\n```javascript\nawait api.listProfiles();\n```\n\n### Create a Profile\n\n```javascript\nawait api.createProfile({\n  name: \"My Profile\",\n});\n```\n\nFor all payload options, consult the [API documentation](https://studio-docs.skylabtech.ai/#tag/profile/operation/createProfile).\n\n### Get a Profile\n\n```javascript\nawait api.getProfile(profileId);\n```\n\n### Update profile\n\n```javascript\npayload = {\n  name: \"My updated profile name\",\n};\n\nawait api.updateProfile(profileId, payload);\n```\n\nFor all payload options, consult the [API documentation](https://studio-docs.skylabtech.ai/#tag/profile/operation/updateProfileById).\n\n## Photos\n\n#### Upload Job Photo\n\nThis function handles validating a photo, creating a photo object and uploading it to your job/profile's s3 bucket. If the bucket upload process fails, it retries 3 times and if failures persist, the photo object is deleted.\n\n```javascript\nawait api.uploadJobPhoto(photoPath, jobId);\n```\n\n`Returns: { photo: { photoObject }, uploadResponse: bucketUploadResponseStatus }`\n\nIf upload fails, the photo object is deleted for you. If upload succeeds and you later decide you no longer want to include that image, use delete_photo to remove it.\n\n#### Upload Profile Photo\n\nThis function handles validating a background photo for a profile. Note: `enable_extract` and `replace_background` (profile attributes) **MUST** be true in order to create background photos. Follows the same upload process as uploadJobPhoto.\n\n```javascript\nawait api.uploadProfilePhoto(photoPath, profileId);\n```\n\n`Returns: { photo: { photoObject }, uploadResponse: bucketUploadResponseStatus }`\n\nIf upload fails, the photo object is deleted for you. If upload succeeds and you later decide you no longer want to include that image, use delete_photo to remove it.\n\n#### Download Photo\n\n```javascript\nawait api.downloadPhoto(photoId, outputDirectoryPath);\n```\n\nDownloads an individual photo to specified output directory. (preferred over manually downloading)\n\n`Returns array of ofjects, [{ status, id }]`\n\n#### Download Photos\n\n```javascript\nawait api.downloadPhotos(jobId, outputDirectoryPath);\n```\n\nDownloads all photos for a job to specified output directory. (preferred over manually downloading)\n\n`Returns array of ofjects, [{ status, id }]`\n\n### Get a Photo\n\n```javascript\nawait api.getPhoto(photoId);\n```\n\n### Delete a Photo\n\n```javascript\nawait api.deletePhoto(photoId);\n```\n\n### Validate HMAC Headers\n\n- secretKey: Obtained from Skylab account (contact)\n- jobJson: Raw JSON response from callback\n- requestTimestamp: Timestamp header received in callback under 'X-Skylab-Timestamp'\n- signature: Signature header received in callback under 'X-Skylab-Signature'\n\n**NOTE:** If using something like an express server to handle the callback, the JSON response needs to be the raw response. If your express server is running `app.use(express.json)` you will need to create a middleware and pass it to your callback handler to use the raw response: `app.use(express.raw({ type: \"application/json\" }))`\n\n```javascript\nawait api.validateHmacHeaders(secretKey, jobJson, requestTimestamp, signature);\n```\n\n## Troubleshooting\n\n### General Troubleshooting\n\n- Enable debug mode\n- Make sure you're using the latest Node client\n- Capture the response data and check your logs \u0026mdash; often this will have the exact error\n\n### Enable Debug Mode\n\nDebug mode prints out the underlying request information as well as the data payload that gets sent to Skylab.\nYou will most likely find this information in your logs. To enable it, simply put `debug=true` as a parameter\nwhen instantiating the API object.\n\n```javascript\nconst skylabStudio = require(\"skylab-studio\");\n\nconst api = skylabStudio(\"your-api-key\", (debug = true));\n```\n\n### Response Ranges\n\nSkylabTech's API typically sends responses back in these ranges:\n\n- 2xx – Successful Request\n- 4xx – Failed Request (Client error)\n- 5xx – Failed Request (Server error)\n\nIf you're receiving an error in the 400 response range follow these steps:\n\n- Double check the data and ID's getting passed to Skylab\n- Ensure your API key is correct\n- Log and check the body of the response\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskylab-tech%2Fstudio_client_js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskylab-tech%2Fstudio_client_js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskylab-tech%2Fstudio_client_js/lists"}