image.compress
post/v1/images/compress
image.compress
Request
Body
{
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "binary",
"contentMediaType": "application/octet-stream",
"maxLength": 51200
},
"quality": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100
},
"options": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"callback_url": {
"type": [
"string",
"null"
],
"format": "uri"
},
"callback_secret": {
"type": [
"string",
"null"
],
"maxLength": 255
}
},
"required": [
"image"
],
"title": "CompressImageRequest"
}
}
}
}Responses
200No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": [
"string",
"null"
]
},
"credits_used": {
"type": "string"
}
},
"required": [
"id",
"status",
"credits_used"
]
},
"meta": {
"type": "object",
"properties": {
"request_id": {
"type": "object"
},
"timestamp": {
"type": "string"
},
"credits_used": {
"type": "string"
}
},
"required": [
"request_id",
"timestamp",
"credits_used"
]
}
},
"required": [
"success",
"data",
"meta"
]
}
403Authorization error
- Schema
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Error overview."
}
},
"required": [
"message"
]
}
422Validation error
- Schema
Schema Structure
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Errors overview."
},
"errors": {
"type": "object",
"description": "A detailed description of each field that failed validation.",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"message",
"errors"
]
}