Model API'si

Fooocus

Fooocus ile komuttan görsel üret, maskelenmiş bir bölgeyi düzenle veya mevcut görseli büyütüp farklı sürümlerini oluştur.

Model kimliği

Her istekte bunu kullan
fooocus

Bu modelin kendi kimliği olan başka modları da var: fooocus/inpaint, fooocus/upscale-or-vary.

Ç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": "fooocus",
  "input": {
    "prompt": "A red ceramic cup on a wooden table, soft morning light"
  }
}'

# 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": "fooocus", "quote_id": "QUOTE_ID", "input": {"prompt":"A red ceramic cup on a wooden table, soft morning light"}}'

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

Girdi

fooocus girdi alanları
AlanTürAçıklama
promptstring
The prompt to use for generating the image. Be as descriptive as possible for best results.
negative_promptstring
The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution).
performancestring (enum)
You can choose Speed or Quality

Varsayılan: Extreme Speed

Seçenekler: Speed, Quality, Extreme Speed, Lightning

guidance_scalenumber
The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

Varsayılan: 4

sharpnessnumber
The sharpness of the generated image. Use it to control how sharp the generated image should be. Higher value means image and texture are sharper.

Varsayılan: 2

aspect_ratiostring
The size of the generated image. You can choose between some presets or custom height and width that **must be multiples of 8**.

Varsayılan: 1024x1024

num_imagesinteger
Number of images to generate in one request

Varsayılan: 1

lorasarray of objects
The LoRAs to use for the image generation. You can use up to 5 LoRAs and they will be merged together to generate the final image.

Varsayılan: [{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}]

refiner_modelstring (enum)
Refiner (SDXL or SD 1.5)

Varsayılan: None

Seçenekler: None, realisticVisionV60B1_v51VAE.safetensors

refiner_switchnumber
Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models 0.8 for XL-refiners; or any value for switching two SDXL models.

Varsayılan: 0.8

output_formatstring (enum)
The format of the generated image.

Varsayılan: jpeg

Seçenekler: png, jpeg, webp

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

seedinteger
The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time.
control_image_urlstring (image URL)
The image to use as a reference for the generated image.
control_typestring (enum)
The type of image control

Varsayılan: PyraCanny

Seçenekler: ImagePrompt, PyraCanny, CPDS, FaceSwap

control_image_weightnumber
The strength of the control image. Use it to control how much the generated image should look like the control image.

Varsayılan: 1

control_image_stop_atnumber
The stop at value of the control image. Use it to control how much the generated image should look like the control image.

Varsayılan: 1

inpaint_image_urlstring (image URL)
The image to use as a reference for inpainting.
mask_image_urlstring (image URL)
The image to use as a mask for the generated image.
mixing_image_prompt_and_inpaintboolean
Mixing Image Prompt And Inpaint

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,60/ üretim

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