# Image

## Process images

> Compress, resize, rotate, or convert images between formats (HEIC, PNG, JPG, WebP, AVIF).

```json
{"openapi":"3.0.3","info":{"title":"MiOffice API","version":"1.0.0"},"servers":[{"url":"https://mioffice.ai","description":"Production"}],"paths":{"/api/image-process":{"post":{"operationId":"processImage","summary":"Process images","description":"Compress, resize, rotate, or convert images between formats (HEIC, PNG, JPG, WebP, AVIF).","tags":["Image"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","action"],"properties":{"file":{"type":"string","format":"binary","description":"Image file to process"},"action":{"type":"string","enum":["heicToJpg","heicToPng","compress","resize","rotate","convert","webpToPng","webpToJpg","pngToWebp","jpgToWebp","compressWebp","avifToJpg"],"description":"Image operation to perform"},"options":{"type":"string","description":"JSON string. Resize: {\"width\":800,\"height\":600,\"fit\":\"contain\",\"quality\":0.9}. Rotate: {\"angle\":90}. Compress: {\"quality\":0.85,\"format\":\"jpeg\"}"}}}}}},"responses":{"200":{"description":"Processed image file","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"202":{"description":"Job queued for async processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedJob"}}}},"400":{"description":"Invalid action, missing file, or non-image file"},"413":{"description":"File exceeds 25MB limit"},"429":{"description":"Rate limit exceeded or queue full"}}}}},"components":{"schemas":{"QueuedJob":{"type":"object","properties":{"jobId":{"type":"string","description":"Unique job identifier"},"jobToken":{"type":"string","description":"Authorization token for this job"},"position":{"type":"integer","description":"Current position in queue"},"estimatedWaitMs":{"type":"integer","description":"Estimated wait time in milliseconds"},"pollUrl":{"type":"string","description":"URL to poll for job status"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mioffice.ai/image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
