{"_id":"@carve.photos/sdk","_rev":"5-a7799e50bb726a987f9ce9e1c6bb169c","name":"@carve.photos/sdk","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@carve.photos/sdk","version":"0.0.1","keywords":["background-removal","remove-background","image-processing","video-processing","carvesdk","api","sdk","background","segmentation","matting","chroma-key"],"author":{"name":"Carve.Photos","email":"contact@carve.photos"},"license":"MIT","_id":"@carve.photos/sdk@0.0.1","maintainers":[{"name":"anodev","email":"farvard34@gmail.com"}],"homepage":"https://carve.photos","bugs":{"url":"https://github.com/Carve-Photos/sdk-node/issues"},"dist":{"shasum":"be39d6435e9ab070b2b37956b9f459cf65f744f2","tarball":"https://registry.npmjs.org/@carve.photos/sdk/-/sdk-0.0.1.tgz","fileCount":5,"integrity":"sha512-O3crtER0o4+460obU1nvtKgJoovAycmCTYSnbgr1U4QGZjoSaIMiZZF1xLz6kNUX6I1hQTcRlSu4nDrVVJtywQ==","signatures":[{"sig":"MEQCICHHiOnQBjSCkHK19NA2LoQ+tN0UpN/iEe1kjysZccB4AiAcII84307rOdhMtbi+1OA/uY8cZYDfY2CXLu4uMTkOaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carve.photos%2fsdk@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14418},"main":"index.js","types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ebaaf6abbd011524b91ce75a029bc8dc9e1a3375","_npmUser":{"name":"anodev","email":"farvard34@gmail.com"},"repository":{"url":"git+https://github.com/Carve-Photos/sdk-node.git","type":"git"},"_npmVersion":"10.9.7","description":"Node.js SDK for Carve.Photos — background removal API for images and videos","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.1_1775485846740_0.18651564058791692","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@carve.photos/sdk","version":"0.1.1","keywords":["background-removal","remove-background","image-processing","video-processing","carvesdk","api","sdk","background","segmentation","matting","chroma-key"],"author":{"name":"Carve.Photos","email":"contact@carve.photos"},"license":"MIT","_id":"@carve.photos/sdk@0.1.1","maintainers":[{"name":"anodev","email":"farvard34@gmail.com"}],"homepage":"https://carve.photos","bugs":{"url":"https://github.com/Carve-Photos/sdk-node/issues"},"dist":{"shasum":"dd7a30a673390b55cff1d38d46ba96da366d547c","tarball":"https://registry.npmjs.org/@carve.photos/sdk/-/sdk-0.1.1.tgz","fileCount":5,"integrity":"sha512-aBiN0OBsJVcM9WLbfxIBbzH/+LZAJOHcnKhIlQ9D0EV6hipBkhmJv+mgdlDwZUzdVG0nwyhFMdifdaVdppIrZw==","signatures":[{"sig":"MEYCIQC7nCs27yhKxZng1pOnjVFJnOBDUMwDLpkhiX7W+dTzqwIhAIE1ZhGZZznKWs15FaZmQdTu/HO9b8Y0vPl8/mUF48un","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carve.photos%2fsdk@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14426},"main":"index.js","types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"7a2908eb92c17853a96060cfab7835e813a38533","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:542f0d6d-9ebc-48bb-ba46-1569fa396d3d"}},"repository":{"url":"git+https://github.com/Carve-Photos/sdk-node.git","type":"git"},"_npmVersion":"11.11.0","description":"Node.js SDK for Carve.Photos — background removal API for images and videos","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1775489437608_0.9516267569312677","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@carve.photos/sdk","version":"1.0.0","description":"Remove backgrounds from images and videos with AI — Carve.Photos API SDK for Node.js","main":"index.js","types":"index.d.ts","keywords":["background-removal","remove-background","remove-bg","background-remover","transparent-background","image-background-removal","image-processing","video-processing","cutout","green-screen","product-photo","ai","nodejs","api","sdk","segmentation","matting","chroma-key"],"author":{"name":"Carve.Photos","email":"contact@carve.photos"},"license":"MIT","homepage":"https://carve.photos","repository":{"type":"git","url":"git+https://github.com/Carve-Photos/sdk-node.git"},"bugs":{"url":"https://github.com/Carve-Photos/sdk-node/issues"},"engines":{"node":">=18.0.0"},"gitHead":"7b9c638e89781a658c1f3d9258735de18186554f","_id":"@carve.photos/sdk@1.0.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-jJEdWiNA7dyKYkh+ds3iTfOfrWbiosiA0Brpr4DizZXSa/n3J4eeCgOPwTS86mIiEQmNYM3Zsg+FOUwmfVDzvA==","shasum":"a58519f999cb687fff552c9205c965e2f163939b","tarball":"https://registry.npmjs.org/@carve.photos/sdk/-/sdk-1.0.0.tgz","fileCount":5,"unpackedSize":14838,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carve.photos%2fsdk@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGF+ntpide0PXX0pnm+x+RcF6BpcUX5a3zrnrKnlF6xSAiEA7nI6Z8ev49gs4IdYuK25fC+CJ43UlKZoXrEjGC+lgxE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:542f0d6d-9ebc-48bb-ba46-1569fa396d3d"}},"directories":{},"maintainers":[{"name":"anodev","email":"farvard34@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.0_1775490769671_0.45222607645903357"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-06T14:30:46.342Z","modified":"2026-04-06T15:52:50.096Z","0.1.0":"2026-04-06T14:13:57.162Z","0.0.1":"2026-04-06T14:30:46.901Z","0.1.1":"2026-04-06T15:30:37.772Z","1.0.0":"2026-04-06T15:52:49.819Z"},"bugs":{"url":"https://github.com/Carve-Photos/sdk-node/issues"},"author":{"name":"Carve.Photos","email":"contact@carve.photos"},"license":"MIT","homepage":"https://carve.photos","keywords":["background-removal","remove-background","remove-bg","background-remover","transparent-background","image-background-removal","image-processing","video-processing","cutout","green-screen","product-photo","ai","nodejs","api","sdk","segmentation","matting","chroma-key"],"repository":{"type":"git","url":"git+https://github.com/Carve-Photos/sdk-node.git"},"description":"Remove backgrounds from images and videos with AI — Carve.Photos API SDK for Node.js","maintainers":[{"name":"anodev","email":"farvard34@gmail.com"}],"readme":"# @carve.photos/sdk\n\nRemove backgrounds from images and videos with the [Carve.Photos](https://carve.photos) API. Node.js SDK with TypeScript support, zero dependencies, and automatic polling — pass a file, get the result.\n\n[![npm](https://img.shields.io/npm/v/@carve.photos%2Fsdk)](https://www.npmjs.com/package/@carve.photos/sdk)\n[![Node](https://img.shields.io/node/v/@carve.photos%2Fsdk)](https://www.npmjs.com/package/@carve.photos/sdk)\n[![License](https://img.shields.io/npm/l/@carve.photos%2Fsdk)](https://github.com/Carve-Photos/sdk-node/blob/main/LICENSE)\n[![CI](https://github.com/Carve-Photos/sdk-node/actions/workflows/ci.yml/badge.svg)](https://github.com/Carve-Photos/sdk-node/actions/workflows/ci.yml)\n\n## Installation\n\n```bash\nnpm install @carve.photos/sdk\n```\n\n## Quick Start\n\n### Remove background from image\n\n```javascript\nconst { CarveClient } = require(\"@carve.photos/sdk\");\n\nconst client = new CarveClient(\"YOUR_API_KEY\");\n\n// Simple usage\nconst result = await client.removeBackground(\"photo.jpg\");\nawait result.save(\"result.png\");\n\n// With parameters\nconst result = await client.removeBackground(\"photo.jpg\", {\n  format: \"webp\",\n  size: \"hd\",\n  bgColor: \"#FFFFFF\",\n  crop: true,\n  cropMargin: \"5%\",\n});\nawait result.save(\"result.webp\");\n```\n\n### Remove background from video\n\n```javascript\nconst { CarveClient } = require(\"@carve.photos/sdk\");\n\nconst client = new CarveClient(\"YOUR_API_KEY\");\n\n// Simple usage\nconst result = await client.removeBackgroundVideo(\"video.mp4\");\nawait result.save(\"result.mp4\");\n\n// With parameters\nconst result = await client.removeBackgroundVideo(\"video.mp4\", {\n  format: \"mp4\",\n  processingType: \"human\",\n  backgroundColor: \"#00B140\",\n  startTimeSec: 2.0,\n  endTimeSec: 8.5,\n});\nawait result.save(\"result.mp4\");\n```\n\n### Check balance\n\n```javascript\nconst balance = await client.getBalance();\nconsole.log(`Balance: ${balance.total} credits`);\n```\n\n## API Key\n\nGet your API key at [carve.photos/profile](https://carve.photos/profile?tab=api-key).  \nFree credits are included with registration.\n\n## Features\n\n- **Images**: PNG, JPEG, WebP, AVIF — up to 25 megapixels\n- **Video**: MP4, MOV, WEBM — up to 4K, 30 seconds\n- **TypeScript**: Full type definitions included\n- **Zero dependencies**: Uses native `fetch` (Node 18+)\n- **Automatic polling**: SDK handles status polling internally\n\n## Error Handling\n\n```javascript\nconst { CarveClient, CarveError } = require(\"@carve.photos/sdk\");\n\nconst client = new CarveClient(\"YOUR_API_KEY\");\n\ntry {\n  const result = await client.removeBackground(\"photo.jpg\");\n  await result.save(\"result.png\");\n} catch (error) {\n  if (error instanceof CarveError) {\n    console.error(`Error: ${error.message}`);\n    console.error(`Status: ${error.statusCode}`);\n    console.error(`Detail: ${JSON.stringify(error.detail)}`);\n  }\n}\n```\n\n## Documentation\n\n- [API Documentation](https://carve.photos/help/api-docs)\n- [Swagger](https://api.carve.photos/api/docs)\n- [Pricing](https://carve.photos/pricing)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}