API Documentation

This document provides a detailed summary of the available API endpoints, including explanations, a complete list of supported parameters, and `curl` examples.

Note: Replace your_api_key with your actual API key and MODEL_NAME with the name of the model you want to use.

Main Docs

V1 API Endpoints

Base path: /v1

Text Generation

Parameters

ParameterTypeRequiredDescription
Core Input
modelstring | nulloptionalThe model name to serve the request from. On a multi-model server, this routes the request to the specified served model. If null, the default served model is used.
messageslist[ChatCompletionMessageParam]required (chat)(chat only) The conversation as a list of message objects (role, content, plus optional tool_calls, name, etc.). Required for chat completions. Each message is rendered into the model's prompt via the chat template.
promptstring | list[string] | list[int] | list[list[int]] | nullrequired (text)(text only) The input text or token IDs to complete. Can be a single string, a batch of strings, or pre-tokenized ID lists. Required (or use prompt_embeds). Batching is capped by VLLM_MAX_COMPLETION_PROMPTS.
userstring | nulloptionalOpenAI-style end-user identifier. Ignored by vLLM — included only for API compatibility. No effect on generation or logging.
Sampling & Decoding
temperaturefloat | nulloptionalControls randomness in sampling. Lower values (e.g. 0.2) make output more deterministic/focused; higher values (e.g. 1.5) increase diversity. 0.0 forces greedy decoding (picks the highest-probability token each step). Must be ≥ 0. Default: 1.0*.
top_pfloat | nulloptionalNucleus sampling. Only consider the smallest set of tokens whose cumulative probability reaches top_p. 1.0 = consider all tokens (disabled). 0.1 = only the top 10% probability mass. Must be in (0, 1]. Default: 1.0*.
top_kint | nulloptionalOnly sample from the top k highest-probability tokens at each step. 0 or -1 = disabled (consider all). Lower values = more focused. Note: vLLM applies samplers in a configurable order (see sampler_priority); OpenAI has no equivalent. Default: 0*.
min_pfloat | nulloptionalMin-p sampling. Keeps only tokens whose probability is at least min_p × max_token_probability. Scales relative to the top token, so it adapts to confidence. 0.0 = disabled. Typical values 0.05–0.1. Default: 0.0*.
nintoptionalNumber of independent completions to generate for the prompt. Each counts against the engine's concurrency budget. Higher n = more GPU work. Default: 1.
seedint | nulloptionalRNG seed for reproducible sampling. Same seed + same prompt + same params → same output (assuming deterministic execution). null = nondeterministic. Int64 range. Default: null.
presence_penaltyfloat | nulloptionalOpenAI-style penalty: tokens that have appeared at least once get their logits reduced. Positive values encourage new topics. Range typically [-2.0, 2.0]. Default: 0.0.
frequency_penaltyfloat | nulloptionalOpenAI-style penalty: penalty scales with how often a token has appeared. Positive values reduce repetition of frequent tokens. Range typically [-2.0, 2.0]. Default: 0.0.
repetition_penaltyfloat | nulloptionalHuggingFace-style multiplicative penalty: divides the logit of any already-seen token by this value. 1.0 = no penalty; >1.0 discourages repetition. Distinct from the OpenAI additive penalties above. Default: 1.0*.
length_penaltyfloatoptionalUsed with use_beam_search. Exponentially scales beam scores by sequence length. >1.0 favors longer sequences; <1.0 favors shorter. 1.0 = neutral. Default: 1.0.
min_tokensintoptionalForce the model to generate at least this many tokens before any stop string or stop_token_ids can terminate generation. EOS is still respected unless ignore_eos is set. Useful to prevent premature stopping in structured outputs. Default: 0.
stopstring | list[string] | nulloptionalStop strings — generation halts when any of these substrings appears in the output. The stop string itself is excluded from output unless include_stop_str_in_output is true. Default: [].
stop_token_idslist[int] | nulloptionalStop at these specific token IDs (more efficient than string matching). Merged with any server-configured default stop IDs (deduplicated, request values first). Default: [].
include_stop_str_in_outputbooloptionalWhen true, the matching stop string/stop token is included in the returned text instead of being stripped. Default: false.
ignore_eosbooloptionalWhen true, the EOS (end-of-sequence) token does not terminate generation — the model keeps going until max_tokens or a stop condition. Useful for forcing a fixed output length. Default: false.
use_beam_searchbooloptionalSwitch from random sampling to beam search. n becomes the beam width. Mutually exclusive with most samplers (top_p, top_k, min_p are ignored). Uses length_penalty for scoring. Default: false.
bad_wordslist[string]optionalDisallows these substrings from appearing in the output (enforced via token-level bans). Stronger than a soft penalty — the words cannot appear at all. Default: [].
allowed_token_idslist[int] | nulloptionalRestrict generation to only these token IDs at every step (allowlist). null = no restriction. Useful for constrained vocabularies (e.g., classification over a fixed label set). Default: null.
logit_biasdict[string, float] | nulloptionalMap of token ID (as string) → bias added to that token's logit. Positive bias increases the chance of that token; negative decreases. Range typically [-100, 100]. Default: null.
Length & Truncation
max_tokensint | nulloptionalMaximum number of tokens to generate. Deprecated for chat in favor of max_completion_tokens. Bounded server-side by max_model_len - prompt_length. Default: null (chat) / 16 (text).
max_completion_tokensint | nulloptional(chat only) OpenAI's current name for the max output length. Preferred over max_tokens for chat. Takes precedence when both are set. Default: null.
truncate_prompt_tokensint | nulloptionalTruncate the prompt to this many tokens before generation. -1 = keep all tokens (no truncation, but enables offset tracking). A positive value keeps only that many tokens (respecting truncation_side). Must be ≥ -1. Default: null.
truncation_side"left" | "right" | nulloptionalControls which end of the prompt is kept when truncate_prompt_tokens is active. "right" keeps the first N tokens (drops the tail); "left" keeps the last N tokens (drops the head). null = use tokenizer default. Default: null.
echobooloptionalText completion: echoes the prompt back as part of the output (prepended to generated text). Chat: prepends the last user message to the generated response if same role. Also enables prompt_logprobs implicitly if top_logprobs is set. Default: false.
Logprobs
logprobsbool | null (chat) / int | null (text)optionalChat: boolean — whether to return logprobs at all. Pair with top_logprobs for the count. Text: integer 0–20 — number of top logprobs to return per generated token. null = disabled. Default: false (chat) / null (text).
top_logprobsint | nulloptional(chat only) Number of top alternative tokens (with logprobs) to return at each generated position. Requires logprobs: true. 0 = none. Max typically 20. Default: 0.
prompt_logprobsint | nulloptionalReturn logprobs for each prompt token (not just generated tokens). Integer = number of top logprobs per prompt token; -1 = all. In text completion, not allowed with stream=true (except 0). Must be ≥ 0 or exactly -1. Default: null.
logprob_token_idslist[int] | nulloptionalReturn logprobs for these specific token IDs at each generated position (in addition to the sampled token). More efficient than top_logprobs=-1 when you only need a fixed label set. Requires logprobs to be enabled. Not supported with beam search or with echo=true + max_tokens=0. Default: null.
Tokenization & Detokenization
skip_special_tokensbooloptionalWhen detokenizing output back to text, strip special tokens (e.g., <|im_start|>, <eos>). false keeps them visible — useful for debugging token streams. Default: true.
spaces_between_special_tokensbooloptionalInsert spaces between special tokens during detokenization for readability. false = no extra spacing. Default: true.
add_special_tokensbooloptionalAdd model-specific special tokens (e.g., BOS) to the prompt on top of what the chat template produces. For chat, the template usually handles this, so default is false. For raw text completion, default is true. Default: false (chat) / true (text).
Streaming
streambool | nulloptionalReturn tokens incrementally via Server-Sent Events (SSE) as they're generated, rather than waiting for the full completion. Default: false.
stream_optionsStreamOptions | nulloptionalSub-object for streaming controls. Requires stream: true. Fields: include_usage (bool, default false) — emit a final chunk with token usage stats; continuous_usage_stats (bool, default false) — include running usage stats in every chunk. Default: null.
Structured Outputs
response_formatAnyResponseFormat | nulloptionalConstrains the output format. Accepted values: {"type": "text"} — no constraint; {"type": "json_object"} — output is valid JSON; {"type": "json_schema", "json_schema": {"schema": {...}}} — output conforms to a specific JSON Schema; {"type": "structural_tag", ...} — vLLM-specific; constrains content within structural tags. Internally maps to structured_outputs fields. On chat, json_schema requires a schema (or json_schema) sub-object. Default: null.
structured_outputsStructuredOutputsParams | nulloptionalDirect, lower-level structured-output configuration. Exactly one constraint field may be set: json (str|dict) — a JSON Schema; regex (str) — a regex the output must match; choice (list[str]) — output must be one of these exact strings; grammar (str) — a context-free grammar (Lark-style); json_object (bool) — output is any valid JSON object; structural_tag (str) — JSON-serialized structural-tag spec. Plus options: disable_any_whitespace, disable_additional_properties, whitespace_pattern. Setting more than one constraint raises a validation error. Default: null.
Reasoning / Thinking
reasoning_effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | nulloptional(chat only) Controls how much reasoning/thinking effort reasoning models (e.g., o1-style, DeepSeek-R1) spend. Lower values = faster, fewer thinking tokens. none disables thinking. max is DeepSeek V4-specific and not part of the OpenAI spec. Also propagates enable_thinking into chat template kwargs for templates that require explicit opt-in. Default: null.
thinking_token_budgetint | nulloptionalHard cap on the number of tokens the model may spend on internal "thinking" (reasoning) before producing the final answer. ≥0 = limit; -1 = unlimited (treated as unset). For reasoning models that expose a separate thinking channel. Default: null.
include_reasoningbooloptional(chat only) Whether to include the model's reasoning/thinking trace in the response (in the reasoning field of the assistant message). false returns only the final answer. Default: true.
repetition_detectionRepetitionDetectionParams | nulloptionalEarly-terminates generation when repetitive N-gram patterns are detected (e.g., abcdabcdabcd...). Sub-fields: max_pattern_size (int, default 0) — largest N-gram to check, 0 = disabled; min_pattern_size (int, default 0) — smallest N-gram to check, 0 → defaults to 1, must be ≤ max_pattern_size; min_count (int, default 0) — how many times a pattern must repeat to trigger, must be ≥ 2 when max_pattern_size > 0. Default: null.
Tools (Chat Only)
toolslist[ChatCompletionToolsParam] | nulloptional(chat only) List of tool/function definitions the model may call. Each tool has a type ("function") and a function (FunctionDefinition: name, description, parameters JSON Schema, optional strict, defer_loading). The model returns tool_calls in its response rather than (or alongside) text. Default: null.
tool_choice"none" | "auto" | "required" | ChatCompletionNamedToolChoiceParam | nulloptional(chat only) Controls tool use: "none" — never call tools; "auto" — model decides whether to call a tool; "required" — model must call at least one tool; {"type": "function", "function": {"name": "..."}} — force a specific function. Default: "none".
parallel_tool_callsbool | nulloptional(chat only) Whether the model may emit multiple tool calls in a single response. Default: true.
Chat Template (Chat Only)
add_generation_promptbooloptional(chat only) Append the assistant turn header to the rendered prompt so the model begins generating. false = render only the conversation context without prompting a response (useful for inspection). Cannot be combined with continue_final_message. Default: true.
continue_final_messagebooloptional(chat only) Format the chat so the final message is left open-ended (no EOS), letting the model continue the last assistant message rather than starting a new one. Enables response prefilling. Mutually exclusive with add_generation_prompt. Default: false.
chat_templatestring | nulloptional(chat only) Override the Jinja2 chat template used to render messages into a prompt string (normally read from the tokenizer config). Per-request override; does not modify the served model. Required if the tokenizer defines no default template (since transformers v4.44). Default: null.
chat_template_kwargsdict[string, Any] | nulloptional(chat only) Extra variables passed into the Jinja template renderer (e.g., {"enable_thinking": true}, {"tools": [...]}). Accessible as variables inside the template. Merged with vLLM-injected kwargs (e.g., add_generation_prompt, reasoning_effort-derived enable_thinking). Default: null.
return_assistant_tokens_maskbooloptional(chat only) On /render endpoints, return an assistant_tokens_mask — a per-token 0/1 list marking which tokens were assistant-generated (vs. prompt). Requires the chat template to use {% generation %} tags; otherwise null. Default: false.
Response Controls
return_tokens_as_token_idsbool | nulloptionalWhen returning logprobs, represent tokens as strings of the form token_id:{id} instead of decoded text. Lets you identify tokens that aren't JSON-encodable (e.g., control characters). Default: null.
return_token_idsbool | nulloptionalInclude token IDs alongside generated text in the response. In streaming mode, prompt_token_ids appears only in the first chunk; token_ids contains delta tokens per chunk. Default: null.
return_token_offsetsbool | nulloptionalReturn character-level (start, end) offsets for each token relative to the source string (token_offsets field). Only honored on /v1/completions/render and /v1/chat/completions/render endpoints; ignored on regular generation. Only works with Fast (Rust-backed) tokenizers; otherwise null. Multimodal/pre-tokenized inputs always yield null. Default: false.
return_prompt_textbool | nulloptional(chat only) Include prompt_text in the response — the exact prompt string produced by chat templating. In streaming, sent only on the first chunk. Useful for debugging what the model actually received. Default: null.

