Launching the API Server
1
Start the server
Launch the API server with a single command. The server will be available on port 1919 by default.To use a custom port:
2
Wait for server initialization
The server will download the model (if not already cached) and compile necessary kernels. You should see output indicating the server is ready:
3
Verify the server is running
Check available models:Expected output:
Sending Requests
Chat Completions
The/v1/chat/completions endpoint accepts OpenAI-compatible requests:
Supported Parameters
string
required
Model identifier (must match the deployed model)
array
required
Array of message objects with
role and content fieldsinteger
default:"16"
Maximum number of tokens to generate
float
default:"1.0"
Sampling temperature (higher values = more random)
integer
default:"-1"
Top-k sampling parameter
float
default:"1.0"
Nucleus sampling parameter
boolean
default:"false"
Enable streaming responses