Chat Completion
The core endpoint of the WiLine Edge Cloud Inference API. Send a conversation (a list of messages) and receive a model-generated reply. The API is fully OpenAI-compatible — any SDK or tool that supports OpenAI works unchanged by pointing base_url at https://inference.wiline.com/v1.
POST/v1/chat/completions
Create a chat completion on any model available on your WiLine Edge Cloud endpoint.
Normalizer Mode: Append -normalize to the model name (e.g. deepseek-ai/DeepSeek-V4-Pro-normalize) to route the request through the normalizer proxy, which applies the following fixes to non-standard OpenAI responses:
reasoning_content→reasoning(streaming deltas and non-streaming messages)- Tool call IDs:
functions.xxx:N→chatcmpl-tool-<hash> content=Nonewithtool_calls→content=""- Strip empty
tool_calls=[]from streaming deltas - Remove
content=nullfrom streaming tool call deltas - Strip whitespace-only
contentwhentool_callsare present in streaming deltas
OpenAI-compatible: Any OpenAI SDK or tool works unchanged — set base_url to https://inference.wiline.com/v1 and use your WEC API key as the Bearer token.
curl -X POST https://inference.wiline.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WEC_API_KEY" \
-d '{
"model": "deepseek-ai/DeepSeek-V3.1",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Request
Responses
- 200
Successful Response