Morphix API
Integrate image conversion, resizing, cropping and metadata removal into your applications with our REST API.
Authentication
All API requests require an API key sent via the Authorization header.
curl -X POST https://morphix.tools/api/v1/convert \
-H "Authorization: Bearer mk_live_your_api_key_here" \
-F "file=@photo.jpg" \
-F "format=webp" \
-F "quality=80"
Create an API key from your account page
Base URL
https://morphix.tools/api/v1
Endpoints
POST
/api/v1/convert
Convert an image to another format.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Image file (JPG, PNG, WebP, AVIF) |
| format | string | Yes | webp, avif, jpg, png |
| quality | int | No | 1-100 (Default: 80) |
POST
/api/v1/crop
Crop a rectangular region from an image.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Image file (JPG, PNG, WebP, AVIF) |
| x | int | Yes | Left offset in pixels |
| y | int | Yes | Top offset in pixels |
| width | int | Yes | Crop width in pixels |
| height | int | Yes | Crop height in pixels |
POST
/api/v1/resize
Resize an image to specific dimensions.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Image file (JPG, PNG, WebP, AVIF) |
| width | int | No* | 1-12000 px |
| height | int | No* | 1-12000 px |
| keep_aspect_ratio | bool | No | Default: true |
* At least one of width or height is required.
POST
/api/v1/remove-metadata
Strip EXIF, ICC and other metadata from an image.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Image file (JPG, PNG, WebP, AVIF) |
Response format
Successful responses return a JSON object with a download URL:
{
"success": true,
"data": {
"uuid": "a1b2c3d4e5f6...",
"format": "webp",
"filename": "photo.webp",
"size": 45230,
"download_url": "https://morphix.tools/download/a1b2c3.../webp/photo.webp"
}
}
Error responses include a machine-readable code:
{
"success": false,
"error": {
"code": "DAILY_LIMIT_REACHED",
"message": "Daily limit reached. 0 conversion(s) remaining today."
}
}
Error codes
| Code | HTTP | Description |
|---|---|---|
| INVALID_PARAMETERS | 422 | Missing or invalid request parameters. |
| UNSUPPORTED_FORMAT | 422 | The input file format is not supported. |
| FILE_TOO_LARGE | 422 | The file exceeds the size limit. |
| DAILY_LIMIT_REACHED | 429 | Daily conversion quota exhausted (Free plan). |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests per second (Pro plan). |
| CONVERSION_FAILED | 500 | The image processing failed. |
Rate limits
| Plan | Daily limit | Rate limit | Max file size |
|---|---|---|---|
| Free | 10 conversions/day | - | 10 MB |
| Pro | Unlimited | 10 req/s | 10 MB |
Daily quotas are shared between web and API usage.
Get started
Create your API key and start integrating Morphix into your workflow.
Create an API key