面向生产环境
图像优化 API
通过一次同步 API 请求压缩、调整大小并转换图像。仅成功处理的图像消耗额度。
Synchronous and simple
Send multipart form data and receive the optimized image bytes in the same response.
No image retention
Source and output images are processed in memory and are not stored after the request.
Predictable credits
One successful image costs one credit. Validation, decode, and processing failures cost zero.
One endpoint, useful controls
- JPEG, PNG, WebP, AVIF, HEIC, and HEIF input.
- JPEG, PNG, WebP, or AVIF output—never HEIC output.
- Quality, maximum width, maximum height, and metadata controls.
- 20 MB, 25 megapixel, one-frame, and 30-second safety limits.
- Idempotent retries with the optional
Idempotency-Keyheader.
curl -X POST "$API_URL/v1/images/optimize" \
-H "Authorization: Bearer oyi_live_..." \
-H "Idempotency-Key: upload-123" \
-F "[email protected]" \
-F "output_format=webp" \
-F "quality=80" \
--output photo.webpStart with 100 trial credits
Create an account and API key to receive the one-time trial. Paid plans start at $9/month, and top-ups never enable automatic overages.
Create an API key