POST /chat/completions

Handles chat completions. This endpoint takes a list of messages and returns a generated response.

1curl -X POST https://api.arliai.com/v1/chat/completions \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "model": "MODEL_NAME",
6  "messages": [
7    {"role": "system", "content": "You are a helpful assistant."},
8    {"role": "user", "content": "Hello!"}
9  ]
10}'

POST /chat/completions (with Image)

This endpoint allows you to send a text prompt along with an image for Vision Language Models (VLM). The user message content should be an array containing both the text and the image URL (base64 encoded).

1curl -X POST https://api.arliai.com/v1/chat/completions \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5 "model": "VLM_MODEL_NAME",
6 "messages": [
7   {
8     "role": "user",
9     "content": [
10       {"type": "text", "text": "What is in this image?"},
11       {
12         "type": "image_url",
13         "image_url": {
14           "url": "data:image/jpeg;base64,your_base64_encoded_image"
15         }
16       }
17     ]
18   }
19 ]
20}'

POST /completions

Handles text completions. This endpoint takes a prompt and returns a generated response.

1curl -X POST https://api.arliai.com/v1/completions \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "model": "MODEL_NAME",
6  "prompt": "Once upon a time",
7  "max_completion_tokens": 50
8}'

POST /tokenize

Tokenizes the given text.

