コンテンツへスキップ

Image2Pixel

統合

モデルID image2pixel
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/image2pixel?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

1 回の実行につき最大 $0.153 実際の使用量に応じて課金され、残額は返金されます このページで実行

APIキーを取得
Utility 画像編集 #post-processing#pixel-art

パレット制限、スケール検出、任意の透明背景に対応して画像をクリーンなピクセルアートへ変換します

Utility · 画像

最初の結果がここに表示されます

以下でリクエストを作成し、APIキーで実行してください。出力はストレージにコピーされ、永久保存または無料で7日保存されます。

リクエストを作成

コントロールはモデルスキーマから生成されます。値を変更するとコードと価格が更新されます。

•必須 image_url
ファイルをドロップ、または

高品質なピクセルアートに変換する元画像のURL。

詳細設定 detect_method · downscale_method · background_mode · max_colors · scale · alpha_threshold · dominant_color_threshold · background_tolerance · auto_color_detect · trim_borders · transparent_background · cleanup_morph · cleanup_jaggy · snap_grid · fixed_palette
detect_method デフォルト auto

スケールの検出に使用する方法。

downscale_method デフォルト dominant

ピクセルアートへの縮小に使用する方法。

background_mode デフォルト corners

背景除去時の塗りつぶし開始位置。

デフォルト 32

出力パレットの色数上限。Noneにすると色数は無制限です。

適用するピクセルスケール。Noneにすると自動検出します。

デフォルト 128

アルファを二値化するしきい値(0~255)。

デフォルト 0.05

支配的な色のしきい値(0.0~1.0)。

デフォルト 0

背景の許容値(0~255)。

['#000000', '#ffffff']のような16進文字列で指定する任意の事前定義パレット。

POST /run/image2pixel?wait=20 見積もり → $0.153
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/image2pixel?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

このリクエストを実行

キーはこのブラウザ内に保持されます。Doitong APIにのみ送信され、「記憶する」にチェックを入れた場合のみlocalStorageに保存されます。 APIキーを取得

Image2Pixelについて

入力画像をピクセルアートに変換し、処理済み画像とスケール版をPNGファイルとして返します。`max_colors`(1から256)でパレットを制限し、16進カラーの`fixed_palette`を指定するか、`scale`を1から64で固定できます。複数の縮小方式、クリーンアップ設定、背景除去モードを利用できます。レスポンスには色数、パレット、検出されたピクセルスケールも含まれます。

パラメータ

正式名称またはネイティブ名のいずれか一方を送信してください。両方は送信しないでください。 正式名称

名前型 デフォルト許可される値 説明
image_url必須 image
型url · image
高品質なピクセルアートに変換する元画像のURL。
max_colors任意
型integer | null
デフォルト32
1 – 256
出力パレットの色数上限。Noneにすると色数は無制限です。
auto_color_detect任意
型boolean
デフォルトfalse
最適な色数の自動選択を有効にします。
fixed_palette任意
型string[]
['#000000', '#ffffff']のような16進文字列で指定する任意の事前定義パレット。
detect_method任意
型enum
デフォルトauto
autorunsedge
スケールの検出に使用する方法。
scale任意
型integer | null
1 – 64
適用するピクセルスケール。Noneにすると自動検出します。
downscale_method任意
型enum
デフォルトdominant
dominantmedianmodemeancontent-adaptive
ピクセルアートへの縮小に使用する方法。
trim_borders任意
型boolean
デフォルトfalse
画像の境界をトリミングする処理を制御します。
transparent_background任意
型boolean
デフォルトfalse
透明化による背景除去。画像補正の完了後、画像の端に接する連結した色領域を透明にします。
cleanup_morph任意
型boolean
デフォルトfalse
モルフォロジー処理によるノイズ除去。
cleanup_jaggy任意
型boolean
デフォルトfalse
孤立した斜めのピクセルを除去してギザギザしたエッジを整えます。
snap_grid任意
型boolean
デフォルトtrue
出力をピクセルグリッドに合わせます。
alpha_threshold任意
型integer
デフォルト128
0 – 255
アルファを二値化するしきい値(0~255)。
dominant_color_threshold任意
型number
デフォルト0.05
0 – 1
支配的な色のしきい値(0.0~1.0)。
background_tolerance任意
型integer
デフォルト0
0 – 255
背景の許容値(0~255)。
background_mode任意
型enum
デフォルトcorners
edgescornersmidpoints
背景除去時の塗りつぶし開始位置。
必須 正式名称(こちらも使用可能)

ファイルパラメータには、公開されたhttps:// URL、10 MBまでのdata: URI、またはアップロードしたファイルのfile_urlを指定します。 ファイル

出力

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "image2pixel",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 153,
    "usd": "0.153",
    "charged": 153,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "pixel_scale": 21,
    "palette": [
      "string"
    ],
    "num_colors": 10,
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ファイルの保存期間を選択すべてのoutputs[].urlはストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、type、url、content_type、width、height、durationが含まれます。outputはモデル独自の結果オブジェクトです。
出力フィールド
pixel_scale
integer入力で検出されたピクセルスケール。
palette
array of string処理済みメディアのカラーパレット。
num_colors
integer処理済みメディアの色数。
images
array of object {url, content_type, file_name, file_size, width, height}処理済みのピクセルアートと拡大画像(いずれもPNG形式)。

AIエージェント向け:このページのMarkdown版はこちらです: https://doitong.com/ja/developers/models/image2pixel.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt