n8n-nodes-remove-ac 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 remove.ac
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,41 @@
1
- # Temporary Holding Version
1
+ # n8n-nodes-remove-ac
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Official zero-dependency **[n8n](https://n8n.io)** community node for **[remove.ac](https://remove.ac)** — drop-in `/v1.0/removebg` Cloud GPU background removal ahead of the **December 1, 2026** `remove.bg` standalone site and self-serve `/v1.0/removebg` API shutdown.
4
+
5
+ - **Migration Guide (`remove.bg` → `remove.ac`):** https://remove.ac/guides/n8n-make-shopify-background-removal-api
6
+ - **API Keys & 10 Full-Resolution Welcome Credits (Valid 30 Days):** https://remove.ac/api-info
7
+ - **Free On-Device Browser WASM Workbench (50-Image Batch ZIP):** https://remove.ac
8
+
9
+ ---
10
+
11
+ ## Why Use `n8n-nodes-remove-ac`?
12
+
13
+ 1. **Drop-In Replacement for Deprecated `Remove.bg` Workflows:** Accepts upstream n8n binary items (`data`) or public image URLs, supports custom background image binaries (`bgImageBinaryProperty` / `bg_image_file`) or URLs (`bgImageUrl`), and outputs ready-to-upload cutout binaries (`Auto`, `PNG`, `WebP`, `JPG`, `ZIP`) plus `X-Foreground-*` bounding-box metadata.
14
+ 2. **Automatic `> 4 MB` Zero-Disk GPU Streaming (Up to `25 MB / 50 MP`):** Large studio product photos across `25mp`, `50mp`, `full`, and `auto` tiers automatically negotiate a 180-second single-use HMAC ticket (`POST /v1.0/removebg/ticket`) to bypass serverless payload caps without persisting source or output pixels to disk.
15
+ 3. **AI Agent Tool Ready (`usableAsTool: true`):** Works both as a standard pipeline transform node and as a callable tool inside n8n AI Agent workflows.
16
+ 4. **Zero External Runtime Dependencies & SSRF Hardened:** Built strictly on Node.js built-in primitives and n8n's `httpRequest` helper with IPv4/IPv6/NAT64/DNS private-network blocking.
17
+
18
+ ---
19
+
20
+ ## Installation in n8n
21
+
22
+ 1. Open your self-hosted or desktop n8n instance.
23
+ 2. Go to **Settings → Community Nodes → Install**.
24
+ 3. Enter **`n8n-nodes-remove-ac`**, accept the prompt, and click **Install**.
25
+ 4. Create a **remove.ac API** credential using your `rac_live_...` API key from https://remove.ac/api-info (verified email accounts receive **10 full-resolution welcome credits (valid 30 days)**; non-expiring packs start at `$9 / 10` credits, monthly plans down to `$0.158 / image`; failed or timed-out calls cost `0` credits).
26
+
27
+ ---
28
+
29
+ ## Operations
30
+
31
+ - **Remove Background (`removeBackground`)**
32
+ - **Binary Data:** Reads any upstream binary property (default `data`) up to `25 MB / 50 MP` (plus optional `bgImageBinaryProperty` or `bgImageUrl` background compositing) and writes the transparent or composited cutout binary + `json.removeAc` metadata (`creditsCharged`, `width`, `height`, `foregroundTop/Left/Width/Height`).
33
+ - **Image URL:** Sends a validated public `https://` / `http://` URL to `POST /v1.0/removebg` and outputs the cutout binary.
34
+ - **Get Account Balance (`getAccount`)**
35
+ - Queries `GET /v1.0/account` and returns `totalCredits` + full account breakdown.
36
+
37
+ ---
38
+
39
+ ## License
40
+
41
+ MIT © [remove.ac](https://remove.ac)
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
2
+
3
+ export declare class RemoveAcApi implements ICredentialType {
4
+ name: string;
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoveAcApi = void 0;
4
+
5
+ class RemoveAcApi {
6
+ constructor() {
7
+ this.name = "removeAcApi";
8
+ this.displayName = "remove.ac API";
9
+ this.documentationUrl = "https://remove.ac/api-info";
10
+ this.properties = [
11
+ {
12
+ displayName: "API Key",
13
+ name: "apiKey",
14
+ type: "string",
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ default: "",
19
+ required: true,
20
+ placeholder: "rac_live_...",
21
+ description:
22
+ "Your remove.ac API key. Verified email accounts include 10 full-resolution welcome credits (valid 30 days) at https://remove.ac/api-info.",
23
+ },
24
+ {
25
+ displayName: "Base URL",
26
+ name: "baseUrl",
27
+ type: "string",
28
+ default: "https://remove.ac",
29
+ required: true,
30
+ description: "HTTPS origin for the remove.ac API.",
31
+ },
32
+ ];
33
+ this.authenticate = {
34
+ type: "generic",
35
+ properties: {
36
+ headers: {
37
+ "X-Api-Key": "={{$credentials.apiKey}}",
38
+ },
39
+ },
40
+ };
41
+ this.test = {
42
+ request: {
43
+ baseURL:
44
+ "={{ /^https:\\/\\/[a-z0-9-]+(\\.[a-z0-9-]+)+(:[0-9]{1,5})?\\/?$/i.test(($credentials.baseUrl || 'https://remove.ac').trim()) && !/\\.(localhost|local|internal|home\\.arpa)(:[0-9]+)?\\/?$/i.test(($credentials.baseUrl || '').trim()) && !/^https:\\/\\/[0-9.]+(:[0-9]+)?\\/?$/i.test(($credentials.baseUrl || '').trim()) ? ($credentials.baseUrl || 'https://remove.ac').trim().replace(/\\/+$/, '') : 'invalid://https-public-domain-required' }}",
45
+ url: "/v1.0/account",
46
+ method: "GET",
47
+ disableFollowRedirect: true,
48
+ sendCredentialsOnCrossOriginRedirect: false,
49
+ },
50
+ };
51
+ }
52
+ }
53
+
54
+ exports.RemoveAcApi = RemoveAcApi;
@@ -0,0 +1,22 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
+
3
+ export declare function parseImageDimensions(
4
+ input: Uint8Array | ArrayBuffer
5
+ ): { width: number; height: number } | null;
6
+ export declare function isPrivateIpv4(ip: string): boolean;
7
+ export declare function isPrivateIpv6(ip: string): boolean;
8
+ export declare function validatePublicUrl(
9
+ rawUrl: string,
10
+ options?: { requireHttps?: boolean; lookupFn?: unknown }
11
+ ): Promise<URL>;
12
+ export declare function toNodeBuffer(val: unknown): Buffer | null;
13
+ export declare function formatErrorBody(rawBody: unknown): string;
14
+ export declare function normalizeShadowOptions(additional?: Record<string, unknown>): {
15
+ multipart: Record<string, string>;
16
+ json: Record<string, string | boolean>;
17
+ };
18
+
19
+ export declare class RemoveAc implements INodeType {
20
+ description: INodeTypeDescription;
21
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
22
+ }