Parameters

ParameterTypeRequiredDescription
modelstringoptionalThe model to use for tokenization.
multi_modelsarray of stringsoptionalA list of models to choose from.
promptstringoptionalThe prompt to tokenize.
messagesarrayoptionalThe messages to tokenize.
1curl -X POST https://api.arliai.com/v1/tokenize \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer your_api_key" \
4-d '{
5  "model": "MODEL_NAME",
6  "prompt": "Hello, world!"
7}'

Image Generation

POST /img2img

Handles image-to-image generation.

Parameters

ParameterTypeRequiredDescription
sd_model_checkpointstringrequiredThe name of the model checkpoint.
promptstringrequiredThe text prompt.
init_imagesarray of stringsrequiredBase64-encoded initial images.
negative_promptstringoptionalThe negative prompt.
stepsintegeroptionalNumber of sampling steps.
sampler_namestringoptionalSampling method.
widthintegeroptionalImage width.
heightintegeroptionalImage height.
clip_skipintegeroptionalNumber of CLIP layers to skip.
seedintegeroptionalRandom seed.
cfg_scalenumberoptionalClassifier-Free Guidance scale.
streambooleanoptionalWhether to stream the response.
batch_sizeintegeroptionalNumber of images to generate in a batch.
denoising_strengthnumberoptionalDenoising strength for img2img.
maskstringoptionalBase64-encoded mask for inpainting.
mask_blurintegeroptionalMask blur for inpainting.
inpainting_fillintegeroptionalInpainting fill mode.
inpaint_full_resbooleanoptionalWhether to inpaint at full resolution.
inpaint_full_res_paddingintegeroptionalPadding for full-resolution inpainting.
inpainting_mask_invertintegeroptionalWhether to invert the inpainting mask.
initial_noise_multipliernumberoptionalInitial noise multiplier.
detailer_enabledbooleanoptionalEnable the detailer.
detailer_promptstringoptionalPrompt for the detailer.
detailer_negativestringoptionalNegative prompt for the detailer.
detailer_stepsintegeroptionalSteps for the detailer.
detailer_strengthnumberoptionalStrength of the detailer.
detailer_modelstringoptionalModel for the detailer.
detailer_classesstringoptionalClasses for the detailer.
detailer_confnumberoptionalConfidence for the detailer.
detailer_maxintegeroptionalMax detections for the detailer.
detailer_iounumberoptionalIoU for the detailer.
detailer_paddingintegeroptionalPadding for the detailer.
detailer_blurintegeroptionalBlur for the detailer.
detailer_mergebooleanoptionalMerge mode for the detailer.
schedulers_rescale_betasbooleanoptionalRescale betas for schedulers.
schedulers_use_thresholdingbooleanoptionalUse thresholding for schedulers.
schedulers_sigmanumberoptionalSigma for schedulers.
schedulers_beta_schedulestringoptionalBeta schedule for schedulers.
scheduler_etanumberoptionalETA for schedulers.
schedulers_solver_orderintegeroptionalSolver order for schedulers.
schedulers_beta_startnumberoptionalBeta start for schedulers.
schedulers_beta_endnumberoptionalBeta end for schedulers.
schedulers_timesteps_rangestringoptionalTimesteps range for schedulers.
schedulers_shiftnumberoptionalShift for schedulers.
schedulers_sigma_adjustbooleanoptionalSigma adjustment for schedulers.
schedulers_sigma_adjust_minnumberoptionalMin sigma adjustment.
schedulers_sigma_adjust_maxnumberoptionalMax sigma adjustment.
ip_adapterarrayoptionalImage-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires a model with supportsIPAdapter.
control_unitsarrayoptionalOptional ControlNet-style conditioning units applied on top of the generation (same per-unit fields as control[] on /v1/control).
init_controlarray of stringsoptionalBase64-encoded control input image(s) kept separate from the init image(s).
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}'

