HTTP
POST https://aiwave.live/v1/chat/completionsThe core Chat Completions path is stable. Tool calls, structured output, and advanced sampling still need a route-specific acceptance test.
POST https://aiwave.live/v1/chat/completionscurl https://aiwave.live/v1/chat/completions \
-H "Authorization: Bearer $AIWAVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":32}'| Field | Type | Required | Notes |
|---|---|---|---|
| model | string | yes | Use an ID visible to the account |
| messages | array | yes | Ordered role/content messages |
| max_tokens | integer | no | Bound output below the route limit |
| temperature | number | no | Support and range can vary by route |
| top_p | number | no | Avoid changing it with temperature during the first test |
| stream | boolean | no | Use the streaming contract when true |
| Field family | Examples | Rule |
|---|---|---|
| Tools | tools, tool_choice, parallel tool calls | Verify on the selected model |
| Structured output | response_format, JSON schema | Do not assume identical enforcement |
| Streaming details | stream_options, usage chunk | Verify the final chunk before relying on it |
| Sampling controls | stop, penalties, seed, logprobs | Unsupported fields may be ignored or rejected |
{
"id": "chatcmpl_...",
"model": "deepseek-v4-flash",
"choices": [{"message": {"role": "assistant", "content": "OK"}, "finish_reason": "stop"}],
"usage": {"prompt_tokens": 12, "completion_tokens": 1, "total_tokens": 13}
}The response usage object is part of the request evidence. The dated public rate is planning evidence; do not reconstruct the final charge from character counts.