SDKs
Official SDKs wrap the REST API with typed methods and handle authentication, pagination, and error handling.
Availability: packages are being published. If the install commands below fail, the SDKs are also available from the QCK-SH GitHub org.
JavaScript / TypeScript
Section titled “JavaScript / TypeScript”Works with Node.js, Deno, Bun, and browsers.
npm install @qcksh/sdkimport { QCK } from '@qcksh/sdk';
const qck = new QCK({ apiKey: 'qck_your_api_key_here' });
// Create a link with OG metadataconst link = await qck.links.create({ url: 'https://example.com/landing', title: 'My Landing Page', description: 'Check out this page', og_image: 'https://example.com/og-banner.png', custom_alias: 'promo', tags: ['marketing'],});console.log(link.short_url);
// Upload a custom OG image (Growth tier+)const imageBuffer = await fetch('https://example.com/image.png') .then(r => r.arrayBuffer());await qck.links.uploadOgImage(link.id, imageBuffer);
// Update a link (destination URL cannot be changed)await qck.links.update(link.id, { title: 'Updated Title', tags: ['marketing', 'updated'],});
// List linksconst { data, total } = await qck.links.list({ page: 1, per_page: 20 });
// Get analyticsconst summary = await qck.analytics.summary({ days: 30 });Python
Section titled “Python”pip install qck-sdkfrom qck import QCK
qck = QCK(api_key='qck_your_api_key_here')
# Create a link with OG metadatalink = qck.links.create({ 'url': 'https://example.com/landing', 'title': 'My Landing Page', 'description': 'Check out this page', 'og_image': 'https://example.com/og-banner.png', 'tags': ['marketing'],})print(link['short_url'])
# Upload a custom OG image from file (Growth tier+)qck.links.upload_og_image(link['id'], './banner.png')
# Update a link (destination URL cannot be changed)qck.links.update(link['id'], { 'title': 'Updated Title', 'tags': ['marketing', 'updated'],})
# List linkspage = qck.links.list({'page': 1, 'per_page': 20})
# Get analyticssummary = qck.analytics.summary({'days': 30})Direct API access
Section titled “Direct API access”No SDK required. The API is a standard REST API. Use any HTTP client:
curl https://qck.sh/public-api/v1/links \ -H "X-API-Key: qck_your_api_key_here" \ -H "Content-Type: application/json"See the API Reference for all available endpoints.