API-key access
Generate account-scoped keys, exchange them for short-lived tokens, and keep long-lived credentials out of browser code.
DislifySearch for a command to run...
Use the REST API directly or integrate @dislify/sdk to handle authentication, signed uploads, retries, status polling, and authenticated downloads for server-side image optimization and media batches.
Official SDK
@dislify/sdk v0.2.0 provides a typed server-side client for image optimization and image, video, and audio batches. Initialize the client with your API key and let the SDK manage authentication, signed uploads, retries, polling, and authenticated downloads.
Your developer access
npm install @dislify/sdk
import { readFile } from "node:fs/promises"
import { DislifyClient } from "@dislify/sdk"
const dislify = new DislifyClient({
apiKey: process.env.DISLIFY_API_KEY,
})
const image = new Blob([await readFile("./hero.png")], {
type: "image/png",
})
console.log("Starting image optimization...")
const { shareUrl } = await dislify.optimizeImage(image, {
fileName: "hero.png",
compression: "balanced",
onProgress(job) {
console.log(`${job.status}: ${job.progress ?? 0}%`)
},
})
console.log("Completed:", shareUrl).env with node --env-file=.env app.mjs, or install dotenv and add import "dotenv/config".The SDK example uses the official @dislify/sdk package. Select Node, Python, or Ruby to view the equivalent REST API integration.
Discord bot integration
Build a Discord bot that accepts channel attachments, sends them through Dislify with the discord preset, reports live progress, and returns either the optimized output or a secure share link.
For higher-volume servers, submit jobs asynchronously and use a signed job.completed webhook to send the result back without keeping the command handler open.
Accept an image, video, or audio attachment through /compress.
Stream the attachment into the SDK and use the discord preset.
Edit the deferred Discord response while the job is processing.
Reply with the optimized file or its secure Dislify share URL.
Platform surface
Use a typed SDK, scoped access, asynchronous processing, usage controls, Discord workflows, and signed event delivery through one coherent developer platform.
Authentication
Scoped keys
Processing
Async jobs
Delivery
Files + links
Events
Signed hooks
Unified workflow
Start with a scoped credential, move media through the same job lifecycle, and choose polling, downloads, share links, or signed events for the final handoff.
Generate account-scoped keys, exchange them for short-lived tokens, and keep long-lived credentials out of browser code.
Use @dislify/sdk to optimize images and process media batches with built-in authentication, signed uploads, retries, polling, typed results, and authenticated downloads.
Submit media, receive a job ID, track processing status, and retrieve the completed result without blocking your application.
Register endpoints for job, upload, and quota events with HMAC signatures and rotatable secrets.
Track request totals, remaining quota, plan limits, and recent processing activity from the developer dashboard.
Accept slash-command attachments, compress toward Discord-friendly output, report progress, and return a file or secure share link.
Event delivery
Subscribe to completion and failure events, verify each webhook signature, and trigger the next step in your application without repeatedly checking job status.
Ready when you are
Explore the complete API reference for authentication, uploads, compression jobs, batch processing, status checks, downloads, and webhook registration.