Back to all APIs
Image Processing
PopularResize, crop, blur, sharpen, and compress images via sharp
Category: Media & FilesEndpoint:
/v1/image/processAvg Response
<50ms
Uptime SLA
99.99%
Free Tier
1,000/mo
Quick Start
JavaScript / TypeScript
javascript
import { KhaleejiAPI } from '@khaleejiapi/sdk'; const client = new KhaleejiAPI({ apiKey: 'your_api_key' }); const result = await client.documents.processImage({ image: imageBuffer, operations: { resize: { width: 800 }, format: 'webp', quality: 80 },}); // Returns ArrayBuffer of processed imagewriteFileSync('output.webp', Buffer.from(result));Python
python
from khaleejiapi import KhaleejiAPI client = KhaleejiAPI('your_api_key') result = client.documents.process_image( url='https://example.com/image.jpg', width=800, format='webp', quality=80) # Returns bytes of processed imagewith open('output.webp', 'wb') as f: f.write(result)cURL
curl
curl -X POST "https://khaleejiapi.dev/api/v1/image/process" \ -H "x-api-key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com/image.jpg","operations":{"resize":{"width":800},"format":"webp"}}' \ --output processed.webp