PopNowAPI ドキュメント
本文

Image Upscaler API リファレンス

どんな画像も2K・4K・8Kに拡大

PopNow の API キー 1 つで、Image Upscaler を自分のコードから呼び出せます。送るモデル ID、受け付ける入力フィールド、1 回あたりのクレジット、ターミナルに貼ってそのまま動くリクエストをこのページにまとめました。

パラメーターの説明はモデルの入力 schema から取っているため、英語のみです。

概要

開発元
PopNow
出力
画像
最安
1.8 クレジット 画像 1 枚あたり ($0.018)
目安の所要時間
約 46 秒

1 クレジット = 0.01 米ドル。タスクの受付時に上限額を確保し、完了時に実際の使用量で精算します(整数クレジットに切り上げ、差額は返却)。失敗したタスクには課金されません。実行前に正確な金額を知りたいときは POST /api/v1/jobs/quote を呼んでください。

画像を高画質化

popnow/image-upscaler-v1/upscale

料金

オプションクレジット (画像 1 枚あたり)米ドル
既定1.8$0.018

パラメーター

フィールド型既定値指定できる値説明
image_url必須string——The image to enlarge. Its framing and aspect ratio are kept; only the resolution goes up.
resolution任意string4k2k, 4k, 8kOutput size tier: a pixel budget of about 4 (2k), 17 (4k) or 67 (8k) megapixels, with the aspect ratio kept. A tier below the source's pixel count scales the image down. All three tiers cost the same.
output_format任意stringjpegjpeg, png, webpFile type of the returned image. png is lossless but several times larger than jpeg.

リクエスト例

このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。

例の image_url には PopNow のサンプル素材を使っています。自分の公開 HTTPS リンク、アップロードしたファイル、保存済みアセットに置き換えてください。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "popnow/image-upscaler-v1/upscale",
  "input": {
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp"
  }
}'

レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

次に読む

このページの内容