Skip to main content

Installation

Install the SDK for your language, then create an authenticated client. Pick a language tab — your choice is remembered across every page.

Install

npm install @giveitsmaller/sdk

Requires Node.js 18+.

Authenticate

Every request is authenticated with an API key sent as a Bearer token. Get a key from the dashboard at giveitsmaller.com. Pass it when you create the client — the SDK sets the Authorization header on every request for you. The base URL defaults to https://api.giveitsmaller.com.

import { gisl } from '@giveitsmaller/sdk';

const client = await gisl.create({ apiKey: 'REPLACE_ME_API_KEY' });

The key can also come from the GISL_API_KEY environment variable or ~/.gisl/credentials.

Next

Head to the Quickstart to compress your first file end to end.