Convertors
Image and CSV conversion 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 with multipart/form-data and require X-Api-Key.
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 "[email protected]"Default response is JSON with result.downloadUrl (presigned link, 1 hour). See Calling Tools for the full envelope and download step.
Common routes:
| Path | Description |
|---|---|
/to-jpg | Convert to JPG |
/to-png | Convert to PNG |
/to-webp | Convert to WebP |
/to-svg | Convert to SVG |
/compress-image | Compress image |
/to-grayscale | Grayscale |
/image-to-pdf | Image to PDF |
/image-metadata | Read metadata (JSON, not a file URL) |
CSV / JSON
| Path | File field | Response |
|---|---|---|
/csv-2-json | csvFile | JSON in body |
/json-2-csv | jsonFile | ToolFileResponse + downloadUrl |
Query parameter
| Name | Values | Default |
|---|---|---|
delivery | url, binary | url |
See the Convertors tag in the API reference for the full list and schemas.