Quick start

Get your first file uploaded to Walrus through Tuskr in under 5 minutes.

Step 1: Install the SDK

Install the Tuskr SDK using your preferred package manager.

npm install @tuskr/sdk

Step 2: Initialize the client

Create a new Tuskr client instance with your API key. You can get your API key from the dashboard.

import { Tuskr } from '@tuskr/sdk'
 
const client = new Tuskr({ apiKey: 'tsk_live_xxxx' })

Step 3: Upload a file

Upload a file to Walrus with optional tags and categories for organization.

const result = await client.upload(file, {
tag: 'avatar',
category: 'images'
})
 
console.log(result.url) // https://cdn.tuskr.dev/abc123

Step 4: Query your files

List and filter your uploaded files using tags, categories, and pagination.

const files = await client.list({
tag: 'avatar',
limit: 20
})

Next steps