POST /txt2img

Handles text-to-image generation.

Parameters

ParameterTypeRequiredDescription
sd_model_checkpointstringrequiredThe name of the model checkpoint.
promptstringrequiredThe text prompt.
negative_promptstringoptionalThe negative prompt.
stepsintegeroptionalNumber of sampling steps.
sampler_namestringoptionalSampling method.
widthintegeroptionalImage width.
heightintegeroptionalImage height.
clip_skipintegeroptionalNumber of CLIP layers to skip.
seedintegeroptionalRandom seed.
cfg_scalenumberoptionalClassifier-Free Guidance scale.
streambooleanoptionalWhether to stream the response.
batch_sizeintegeroptionalNumber of images to generate in a batch.
hr_sampler_namestringoptionalSampler name for high-res fix.
detailer_enabledbooleanoptionalEnable the detailer.
detailer_promptstringoptionalPrompt for the detailer.
detailer_negativestringoptionalNegative prompt for the detailer.
detailer_stepsintegeroptionalSteps for the detailer.
detailer_strengthnumberoptionalStrength of the detailer.
detailer_modelstringoptionalModel for the detailer.
detailer_classesstringoptionalClasses for the detailer.
detailer_confnumberoptionalConfidence for the detailer.
detailer_maxintegeroptionalMax detections for the detailer.
detailer_iounumberoptionalIoU for the detailer.
detailer_paddingintegeroptionalPadding for the detailer.
detailer_blurintegeroptionalBlur for the detailer.
detailer_mergebooleanoptionalMerge mode for the detailer.
schedulers_rescale_betasbooleanoptionalRescale betas for schedulers.
schedulers_use_thresholdingbooleanoptionalUse thresholding for schedulers.
schedulers_sigmanumberoptionalSigma for schedulers.
schedulers_beta_schedulestringoptionalBeta schedule for schedulers.
scheduler_etanumberoptionalETA for schedulers.
schedulers_solver_orderintegeroptionalSolver order for schedulers.
schedulers_beta_startnumberoptionalBeta start for schedulers.
schedulers_beta_endnumberoptionalBeta end for schedulers.
schedulers_timesteps_rangestringoptionalTimesteps range for schedulers.
schedulers_shiftnumberoptionalShift for schedulers.
schedulers_sigma_adjustbooleanoptionalSigma adjustment for schedulers.
schedulers_sigma_adjust_minnumberoptionalMin sigma adjustment.
schedulers_sigma_adjust_maxnumberoptionalMax sigma adjustment.
ip_adapterarrayoptionalImage-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires a model with supportsIPAdapter.
control_unitsarrayoptionalOptional ControlNet-style conditioning units applied on top of the generation (same per-unit fields as control[] on /v1/control).
init_controlarray of stringsoptionalBase64-encoded control input image(s) kept separate from the init image(s).
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}'

