ToolYourToolYourAPI Docs

Convertors

Image, CSV, and ZIP pack/extract APIs — REST and TypeScript SDK.

TypeScript SDK

Namespace: ty.convertors. Pass file as image (or route-specific field). Full table: SDK Tool Map → Convertors.

import { ToolYour } from "@toolyour/sdk";
const ty = ToolYour({ apiKey: process.env.TOOLYOUR_API_KEY! });

await ty.convertors.convertToJpg({ image: fileBlob });
await ty.convertors.compressImage({ image: fileBlob });
await ty.convertors.csvToJson({ csvFile: fileBlob });

Base path: /api/v1/convertors

All endpoints are POST and require X-Api-Key. Image routes use multipart/form-data. ZIP pack/extract also accept JSON urls.

Image uploads

Most routes accept an image file field:

curl -X POST "https://api.toolyour.com/api/v1/convertors/to-jpg" \
  -H "X-Api-Key: $API_KEY" \
  -F "image=@photo.png"

Default response is JSON with result.downloadUrl (presigned link, 1 hour). See Calling Tools for the full envelope and download step.

Common routes:

PathDescription
/to-jpgConvert to JPG
/to-pngConvert to PNG
/to-webpConvert to WebP
/to-svgConvert to SVG
/compress-imageCompress image
/to-grayscaleGrayscale
/image-to-pdfImage to PDF
/image-metadataRead metadata (JSON, not a file URL)
/folder-to-zipPack files or urls into a ZIP (files field, up to 50)
/zip-extractExtract a ZIP (file or urls) — bundle ZIP + per-file links

ZIP pack / extract

Public pages: /file-conversion/folder-to-zip and /file-conversion/zip-extract. Same routes via REST and MCP (1 credit). Extract does not return a filesystem folder — HTTP returns download URLs.

curl -X POST "https://api.toolyour.com/api/v1/convertors/folder-to-zip" \
  -H "X-Api-Key: $API_KEY" \
  -F "files=@logo.png" \
  -F "files=@styles.css"

curl -X POST "https://api.toolyour.com/api/v1/convertors/zip-extract" \
  -H "X-Api-Key: $API_KEY" \
  -F "file=@assets.zip"

JSON URL mode (no multipart):

curl -X POST "https://api.toolyour.com/api/v1/convertors/folder-to-zip" \
  -H "X-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/logo.png"]}'
await ty.convertors.folderToZip({ files: fileBlob });
await ty.convertors.folderToZip({ urls: ["https://example.com/logo.png"] });
await ty.convertors.zipExtract({ file: zipBlob });

CSV / JSON

PathFile fieldResponse
/csv-2-jsoncsvFileJSON in body
/json-2-csvjsonFileToolFileResponse + downloadUrl

Query parameter

NameValuesDefault
deliveryurl, binaryurl

See the Convertors tag in the API reference for the full list and schemas.

On this page