新規ユーザーは無料クレジットを獲得、クレジットカード不要 はじめる

Flexible Image Compression

Flexible Image Compression は文書化された APIAny 無料 API ツールです。ブラウザで試し、同じ操作を API キーで呼び出します。

Resize and recompress a single image with custom output format, size, and quality.

POST /api/free/compress-image-stream

出典

このページはどの公式資料を引用していますか?

以下の引用は、APIAny が実装の根拠とする公式 API ドキュメントからです。

The Fetch API provides an interface for fetching resources (including across the network).

The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP and AVIF images of varying dimensions.

The Images API provides several endpoints that let you generate images from text prompts or create edits of existing images.

Flexible Image Compressionをオンラインで使用

API キーなしでアップロード、設定、プレビュー、ダウンロードできます。

ログイン・API キー不要

1. アップロードと設定

API キーなしで利用できます。ファイルは実行時にのみ送信されます。

Image file *
Output format
Size
Custom width
Quality
必須項目を入力すると実行できます。POST /api/free-online/compress-image-stream

2. プレビューとダウンロード

結果はここに表示されます

プレビュー、サイズ変化、ダウンロード操作を表示します

API で連携

API キーが必要なのはプログラムからの呼び出しだけです。パラメータ、レスポンス、エラーを以下にまとめています。

API エンドポイント
POST /api/free/compress-image-stream

オンライン利用はキー不要です。プログラムからの呼び出しには APIAny キーが必要です。

仕組み
  • Use size=custom with width between 1 and 8192.
  • Uses local Sharp processing; no third-party compression key is required.

レスポンス

成功時は、このページに記載した Content-Type の image レスポンスを返します。

主なエラー

400
ファイルやパラメータが不足、不正、または制限外です。
401
プログラム呼び出しのキーがない、無効、または停止済みです。
429
オンラインまたは認証済みの共有上限に達しました。

パラメータと制限

パラメータ要件既定値利用可能な値
imageImage file必須file
formatOutput format任意webporiginal, webp, png, jpg, jpeg
sizeSize任意originaloriginal, 500, 1200, custom
widthCustom width任意number
qualityQuality任意80number

API の例

以下はコード用の認証例です。上の Playground は API キーを要求・表示しません。

curl -X POST "https://apiany.ai/api/free/compress-image-stream" \
  -H "Authorization: Bearer $API_KEY" \
  -F "image=@input.png" \
  -F "format=webp" \
  -F "size=custom" \
  -F "width=1024" \
  -F "quality=82" \
  --output output.webp

よくある質問

Flexible Image Compression に API キーは必要ですか?

オンライン Playground では不要です。プログラムからは Authorization: Bearer または X-API-Key を使います。

Flexible Image Compression の制限は?

オンラインは毎分 3 回、1 日 30 回です。認証済み無料アカウントは 5 RPM、有料アカウントは全無料 API 合計で 500 RPM です。

Flexible Image Compression が受け付ける入力は?

パラメータ表の必須・任意項目を使用してください。未対応形式や範囲外の値は拒否されます。

Flexible Image Compression は何を返しますか?

成功時は image レスポンス、失敗時は上記の HTTP ステータスを返します。

出典:APIAny 無料 API カタログと実際のルート動作。確認日:2026-07-17。