POST /v1/control

ControlNet-guided generation: generate an image conditioned by one or more control units (ControlNet, T2I-Adapter, ControlNet-XS, ControlLLLite, Reference). 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.

Parameters

ParameterTypeRequiredDescription
sd_model_checkpointstringrequiredThe name of the model checkpoint (must support ControlNet generation).
promptstringrequiredThe text prompt.
negative_promptstringoptionalThe negative prompt.
Control Units
controlarrayrequiredList of control units. At least one enabled unit with an image is required. See control[] fields below.
unit_typestringoptionalControl unit family used by units that don't set their own: 'controlnet', 't2i adapter', 'xs', 'lite', or 'reference'. Default: 'controlnet'.
control[].unit_typestringoptionalPer-unit type override: 'controlnet', 't2i adapter', 'xs', 'lite', or 'reference'. Defaults to the request-level unit_type.
control[].processstringoptionalPreprocessor 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[].modelstringoptionalControl model file name for the unit type (e.g. "Canny XL", "OpenPose XL"). List via GET /v1/control-models.
control[].imagestringoptionalBase64-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[].overridestringoptionalBase64-encoded pre-computed control map that bypasses the preprocessor. Takes priority over image.
control[].strengthnumberoptionalHow strongly the control model influences generation (0.0-2.0). Default 1.0.
control[].startnumberoptionalStep fraction at which control begins (0.0-1.0). Default 0.0.
control[].endnumberoptionalStep fraction at which control ends (0.0-1.0). Default 1.0.
control[].modestringoptionalControl mode for Union/ProMax models. List valid modes via GET /v1/control-modes.
control[].guessbooleanoptionalGuess mode: remove the need for a prompt (ControlNet only).
control[].factornumberoptionalConditioning scale factor (T2I-Adapter only). Default 1.0.
control[].attentionstringoptionalAttention mechanism: 'Attention', 'Adain', or 'Attention Adain' (Reference units).
control[].fidelitynumberoptionalStyle fidelity 0.0-1.0 (Reference units). Default 0.5.
control[].query_weightnumberoptionalAttention query weight (Reference units). Default 1.0.
control[].adain_weightnumberoptionalAdaIN weight (Reference units). Default 1.0.
control[].process_paramsobjectoptionalPer-unit preprocessor parameter overrides, e.g. {"low_threshold": 50, "high_threshold": 150} for Canny.
Generation
sampler_namestringoptionalSampling method.
stepsintegeroptionalNumber of sampling steps (max 40).
seedintegeroptionalRandom seed (-1 = random).
cfg_scalenumberoptionalClassifier-Free Guidance scale.
batch_sizeintegeroptionalNumber of images to generate in a batch.
Init Image Editing
input_typeintegeroptional0 = control only, 1 = init image same as the first control image, 2 = separate init image. Default 0.
init_controlarray of stringsoptionalBase64-encoded init image(s) when input_type is 1 or 2, carried in the only base64 init channel the API accepts.
initsarray of stringsoptionalBase64-encoded init image(s) (low-level alias).
maskstringoptionalBase64-encoded mask for inpaint-style edits.
denoising_strengthnumberoptionalDenoising strength when editing an init image.
Size
width_beforeintegeroptionalInitial/control image resolution width. Defaults to the control image size.
height_beforeintegeroptionalInitial/control image resolution height. Defaults to the control image size.
width_afterintegeroptionalPost-generation resolution width.
height_afterintegeroptionalPost-generation resolution height.
width_maskintegeroptionalMask resolution width.
height_maskintegeroptionalMask resolution height.
IP-Adapter
ip_adapterarrayoptionalImage-prompt conditioning: list of {adapter, images (array of base64), scale, crop, start, end}. Requires supportIpAdapter model.
Detailer
detailer_enabledbooleanoptionalEnable the face/detailer refinement pass.
detailer_promptstringoptionalPrompt for the detailer.
detailer_negativestringoptionalNegative prompt for the detailer.
detailer_stepsintegeroptionalSteps for the detailer.
detailer_strengthnumberoptionalStrength of the detailer.
detailer_model / detailer_modelsstring | arrayoptionalDetailer model name(s) (override_settings).
detailer_conf / detailer_iounumberoptionalDetailer detection confidence / IoU thresholds (override_settings).
detailer_max / detailer_min_size / detailer_max_sizeintegeroptionalDetailer bbox size limits (override_settings).
detailer_padding / detailer_blurintegeroptionalDetailer face padding / blur (override_settings).
detailer_merge / detailer_sigma_adjust / detailer_sigma_adjust_maxboolean | numberoptionalDetailer merge mode and sigma adjustment (override_settings).
Schedulers
schedulers_rescale_betasbooleanoptionalRescale betas for schedulers.
schedulers_use_thresholdingbooleanoptionalUse thresholding for schedulers.
schedulers_sigmanumberoptionalSigma for schedulers.
schedulers_beta_schedulestringoptionalBeta schedule for schedulers.
scheduler_etanumberoptionalETA for schedulers.
schedulers_solver_orderintegeroptionalSolver order for schedulers.
schedulers_use_loworderbooleanoptionalUse low-order solver.
schedulers_prediction_typestringoptionalPrediction type for schedulers.
schedulers_timestep_spacingstringoptionalTimestep 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. Use this to prepare control maps before calling /v1/control with the map as a unit image, or to preview what a preprocessor produces.

