1 link tagged with all of: api + model-deployment + nvidia + chat-completions + python
Links
This snippet shows how to call NVIDIA’s integrate API to run the moonshotai/kimi-k2.6 chat model. It covers setting headers, payload fields (model, tokens, temperature) and handling both JSON and stream responses.
- Sample code calls NVIDIA's integrate API (https://integrate.api.nvidia.com/v1/chat/completions) to run moonshotai/kimi-k2.6, requiring only an NVIDIA_API_KEY swapped into the Authorization header.
- Default payload uses temperature 1, top_p 1, a 16,384 token cap, and a fixed seed of 0 for reproducible outputs.
- Same code handles both streaming (line-by-line printing) and non-streaming (full JSON dump) responses by toggling the stream flag and Accept header.
- Snippet is portable and meant to be adapted to any endpoint provider, not just NVIDIA's hosted API.
nvidia
api
python
model-deployment
chat-completions