Model API'si

Image2Pixel

Image2Pixel ile piksel görselini düzenleyebilirsin.

Model kimliği

Her istekte bunu kullan
image2pixel

Çalıştır

Girdiye ücret teklifi al, bu teklifle üretimi başlat, ardından işin durumunu sorgula. Önce RAYWAKE_API_KEY değişkenini ayarla; ayrıntılar için Kimlik doğrulama sayfasına bak.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "image2pixel",
  "input": {
    "image_url": "https://example.com/input.png"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "image2pixel", "quote_id": "QUOTE_ID", "input": {"image_url":"https://example.com/input.png"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Girdi

image2pixel girdi alanları
AlanTürAçıklama
image_urlzorunlustring (image URL)
The image URL to process into improved pixel art
max_colorsinteger
Maximum number of colors in the output palette. Set None to disable limit.

Varsayılan: 32

auto_color_detectboolean
Enable automatic detection of optimal number of colors.

Varsayılan: false

fixed_palettearray of colors
Optional fixed color palette as hex strings (e.g., ['#000000', '#ffffff']).
detect_methodstring (enum)
Scale detection method to use.

Varsayılan: auto

Seçenekler: auto, runs, edge

scaleinteger
Force a specific pixel scale. If None, auto-detect.
downscale_methodstring (enum)
Downscaling method to produce the pixel-art output.

Varsayılan: dominant

Seçenekler: dominant, median, mode, mean, content-adaptive

trim_bordersboolean
Trim borders of the image.

Varsayılan: false

transparent_backgroundboolean
Remove background of the image. This will check for contiguous color regions from the edges after correction and make them transparent.

Varsayılan: false

cleanup_morphboolean
Apply morphological operations to remove noise.

Varsayılan: false

cleanup_jaggyboolean
Remove isolated diagonal pixels (jaggy edge cleanup).

Varsayılan: false

snap_gridboolean
Align output to the pixel grid.

Varsayılan: true

alpha_thresholdinteger
Alpha binarization threshold (0-255).

Varsayılan: 128

dominant_color_thresholdnumber
Dominant color threshold (0.0-1.0).

Varsayılan: 0.05

background_toleranceinteger
Background tolerance (0-255).

Varsayılan: 0

background_modestring (enum)
Controls where to flood-fill from when removing the background.

Varsayılan: corners

Seçenekler: edges, corners, midpoints

sync_modeboolean
If `True`, the media will be returned as a data URI and the output data won't be available in the request history.

Varsayılan: false

Çıktı

Başarılı bir iş, sonuçlarını outputs altında listeler; dosyalar bizim tarafımızda saklanır. Tüm alanlar için İşler sayfasına bak.

İş yanıtından bir bölüm
"outputs": [
  { "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]

Fiyatlandırma

  • en fazla$0,09/ üretim

Girdinin kesin ücreti ücret teklifinden gelir. Bakiye nasıl kesinleşir?