Parameters

ParameterTypeRequiredDescription
modelstringrequiredPreprocessor name (e.g. "Canny", "OpenPose", "Depth Anything", "MLSD"). List available names via GET /v1/preprocessors.
imagestringrequiredBase64-encoded input image to preprocess.
paramsobjectoptionalPreprocessor 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

Upscales a single image.

Parameters

ParameterTypeRequiredDescription
imagestringrequiredThe base64-encoded image to upscale.
upscaler_1stringoptionalThe name of the upscaler to use.
resize_modeintegeroptionalThe resize mode.
upscaling_resizenumberoptionalThe 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

Generates a descriptive prompt (OpenCLIP/BLIP) from an image.

Parameters

ParameterTypeRequiredDescription
imagestringrequiredThe base64-encoded image to generate a caption from.
modelstringrequiredThe caption model to use (available via GET /caption/models).
modestringoptionalCaption mode: 'best', 'fast', 'classic', 'caption', or 'negative'.
analyzebooleanoptionalWhen 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

Generates booru-style tags (WaifuDiffusion/DeepBooru) for an image.

Parameters

ParameterTypeRequiredDescription
imagestringrequiredThe base64-encoded image to tag.
modelstringrequiredThe tagger model to use (available via GET /tagger/models).
thresholdnumberoptionalMinimum general confidence to include a tag (default 0.50).
character_thresholdnumberoptionalMinimum character confidence to include a tag (default 0.85).
max_tagsintegeroptionalMaximum number of tags to return (default 74).
include_ratingbooleanoptionalInclude rating tags (general, sensitive, questionable, explicit).
sort_alphabooleanoptionalSort tags alphabetically instead of by confidence.
use_spacesbooleanoptionalUse spaces instead of underscores between words.
escape_bracketsbooleanoptionalEscape brackets so tags are prompt-safe (default true).
exclude_tagsstringoptionalComma-separated tags to always exclude.
show_scoresbooleanoptionalInclude 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}'

