本页内容
图像生成
基础路径:/v1
POST /img2img
处理图生图生成。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| sd_model_checkpoint | string | required | The name of the model checkpoint. |
| prompt | string | required | The text prompt. |
| init_images | array of strings | required | Base64-encoded initial images. |
| negative_prompt | string | optional | The negative prompt. |
| steps | integer | optional | Number of sampling steps. Limited by the model's maxSteps (default 40). vLLM-Omni maps this to num_inference_steps. |
| sampler_name | string | optional | Sampling method for SD.Next models. vLLM-Omni models use a fixed sampler and ignore this field. |
| width | integer | required | Output width in pixels. Must be a positive integer and a multiple of the model sizeMultiple when one is configured. |
| height | integer | required | Output height in pixels. Must be a positive integer and a multiple of the model sizeMultiple when one is configured. |
| clip_skip | integer | optional | Number of CLIP layers to skip. |
| seed | integer | optional | Random seed. |
| cfg_scale | number | optional | Classifier-Free Guidance scale. Limited by the model's maxCfgScale (default 30). vLLM-Omni maps this to guidance_scale. |
| flow_shift | number | optional | Flow-matching scheduler shift for vLLM-Omni models. Used for text-to-image; schedulers_shift is used as a fallback when this is omitted. Ignored by SD.Next and by vLLM-Omni img2img. |
| extra_params | object | optional | Model-specific vLLM-Omni extras for text-to-image. Accepted keys: slg_layers, uncond_skip_layers (integer arrays, max 64 entries), slg_scale, slg_rescaling_scale (0-10), slg_start, slg_stop (0-1, start <= stop). Unknown keys return 400 for vLLM-Omni models; the field is dropped for SD.Next and mixed-engine models. Merged with model defaults for text-to-image; ignored by vLLM-Omni img2img/edits. |
| stream | boolean | optional | Accepted for compatibility, but image generation responses are always returned as a single JSON payload. |
| batch_size | integer | optional | Number of images to generate in a batch. Limited by the model's maxBatchSize when set. vLLM-Omni maps this to n. |
| denoising_strength | number | optional | Denoising strength for img2img. vLLM-Omni maps this to strength. |
| mask | string | optional | Base64-encoded mask for inpainting. vLLM-Omni forwards the mask to its multipart edits endpoint, but only pipelines that read mask_image (for example FLUX2 Klein) honor it; other edit models ignore it. |
| mask_blur | integer | optional | Mask blur for inpainting. SD.Next-only; ignored by vLLM-Omni. |
| inpainting_fill | integer | optional | Inpainting fill mode. SD.Next-only; ignored by vLLM-Omni. |
| inpaint_full_res | boolean | optional | Whether to inpaint at full resolution. SD.Next-only; ignored by vLLM-Omni. |
| inpaint_full_res_padding | integer | optional | Padding for full-resolution inpainting. SD.Next-only; ignored by vLLM-Omni. |
| inpainting_mask_invert | integer | optional | Whether to invert the inpainting mask. SD.Next-only; ignored by vLLM-Omni. |
| initial_noise_multiplier | number | optional | Initial noise multiplier. SD.Next-only; ignored by vLLM-Omni. |
| detailer_enabled | boolean | optional | Enable the detailer. |
| detailer_prompt | string | optional | Prompt for the detailer. |
| detailer_negative | string | optional | Negative prompt for the detailer. |
| detailer_steps | integer | optional | Steps for the detailer. |
| detailer_strength | number | optional | Strength of the detailer. |
| detailer_model | string | optional | Model for the detailer. |
| detailer_classes | string | optional | Classes for the detailer. |
| detailer_conf | number | optional | Confidence for the detailer. |
| detailer_max | integer | optional | Max detections for the detailer. |
| detailer_iou | number | optional | IoU for the detailer. |
| detailer_padding | integer | optional | Padding for the detailer. |
| detailer_blur | integer | optional | Blur for the detailer. |
| detailer_merge | boolean | optional | Merge mode for the detailer. |
| detailer_models | array of strings | optional | Detailer model names to load (override_settings). |
| detailer_min_size | integer | optional | Minimum detailer bounding-box size (override_settings). |
| detailer_max_size | integer | optional | Maximum detailer bounding-box size (override_settings). |
| detailer_sigma_adjust | number | optional | Detailer sigma adjustment (override_settings). |
| detailer_sigma_adjust_max | number | optional | Maximum detailer sigma adjustment (override_settings). |
| schedulers_rescale_betas | boolean | optional | Rescale betas for schedulers. |
| schedulers_use_thresholding | boolean | optional | Use thresholding for schedulers. |
| schedulers_sigma | number | optional | Sigma for schedulers. |
| schedulers_beta_schedule | string | optional | Beta schedule for schedulers. |
| scheduler_eta | number | optional | ETA for schedulers. |
| schedulers_solver_order | integer | optional | Solver order for schedulers. |
| schedulers_use_loworder | boolean | optional | Use the low-order solver (override_settings). |
| schedulers_prediction_type | string | optional | Scheduler prediction type (override_settings). |
| schedulers_timestep_spacing | string | optional | Scheduler timestep spacing (override_settings). |
| schedulers_beta_start | number | optional | Beta start for schedulers. |
| schedulers_beta_end | number | optional | Beta end for schedulers. |
| schedulers_timesteps_range | string | optional | Timesteps range for schedulers. |
| schedulers_shift | number | optional | Shift for schedulers. |
| schedulers_sigma_adjust | boolean | optional | Sigma adjustment for schedulers. |
| schedulers_sigma_adjust_min | number | optional | Min sigma adjustment. |
| schedulers_sigma_adjust_max | number | optional | Max sigma adjustment. |
| enable_hr | boolean | optional | Enable the SD.Next high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_scale | number | optional | High-resolution fix upscale factor. Ignored by vLLM-Omni. |
| hr_upscaler | string | optional | Upscaler used by the high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_second_pass_steps | integer | optional | Steps for the high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_denoising_strength | number | optional | Denoising strength for the high-resolution fix pass. Ignored by vLLM-Omni. |
| refiner_steps / refiner_start | integer | number | optional | Refiner pass steps and start fraction. Ignored by vLLM-Omni. |
| refiner_prompt / refiner_negative | string | optional | Refiner prompt and negative prompt. Ignored by vLLM-Omni. |
| ip_adapter | array | optional | Image-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires a model with supportsIPAdapter; ignored by vLLM-Omni models. |
1curl -X POST https://api.arliai.com/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 painting of a cat in the style of Van Gogh",
8 "width": 1024,
9 "height": 1024
10}'POST /txt2img
处理文生图生成。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| sd_model_checkpoint | string | required | The name of the model checkpoint. |
| prompt | string | required | The text prompt. |
| negative_prompt | string | optional | The negative prompt. |
| steps | integer | optional | Number of sampling steps. Limited by the model's maxSteps (default 40). vLLM-Omni maps this to num_inference_steps. |
| sampler_name | string | optional | Sampling method for SD.Next models. vLLM-Omni models use a fixed sampler and ignore this field. |
| width | integer | required | Output width in pixels. Must be a positive integer and a multiple of the model sizeMultiple when one is configured. |
| height | integer | required | Output height in pixels. Must be a positive integer and a multiple of the model sizeMultiple when one is configured. |
| clip_skip | integer | optional | Number of CLIP layers to skip. |
| seed | integer | optional | Random seed. |
| cfg_scale | number | optional | Classifier-Free Guidance scale. Limited by the model's maxCfgScale (default 30). vLLM-Omni maps this to guidance_scale. |
| flow_shift | number | optional | Flow-matching scheduler shift for vLLM-Omni models. Used for text-to-image; schedulers_shift is used as a fallback when this is omitted. Ignored by SD.Next and by vLLM-Omni img2img. |
| extra_params | object | optional | Model-specific vLLM-Omni extras for text-to-image. Accepted keys: slg_layers, uncond_skip_layers (integer arrays, max 64 entries), slg_scale, slg_rescaling_scale (0-10), slg_start, slg_stop (0-1, start <= stop). Unknown keys return 400 for vLLM-Omni models; the field is dropped for SD.Next and mixed-engine models. Merged with model defaults for text-to-image; ignored by vLLM-Omni img2img/edits. |
| stream | boolean | optional | Accepted for compatibility, but image generation responses are always returned as a single JSON payload. |
| batch_size | integer | optional | Number of images to generate in a batch. Limited by the model's maxBatchSize when set. vLLM-Omni maps this to n. |
| hr_sampler_name | string | optional | Sampler name for high-res fix. |
| detailer_enabled | boolean | optional | Enable the detailer. |
| detailer_prompt | string | optional | Prompt for the detailer. |
| detailer_negative | string | optional | Negative prompt for the detailer. |
| detailer_steps | integer | optional | Steps for the detailer. |
| detailer_strength | number | optional | Strength of the detailer. |
| detailer_model | string | optional | Model for the detailer. |
| detailer_classes | string | optional | Classes for the detailer. |
| detailer_conf | number | optional | Confidence for the detailer. |
| detailer_max | integer | optional | Max detections for the detailer. |
| detailer_iou | number | optional | IoU for the detailer. |
| detailer_padding | integer | optional | Padding for the detailer. |
| detailer_blur | integer | optional | Blur for the detailer. |
| detailer_merge | boolean | optional | Merge mode for the detailer. |
| detailer_models | array of strings | optional | Detailer model names to load (override_settings). |
| detailer_min_size | integer | optional | Minimum detailer bounding-box size (override_settings). |
| detailer_max_size | integer | optional | Maximum detailer bounding-box size (override_settings). |
| detailer_sigma_adjust | number | optional | Detailer sigma adjustment (override_settings). |
| detailer_sigma_adjust_max | number | optional | Maximum detailer sigma adjustment (override_settings). |
| schedulers_rescale_betas | boolean | optional | Rescale betas for schedulers. |
| schedulers_use_thresholding | boolean | optional | Use thresholding for schedulers. |
| schedulers_sigma | number | optional | Sigma for schedulers. |
| schedulers_beta_schedule | string | optional | Beta schedule for schedulers. |
| scheduler_eta | number | optional | ETA for schedulers. |
| schedulers_solver_order | integer | optional | Solver order for schedulers. |
| schedulers_use_loworder | boolean | optional | Use the low-order solver (override_settings). |
| schedulers_prediction_type | string | optional | Scheduler prediction type (override_settings). |
| schedulers_timestep_spacing | string | optional | Scheduler timestep spacing (override_settings). |
| schedulers_beta_start | number | optional | Beta start for schedulers. |
| schedulers_beta_end | number | optional | Beta end for schedulers. |
| schedulers_timesteps_range | string | optional | Timesteps range for schedulers. |
| schedulers_shift | number | optional | Shift for schedulers. |
| schedulers_sigma_adjust | boolean | optional | Sigma adjustment for schedulers. |
| schedulers_sigma_adjust_min | number | optional | Min sigma adjustment. |
| schedulers_sigma_adjust_max | number | optional | Max sigma adjustment. |
| enable_hr | boolean | optional | Enable the SD.Next high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_scale | number | optional | High-resolution fix upscale factor. Ignored by vLLM-Omni. |
| hr_upscaler | string | optional | Upscaler used by the high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_second_pass_steps | integer | optional | Steps for the high-resolution fix pass. Ignored by vLLM-Omni. |
| hr_denoising_strength | number | optional | Denoising strength for the high-resolution fix pass. Ignored by vLLM-Omni. |
| refiner_steps / refiner_start | integer | number | optional | Refiner pass steps and start fraction. Ignored by vLLM-Omni. |
| refiner_prompt / refiner_negative | string | optional | Refiner prompt and negative prompt. Ignored by vLLM-Omni. |
| ip_adapter | array | optional | Image-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires a model with supportsIPAdapter; ignored by vLLM-Omni models. |
1curl -X POST https://api.arliai.com/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 beautiful landscape painting",
7 "steps": 20,
8 "width": 1024,
9 "height": 1024
10}'POST /v1/images/generations
OpenAI-compatible image generation for vLLM-Omni models. model is required and must have a healthy vLLM-Omni server. Accepts prompt, negative_prompt, size (or the width/height aliases), n, seed, num_inference_steps, guidance_scale, true_cfg_scale, flow_shift, extra_params (SLG keys only), output_format, output_compression, generator_device, layers, resolution, strength, sigmas, num_frames, bot_task, system_prompt, use_system_prompt and return_stage_metrics. response_format is accepted but responses are always returned as data[].b64_json. n must be 1-10 and cannot exceed the model's maxBatchSize when one is configured. If size is omitted, the model default (usually 1024x1024) is used. SD.Next models use /v1/txt2img or /sdapi/v1/txt2img instead.
1curl -X POST https://api.arliai.com/v1/images/generations \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "model": "MODEL_NAME",
6 "prompt": "A beautiful landscape painting",
7 "size": "1024x1024",
8 "n": 1,
9 "seed": 42,
10 "num_inference_steps": 30,
11 "guidance_scale": 3.0,
12 "response_format": "b64_json"
13}'POST /v1/images/edits
OpenAI-compatible image editing for vLLM-Omni models whose supportsImg2Img capability is not false. model is required. Send multipart form data with one or more image/image[] files and optional mask_image or reference_image. JSON callers can instead send base64 image, images, init_images, mask or mask_image. Edits accept prompt, negative_prompt, size (defaults to the input image or auto), n, num_inference_steps, guidance_scale, true_cfg_scale, strength, seed, generator_device, layers, resolution, output_format, output_compression, bot_task, system_prompt and return_stage_metrics. flow_shift and extra_params (SLG keys only) are text-to-image only and are not applied to edits. Models without edit support (for example MOSS-Image-SFT) return a validation error.
1curl -X POST https://api.arliai.com/v1/images/edits \
2-H "Authorization: Bearer your_api_key" \
3-F "model=MODEL_NAME" \
4-F "prompt=Turn the background into a sunset" \
5-F "image=@input.png" \
6-F "size=1024x1024" \
7-F "strength=0.7" \
8-F "response_format=b64_json"GET /v1/images/models
Lists the image models available to your API key in OpenAI model-list format ({ object: "list", data: [{ id, object, created, owned_by }] }). Only models with a healthy vLLM-Omni server are returned. Use GET /v1/img-models for the full catalog metadata (engine, per-model limits, capability flags, and curated defaults). vLLM-Omni models can also be called through /sdapi/v1/txt2img and /v1/txt2img, where the backend translates the SDNext request and response shapes.
POST /v1/control
ControlNet-guided generation for SD.Next models: generate an image conditioned by one or more control units (ControlNet, T2I-Adapter, ControlNet-XS, ControlLLLite, Reference). Requires a model whose supportsControl capability is not false. vLLM-Omni models are not eligible for this endpoint and return 503. Preprocessors can run server-side on the uploaded source image per unit, and optional init-image editing (input_type 1/2), IP-Adapter, and detailer refinement are supported. The response mirrors the other generation endpoints: images (base64 outputs), processed (preprocessed control maps), and info.
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| sd_model_checkpoint | string | required | The name of the model checkpoint (must support ControlNet generation). |
| prompt | string | required | The text prompt. |
| negative_prompt | string | optional | The negative prompt. |
| Control Units | |||
| control | array | required | List of control units. At least one enabled unit with an image is required. See control[] fields below. |
| unit_type | string | optional | Control unit family used by units that don't set their own: 'controlnet', 't2i adapter', 'xs', 'lite', or 'reference'. Default: 'controlnet'. |
| control[].unit_type | string | optional | Per-unit type override: 'controlnet', 't2i adapter', 'xs', 'lite', or 'reference'. Defaults to the request-level unit_type. |
| control[].process | string | optional | Preprocessor to run on the unit image (e.g. "Canny", "OpenPose", "Depth Anything"). Empty/None uses the image as-is. List via GET /v1/preprocessors. |
| control[].model | string | optional | Control model file name for the unit type (e.g. "Canny XL", "OpenPose XL"). List via GET /v1/control-models. |
| control[].image | string | optional | Base64-encoded source image for the unit. When a process is set, the server preprocesses it once; otherwise it is used as the control map directly. |
| control[].override | string | optional | Base64-encoded control image that takes priority over image. If a process is set, the server runs that preprocessor on this image; leave process empty to use it as an already-processed control map. |
| inputs | array of strings | optional | Base64-encoded control input images. The server runs the preprocessor for each active unit on these images; use control[].image or control[].override for per-unit images. |
| control[].strength | number | optional | How strongly the control model influences generation (0.0-2.0). Default 1.0. |
| control[].start | number | optional | Step fraction at which control begins (0.0-1.0). Default 0.0. |
| control[].end | number | optional | Step fraction at which control ends (0.0-1.0). Default 1.0. |
| control[].mode | string | optional | Control mode for Union/ProMax models. List valid modes via GET /v1/control-modes. |
| control[].guess | boolean | optional | Guess mode: remove the need for a prompt (ControlNet only). |
| control[].factor | number | optional | Conditioning scale factor (T2I-Adapter only). Default 1.0. |
| control[].attention | string | optional | Attention mechanism: 'Attention', 'Adain', or 'Attention Adain' (Reference units). |
| control[].fidelity | number | optional | Style fidelity 0.0-1.0 (Reference units). Default 0.5. |
| control[].query_weight | number | optional | Attention query weight (Reference units). Default 1.0. |
| control[].adain_weight | number | optional | AdaIN weight (Reference units). Default 1.0. |
| control[].process_params | object | optional | Per-unit preprocessor parameter overrides, e.g. {"low_threshold": 50, "high_threshold": 150} for Canny. |
| Generation | |||
| sampler_name | string | optional | Sampling method. |
| steps | integer | optional | Number of sampling steps. Limited by the model's maxSteps (default 40). |
| seed | integer | optional | Random seed (-1 = random). |
| cfg_scale | number | optional | Classifier-Free Guidance scale. Limited by the model's maxCfgScale (default 30). |
| batch_size | integer | optional | Number of images to generate in a batch. Limited by the model's maxBatchSize when set. |
| Init Image Editing | |||
| input_type | integer | optional | 0 = control only, 1 = init image same as the first control image, 2 = separate init image. Default 0. |
| init_control | array of strings | optional | Base64-encoded init image(s) when input_type is 1 or 2. Merged with inits when both are provided. |
| inits | array of strings | optional | Base64-encoded init image(s) (low-level alias). |
| mask | string | optional | Base64-encoded mask for inpaint-style edits. |
| denoising_strength | number | optional | Denoising strength when editing an init image. |
| Size | |||
| width_before | integer | optional | Initial/control image resolution width. Defaults to the control image size. |
| height_before | integer | optional | Initial/control image resolution height. Defaults to the control image size. |
| width_after | integer | optional | Post-generation resolution width. |
| height_after | integer | optional | Post-generation resolution height. |
| width_mask | integer | optional | Mask resolution width. |
| height_mask | integer | optional | Mask resolution height. |
| IP-Adapter | |||
| ip_adapter | array | optional | Image-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires supportIpAdapter model. |
| Detailer | |||
| detailer_enabled | boolean | optional | Enable the face/detailer refinement pass. |
| detailer_prompt | string | optional | Prompt for the detailer. |
| detailer_negative | string | optional | Negative prompt for the detailer. |
| detailer_steps | integer | optional | Steps for the detailer. |
| detailer_strength | number | optional | Strength of the detailer. |
| detailer_model / detailer_models | string | array | optional | Detailer model name(s) (override_settings). |
| detailer_conf / detailer_iou | number | optional | Detailer detection confidence / IoU thresholds (override_settings). |
| detailer_max / detailer_min_size / detailer_max_size | integer | optional | Detailer bbox size limits (override_settings). |
| detailer_padding / detailer_blur | integer | optional | Detailer face padding / blur (override_settings). |
| detailer_merge / detailer_sigma_adjust / detailer_sigma_adjust_max | boolean | number | optional | Detailer merge mode and sigma adjustment (override_settings). |
| Schedulers | |||
| schedulers_rescale_betas | boolean | optional | Rescale betas for schedulers. |
| schedulers_use_thresholding | boolean | optional | Use thresholding for schedulers. |
| schedulers_sigma | number | optional | Sigma for schedulers. |
| schedulers_beta_schedule | string | optional | Beta schedule for schedulers. |
| scheduler_eta | number | optional | ETA for schedulers. |
| schedulers_solver_order | integer | optional | Solver order for schedulers. |
| schedulers_use_loworder | boolean | optional | Use low-order solver. |
| schedulers_prediction_type | string | optional | Prediction type for schedulers. |
| schedulers_timestep_spacing | string | optional | Timestep spacing for schedulers. |
1curl -X POST https://api.arliai.com/v1/control \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "sd_model_checkpoint": "MODEL_NAME",
6 "prompt": "a person standing in front of an ancient castle, dramatic lighting",
7 "negative_prompt": "blurry, low quality",
8 "steps": 20,
9 "seed": -1,
10 "cfg_scale": 6.0,
11 "unit_type": "controlnet",
12 "control": [
13 {
14 "unit_type": "controlnet",
15 "process": "Canny",
16 "model": "Canny XL",
17 "image": "base64_encoded_control_image",
18 "strength": 1.0,
19 "start": 0.0,
20 "end": 1.0,
21 "process_params": { "low_threshold": 100, "high_threshold": 200 }
22 }
23 ],
24 "input_type": 0,
25 "width_before": 1024,
26 "height_before": 1024
27}'POST /v1/preprocess
Run a single control preprocessor (e.g. Canny, OpenPose, Depth Anything) on a raw image and return the resulting control map. This endpoint is SD.Next-only; vLLM-Omni models return 503. Use it to prepare control maps before calling /v1/control with the map as a unit image, or to preview what a preprocessor produces.
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| model | string | required | Preprocessor name (e.g. "Canny", "OpenPose", "Depth Anything", "MLSD"). List available names via GET /v1/preprocessors. |
| image | string | required | Base64-encoded input image to preprocess. |
| params | object | optional | Preprocessor parameter overrides, e.g. {"low_threshold": 50, "high_threshold": 150} for Canny. Keys must match the preprocessor config. |
1curl -X POST https://api.arliai.com/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 /upscale-img
放大单张图像。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| image | string | required | The base64-encoded image to upscale. |
| upscaler_1 | string | optional | The name of the upscaler to use. |
| resize_mode | integer | optional | The resize mode. |
| upscaling_resize | number | optional | The factor by which to resize the image. |
1curl -X POST https://api.arliai.com/v1/upscale-img \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "image": "base64_encoded_image",
6 "upscaler_1": "Lanczos"
7}'POST /caption
从图像生成描述性提示词(OpenCLIP/BLIP)。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| image | string | required | The base64-encoded image to generate a caption from. |
| model | string | required | The caption model to use (available via GET /caption/models). |
| mode | string | optional | Caption mode: 'best', 'fast', 'classic', 'caption', or 'negative'. |
| analyze | boolean | optional | When true, also returns medium, artist, movement, trending, and flavor. |
1curl -X POST https://api.arliai.com/v1/caption \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "model": "MODEL_NAME",
6 "mode": "best",
7 "image": "base64_encoded_image"
8}'POST /tagger
为图像生成 booru 风格标签(WaifuDiffusion/DeepBooru)。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| image | string | required | The base64-encoded image to tag. |
| model | string | required | The tagger model to use (available via GET /tagger/models). |
| threshold | number | optional | Minimum general confidence to include a tag (default 0.50). |
| character_threshold | number | optional | Minimum character confidence to include a tag (default 0.85). |
| max_tags | integer | optional | Maximum number of tags to return (default 74). |
| include_rating | boolean | optional | Include rating tags (general, sensitive, questionable, explicit). |
| sort_alpha | boolean | optional | Sort tags alphabetically instead of by confidence. |
| use_spaces | boolean | optional | Use spaces instead of underscores between words. |
| escape_brackets | boolean | optional | Escape brackets so tags are prompt-safe (default true). |
| exclude_tags | string | optional | Comma-separated tags to always exclude. |
| show_scores | boolean | optional | Include per-tag confidence scores in the response. |
1curl -X POST https://api.arliai.com/v1/tagger \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "model": "MODEL_NAME",
6 "image": "base64_encoded_image"
7}'图像模型与选项
GET /v1/img-models
检索可用的图像生成模型。无参数。
1curl -X GET https://api.arliai.com/v1/img-models \
2-H "Authorization: Bearer your_api_key"GET /upscalers
检索可用的放大器。无参数。
1curl -X GET https://api.arliai.com/v1/upscalers \
2-H "Authorization: Bearer your_api_key"GET /caption/models
检索您的账户可用的图像描述模型。无参数。
1curl -X GET https://api.arliai.com/v1/caption/models \
2-H "Authorization: Bearer your_api_key"GET /tagger/models
检索您的账户可用的标签模型。无参数。
1curl -X GET https://api.arliai.com/v1/tagger/models \
2-H "Authorization: Bearer your_api_key"GET /img-options
检索图像生成检查点标识符。仅返回 sd_model_checkpoint,不会暴露其他 SD.Next 选项。无参数。
1curl -X GET https://api.arliai.com/v1/img-options \
2-H "Authorization: Bearer your_api_key"GET /img-samplers
检索可用的图像采样器。无参数。
1curl -X GET https://api.arliai.com/v1/img-samplers \
2-H "Authorization: Bearer your_api_key"GET /v1/ip-adapters
Lists SD.Next IP-Adapter models available for the selected checkpoint. Pass the model via the model query parameter to resolve availability for the requested architecture; without it the server falls back to its loaded checkpoint. Returns an empty array for vLLM-Omni-only models and for models with supportsIPAdapter: false.
1curl -X GET "https://api.arliai.com/v1/ip-adapters?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"GET /v1/control-models
Lists SD.Next control models for a control unit type. Query parameters: model (selected checkpoint; optional — defaults to the server's loaded checkpoint) and unit_type (controlnet, t2i adapter, xs, lite, or reference). Returns an empty array for vLLM-Omni-only models.
1curl -X GET "https://api.arliai.com/v1/control-models?model=MODEL_NAME&unit_type=controlnet" \
2-H "Authorization: Bearer your_api_key"GET /v1/preprocessors
Lists SD.Next control preprocessors (name, group, and their configurable parameters). Returns an empty array for vLLM-Omni-only models. Optionally scoped to the selected checkpoint via ?model=.
1curl -X GET "https://api.arliai.com/v1/preprocessors?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"GET /v1/control-modes
Lists the SD.Next control modes (Union/ProMax predefines) available for the selected checkpoint via ?model=. Returns a map of control model name to available modes, or an empty array for vLLM-Omni-only models.
1curl -X GET "https://api.arliai.com/v1/control-modes?model=MODEL_NAME" \
2-H "Authorization: Bearer your_api_key"