Di halaman ini

Titik Akhir SD API V1

Jalur dasar: /sdapi/v1

Titik akhir di bawah /sdapi/v1 menyediakan subset yang kompatibel dari Stable Diffusion API dan berbagi parameter yang sama dengan rekan-rekan /v1 mereka. Titik akhir katalog (sd-models, upscalers) mengembalikan katalog terkurasi ArliAI dengan field identitas yang kompatibel dengan A1111, bukan metadata A1111 asli secara lengkap.

POST /sdapi/v1/img2img

Lihat /v1/img2img untuk parameter.

1curl -X POST https://api.arliai.com/sdapi/v1/img2img \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "sd_model_checkpoint": "MODEL_NAME",
6  "init_images": ["base64_encoded_image"],
7  "prompt": "A futuristic city",
8  "width": 1024,
9  "height": 1024
10}'

POST /sdapi/v1/txt2img

Lihat /v1/txt2img untuk parameter.

1curl -X POST https://api.arliai.com/sdapi/v1/txt2img \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "sd_model_checkpoint": "MODEL_NAME",
6  "prompt": "A majestic lion in the savanna",
7  "width": 1024,
8  "height": 1024
9}'

POST /sdapi/v1/control

ControlNet-guided generation in the SD-API style: the control array carries preprocessor/model/image pairs per unit, and the response includes processed (preprocessed control maps) alongside images. Equivalent to POST /v1/control; SD.Next-only, so vLLM-Omni models return 503.

1curl -X POST https://api.arliai.com/sdapi/v1/control \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "prompt": "a person standing in front of an ancient castle",
6  "unit_type": "controlnet",
7  "control": [
8    {
9      "unit_type": "controlnet",
10      "process": "OpenPose",
11      "model": "OpenPose XL",
12      "image": "base64_encoded_control_image",
13      "strength": 0.9
14    }
15  ]
16}'

POST /sdapi/v1/preprocess

Run a single control preprocessor on an image and return the processed control map. Equivalent to POST /v1/preprocess; SD.Next-only, so vLLM-Omni models return 503.

1curl -X POST https://api.arliai.com/sdapi/v1/preprocess \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "model": "Canny",
6  "image": "base64_encoded_image",
7  "params": { "low_threshold": 100, "high_threshold": 200 }
8}'

POST /sdapi/v1/extra-single-image

Lihat /v1/upscale-img untuk parameter.

1curl -X POST https://api.arliai.com/sdapi/v1/extra-single-image \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "image": "base64_encoded_image",
6  "upscaler_1": "R-ESRGAN 4x+"
7}'

GET /sdapi/v1/sd-models

Mengambil model gambar yang tersedia dalam bentuk katalog terkurasi ArliAI, termasuk field title dan model_name yang kompatibel dengan A1111 serta batas dan flag kemampuan ArliAI.

1curl -X GET https://api.arliai.com/sdapi/v1/sd-models \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/upscalers

Mengambil upscaler yang tersedia dengan field name dan model_name yang kompatibel dengan A1111. vLLM-Omni tidak menyediakan upscaling.

1curl -X GET https://api.arliai.com/sdapi/v1/upscalers \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/options

Mengambil pengenal checkpoint generasi gambar. Hanya sd_model_checkpoint yang dikembalikan; opsi SD.Next lainnya tidak diekspos.

1curl -X GET https://api.arliai.com/sdapi/v1/options \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/samplers

Mengambil sampler gambar yang tersedia.

1curl -X GET https://api.arliai.com/sdapi/v1/samplers \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/ip-adapters

Lists IP-Adapter models, optionally scoped to the selected checkpoint via ?model=. Equivalent to GET /v1/ip-adapters.

1curl -X GET "https://api.arliai.com/sdapi/v1/ip-adapters?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/control-models

Lists control models for a control unit type, optionally scoped to the selected checkpoint (?model= and ?unit_type=). Equivalent to GET /v1/control-models.

1curl -X GET "https://api.arliai.com/sdapi/v1/control-models?model=MODEL_NAME&unit_type=controlnet" \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/preprocessors

Lists available control preprocessors with their parameters, optionally scoped via ?model=. Equivalent to GET /v1/preprocessors.

1curl -X GET "https://api.arliai.com/sdapi/v1/preprocessors?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"

GET /sdapi/v1/control-modes

Lists control modes (Union/ProMax predefines) for the selected checkpoint via ?model=. Equivalent to GET /v1/control-modes.

1curl -X GET "https://api.arliai.com/sdapi/v1/control-modes?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"