Model Information

GET /models/textgen-models

Retrieves available text generation models. No parameters.

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

GET /models/image-models

Retrieves available image generation models. No parameters.

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

GET /upscalers

Retrieves available upscalers. No parameters.

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

GET /caption/models

Retrieves the caption models available to your account. No parameters.

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

GET /tagger/models

Retrieves the tagger models available to your account. No parameters.

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

GET /img-options

Retrieves image generation options. No parameters.

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

GET /img-samplers

Retrieves available image samplers. No parameters.

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

GET /v1/ip-adapters

Lists 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.

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 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).

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 available control preprocessors (name, group, and their configurable parameters). 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 control modes (Union/ProMax predefines) available for the selected checkpoint via ?model=. Returns a map of control model name to available modes.

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

GET /parallel-requests

Retrieves parallel request limits. No parameters.

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

Model Status & Performance

Note: These endpoints are public and do not require an API key. They are intended for live status / monitoring and may be polled by any client. Use judiciously — avoid hammering them at high frequency.

GET /model/all

Returns the full list of available text-generation models, each annotated with a live status (availability) boolean plus cached performance and usage statistics. Use the status field to check whether a model is currently online before sending requests.

1curl -X GET https://api.arliai.com/model/all

Response Example

1[
2  {
3    "name": "Gemma-4-31B-Lilith-v1.0",
4    "reasoning": true,
5    "vlm": true,
6    "systemPrompt": "You are an intelligent assistant.",
7    "promptFormat": "Gemma4",
8    "quant": "r64",
9    "engine": "vllm",
10    "parameters": "31B",
11    "creationMethod": "LoRA Finetune",
12    "contextSize": "262144",
13    "modelLink": "https://huggingface.co/darthcrawl/Lilith-31B-v1.0",
14    "modelRecommendation": "Creative model",
15    "modelSize": "Gemma-4-31B - LoRA",
16    "modelType": "Gemma31B",
17    "requestsPerDay": "220",
18    "requestsPerWeek": "859",
19    "requestTokensPerDay": "724792",
20    "responseTokensPerDay": "6482",
21    "requestTokensPerWeek": "4929074",
22    "responseTokensPerWeek": "113803",
23    "hourlyTokenUsage": { "2026-07-31T16": 209353, "2026-07-31T17": 32663 },
24    "addedAt": "2026-07-25T22:31:08.838Z",
25    "avgResponseTime": 8218,
26    "avgTimeToFirstToken": 4743,
27    "avgPreprocessingTokensPerSecond": 1193.64,
28    "avgGenerationTokensPerSecond": 20.9,
29    "status": true
30  }
31  // ... one object per model
32]

