@agentmediatools/sdk
v0.1.0
Published
JavaScript SDK for Agent Media Tools — image processing, PDF, AI generation, web tools, and 70+ API endpoints
Maintainers
Readme
Agent Media Tools — JavaScript SDK
JavaScript/TypeScript client for Agent Media Tools — image processing, PDF manipulation, AI generation, web scraping, QR codes, pastebin, and 70+ API endpoints.
Installation
npm install @agentmediatools/sdkQuick Start
Free tier — no API key needed
import { Client } from '@agentmediatools/sdk';
// or: const { Client } = require('@agentmediatools/sdk');
import fs from 'node:fs';
const client = new Client();
// 🖼️ Resize an image
const result = await client.image.resize(fs.readFileSync('photo.jpg'), {
width: 800,
format: 'webp'
});
fs.writeFileSync('photo.webp', result);
// 🔗 Generate a QR code
const qr = await client.qrcode.generate('https://example.com');
fs.writeFileSync('qrcode.png', qr);
// 🛠️ Generate a UUID
console.log(await client.dev.uuid());With API key — for premium endpoints
import { Client } from '@agentmediatools/sdk';
const client = new Client({ apiKey: 'mt_your_key_here' });
// 🌐 Scrape a web page
const content = await client.scrape('https://example.com');
console.log(content);
// 🎨 Generate an AI image
const result = await client.ai.generateImage('a serene mountain lake at sunset', {
model: 'flux',
wait: true
});
console.log(result.result.images[0].url);Namespaces
| Namespace | Description |
|-----------|-------------|
| client.image.* | Image processing — resize, convert, compress, analyze, crop, batch |
| client.pdf.* | PDF tools — merge, split, compress, rotate, toText, toImages, fromImages |
| client.ai.* | AI generation — generateImage, generateVideo, transcribe, removeBg, ocr |
| client.web.* | Web page tools — screenshot, htmlToPdf, articleExtract |
| client.intel.* | Intelligence — dnsLookup, sslCheck, ogPreview, regexTest, colorConvert |
| client.tools.* | Utilities — csvConvert, caseConvert, slugify, zipFiles, videoInfo |
| client.agent.* | Agent — identity, approvals, receipts, jobs, heartbeat, shop, provisioning |
| client.mailbox.* | Mailbox — create, post, poll, peek, claim |
| client.artifact.* | Artifact store — upload, get, raw |
| client.pastebin.* | Text pastes |
| client.qrcode.* | QR code generation |
| client.shortener.* | URL shortening |
| client.webhook.* | Webhook inboxes |
| client.jwt.* | JWT decoding |
| client.jsonTools.* | JSON formatting, validation, minification |
| client.dev.* | Developer tools — ip, uuid, password, hash, base64, units, diff |
Requirements
- Node.js 18+
node-fetch(automatically installed)
Documentation
Full API docs: https://agentmediatools.com/docs
Integration guide: https://agentmediatools.com/integrations
License
MIT
