Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.convertly.sh/llms.txt

Use this file to discover all available pages before exploring further.

The Convertly SDK wraps multipart uploads, sourceUrl, media tool endpoints, and async job polling.
npm install @convertly/sdk

Create a client

import { Convertly } from "@convertly/sdk";

const convertly = new Convertly({
  apiKey: process.env.CONVERTLY_API_KEY!,
});

Convert from a URL

const result = await convertly.media.convert({
  sourceUrl: "https://cdn.example.com/photo.png",
  format: "webp",
  compression: "balanced",
});
For raster-to-SVG conversion, color is preserved by default. Set mono: true only for monochrome tracing:
const svg = await convertly.media.convert({
  sourceUrl: "https://cdn.example.com/logo.png",
  format: "svg",
  mono: false,
});

Queue a video trim

const job = await convertly.media.trim({
  sourceUrl: "https://cdn.example.com/video.mp4",
  start: 12,
  duration: 8,
  format: "mp4",
  async: true,
});

const completed = await convertly.jobs.wait(job.jobId);

Media tools

The SDK includes helpers for:
  • thumbnail
  • pdfPreview
  • imageToPdf
  • stripMetadata
  • posterFrame
  • extractAudio
  • watermark
  • inspect
  • trim
  • gif
  • storyboard
  • transform
  • removeBackground
  • signedTransform
const signed = await convertly.media.signedTransform({
  sourceUrl: "https://cdn.example.com/product.jpg",
  preset: "ecommerce",
  expiresIn: 3600,
});
const cutout = await convertly.media.removeBackground({
  sourceUrl: "https://cdn.example.com/product.jpg",
  format: "png",
  model: "medium",
  async: true,
});
Raw REST API examples remain available in the API Reference for teams that prefer direct HTTP calls.