https://<ENDPOINT_HOST>/v1. On supported routes such as GLM-5.1, you can send pre-tokenized prompts to /v1/completions and constrain decoding with SGLang/XGrammar-compatible EBNF by passing ebnf.
Curl Request
stream to true and add -N to stream text completion chunks as server-sent events:
Request Body
Advanced SGLang passthrough fields are also accepted when you need lower-level control:
custom_params, ignore_eos, no_stop_trim, spaces_between_special_tokens, stop_regex, structural_tag, custom_logit_processor, logprob_start_len, lora_path, priority, return_hidden_states, return_logprob, return_routed_experts, return_text_in_logprobs, rid, token_ids_logprob, and top_logprobs_num.
Response Shape
Non-streaming responses use the OpenAI text completion shape:/v1/completions, use the standard chat completions path instead.