Installation
Install the SDK for your language, then create an authenticated client. Pick a language tab — your choice is remembered across every page.
Install
- TypeScript
- PHP
- Python
- Rust
npm install @giveitsmaller/sdk
Requires Node.js 18+.
The SDK targets PSR-18 (HTTP client) and PSR-17 (HTTP factories) and discovers a
concrete implementation via php-http/discovery. Install it alongside any
PSR-18 client — Guzzle is the common choice:
composer require giveitsmaller/sdk guzzlehttp/guzzle http-interop/http-factory-guzzle
Requires PHP ^8.1. If you already have a PSR-18 client (e.g. Symfony HttpClient), inject it directly instead of installing Guzzle.
Coming soon — the Python SDK install guide lands with its content ticket.
Coming soon — the Rust SDK install guide lands with its content ticket.
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.
- TypeScript
- PHP
- Python
- Rust
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.
use Gisl\Sdk\Gisl;
// Explicit key:
$client = Gisl::create(apiKey: 'sk_live_...');
// Or rely on GISL_API_KEY / ~/.gisl/credentials:
$client = Gisl::create();
The key resolves from the first source that provides one: the explicit
apiKey:, then GISL_API_KEY, then the [default] profile in
~/.gisl/credentials. With no key found, Gisl::create() throws
GislMissingCredentialsError before any network call. Target a non-production
environment with Gisl::create(apiKey: 'sk_...', environment: Environment::Staging).
Coming soon.
Coming soon.
Next
Head to the Quickstart to compress your first file end to end.