Parameters

ParameterTypeRequiredDescription
Identity
namestringalwaysThe model identifier to pass as the "model" field in generation requests.
statusbooleanalwaysLive availability. true if at least one healthy server currently serves this model type; false otherwise. Check this before sending requests to avoid errors.
reasoningbooleanalwaysWhether the model supports reasoning/thinking tokens.
vlmbooleanalwaysWhether the model accepts image inputs (Vision Language Model).
contextSizestringalwaysMaximum context window in tokens.
parametersstringalwaysParameter count (e.g. "31B").
quantstringalwaysQuantization format (e.g. "r64", "INT8", "FP8").
enginestringalwaysInference engine (e.g. "vllm").
promptFormatstringalwaysChat template / prompt format name used by the model.
creationMethodstringalwaysHow the model was created (e.g. "FFT", "LoRA Finetune").
modelTypestringalwaysInternal type grouping shared servers (e.g. "Gemma31B"). Multiple models sharing a type share one health status.
modelSizestringalwaysBase group + variant. The portion before " - " is the base model used as the busyness key.
modelRecommendationstringalwaysShort human-readable description / category.
systemPromptstringalwaysDefault system prompt applied when none is provided.
modelLinkstringalwaysSource HuggingFace link.
addedAtstring (ISO date)alwaysWhen the model was added to the platform.
Performance (24h median, per base model)
avgResponseTimenumber | nulloptionalMedian total response time in ms over the last 24h (base-model aggregate). null if insufficient recent data.
avgTimeToFirstTokennumber | nulloptionalMedian time-to-first-token in ms — measured until the first generated token of any kind (content or reasoning) is received.
avgPreprocessingTokensPerSecondnumber | nulloptionalMedian prefill/prompt-processing speed = requestLength / TTFT (tokens/s).
avgGenerationTokensPerSecondnumber | nulloptionalMedian generation speed = responseLength / generationTime (tokens/s).
Usage (cached)
requestsPerDaystringalwaysRequest count in the last 24h.
requestsPerWeekstringalwaysRequest count in the last 7 days.
requestTokensPerDaystringalwaysPrompt tokens processed in the last 24h.
responseTokensPerDaystringalwaysGenerated tokens in the last 24h.
requestTokensPerWeekstringalwaysPrompt tokens processed in the last 7 days.
responseTokensPerWeekstringalwaysGenerated tokens in the last 7 days.
hourlyTokenUsageobjectalwaysMap of ISO hour key (e.g. "2026-07-31T16") to total tokens processed that hour. Covers a rolling 48h window, zero-filled for hours with no usage.

GET /model/busyness/live

Returns the current live server busyness percentage for every base model group, keyed by base model name. Busyness is the higher of request- and token-based load against configured capacity. A value of 0 means the model currently has no in-flight traffic. Poll this to pick the least busy model or to display real-time load.

1curl -X GET https://api.arliai.com/model/busyness/live

Response Example

1{
2  "GLM-4.6-Derestricted": 12.5,
3  "Gemma-4-31B": 37.5,
4  "DeepSeek-V4-Flash-0731": 25,
5  "GLM-4.7": 6.25,
6  "Qwen3.5-27B-Derestricted": 6.25
7}

SD API V1 Endpoints

Base path: /sdapi/v1

The endpoints under /sdapi/v1 are designed for compatibility with the Stable Diffusion API and share the same parameters as their /v1 counterparts.

POST /sdapi/v1/img2img

See /v1/img2img for parameters.

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  "init_images": ["base64_encoded_image"],
6  "prompt": "A futuristic city"
7}'

POST /sdapi/v1/txt2img

See /v1/txt2img for parameters.

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  "prompt": "A majestic lion in the savanna"
6}'

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.

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.

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

See /v1/upscale-img for parameters.

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

Retrieves available image models.

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

GET /sdapi/v1/upscalers

Retrieves available upscalers.

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

GET /sdapi/v1/options

Retrieves image generation options.

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

GET /sdapi/v1/samplers

Retrieves available image samplers.

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"