File Optimizer
Introduction
File optimizer function is used to optimize files for various mime type like Image
,Pdf
. It can be used to optimize
file from client and store it
to various storage platform like S3
,Digitalocean Spaces
and many others.
- Supported types are
Pdf
,jpeg
jpg
jfif
png
bmp
gif
pnm
tiff
svg
Endpoint
Post
  https://api.oyyi.xyz/v1/optimizeParameters
file REQUIRED
- Type:
File
oruuid
- UUID can be id of previous conversion so that you don't have to re-upload file to server, and it will
save network resource and timing.Max Size Allowed for file is
100MB
by default. If you need more, you ask us to increase it for you. 429 Error will be return otherwise
- Type:
Extra Parameter
Apart from these you can also all available common parameter available for media processing request. See Here
Example
Python
import requestsurl = $BASE_URL/optimizetoken = 'your_bearer_token_here'headers = {'Authorization': f'Bearer {token}'}files = {'file': open('example_file.jpg', 'rb')}response = requests.post(url, headers=headers, files=files)print(response.text)
::
Response
Default
{ "data": { "id": "4c27a32a-8d3e-4ad4-a19c-91063cb0483f", "converted_file": "your_random_converted_file.jpg", "created_at": "2023-02-22T06:25:35.659015Z", "status": "queued" }}
You can visit here to know to you can fetch file by file id.
Table of Contents