---
updatedAt: 2026-11-05T13:21:01.000Z
---

# Request response from the model

Invokes inference using the model chat parameters.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "NVIDIA NIM API for moonshotai/kimi-k3.1-pro",
    "description": "The NVIDIA NIM REST API. Please see https://docs.api.nvidia.com/nim/reference/moonshotai-kimi-k3_1-pro for more details.",
    "version": "1.0.0",
    "termsOfService": "https://nvidia.com/legal/terms-of-use",
    "contact": {
      "name": "NVIDIA Support",
      "url": "https://help.nvidia.com/"
    },
    "license": {
      "name": "NVIDIA Open Model License",
      "url": "https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/"
    }
  },
  "servers": [
    {
      "url": "https://integrate.api.nvidia.com/v1"
    }
  ],
  "tags": [
    {
      "name": "Multimodal API",
      "description": "This API performs inference using visual language understanding models"
    }
  ],
  "paths": {
    "/chat/completions": {
      "post": {
        "tags": [
          "Multimodal API"
        ],
        "summary": "Request response from the model",
        "description": "Invokes inference using the model chat parameters.",
        "operationId": "moonshotai-kimi-k3_1-pro-infer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NIMLLMChatCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invocation is fulfilled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionStreamResponse"
                }
              }
            }
          },
          "202": {
            "description": "Result is pending. Client should poll using the requestId.\n",
            "content": {
              "application/json": {
                "example": {},
                "schema": {}
              }
            },
            "headers": {
              "NVCF-REQID": {
                "description": "requestId required for pooling",
                "schema": {
                  "type": "string",
                  "format": "uuid",
                  "maxLength": 36
                }
              },
              "NVCF-STATUS": {
                "description": "Invocation status",
                "schema": {
                  "type": "string",
                  "format": "^[a-zA-Z-]{1,64}$",
                  "maxLength": 64
                }
              }
            }
          },
          "422": {
            "description": "Validation failed, provided entity could not be processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "type": "urn:nvcf-worker-service:problem-details:unprocessable-entity",
                  "title": "Unprocessable Entity",
                  "status": 422,
                  "detail": "string",
                  "instance": "/v2/nvcf/pexec/functions/e598bfc1-b058-41af-869d-556d3c7e1b48",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                }
              }
            }
          },
          "500": {
            "description": "The invocation ended with an error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "type": "urn:nvcf-worker-service:problem-details:internal-server-error",
                  "title": "Internal Server Error",
                  "status": 500,
                  "detail": "string",
                  "instance": "/v2/nvcf/pexec/functions/e598bfc1-b058-41af-869d-556d3c7e1b48",
                  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                }
              }
            }
          }
        },
        "x-nvai-meta": {
          "name": "Create chat completion",
          "returns": "Returns a [chat completion](/docs/api-reference/chat/object) object, or a streamed sequence of [chat completion chunk](/docs/api-reference/chat/streaming) objects if the request is streamed.\n",
          "path": "create",
          "examples": [
            {
              "name": "image",
              "input": {
                "text": "What is in this image?",
                "images": [
                  "https://assets.ngc.nvidia.com/products/api-catalog/phi-3-5-vision/example1b.jpg"
                ]
              },
              "output": {
                "text": "The image shows a wooden boardwalk cutting through tall grass under a blue sky."
              },
              "requestJson": "{\n  \"model\": \"moonshotai/kimi-k3.1-pro\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        { \"type\": \"text\", \"text\": \"What is in this image?\" },\n        { \"type\": \"image_url\", \"image_url\": { \"url\": \"https://assets.ngc.nvidia.com/products/api-catalog/phi-3-5-vision/example1b.jpg\" } }\n      ]\n    }\n  ],\n  \"max_tokens\": 1024,\n  \"temperature\": 1.0,\n  \"stream\": true,\n  \"reasoning_effort\": \"low\"\n}\n",
              "responseJson": "{\n  \"id\": \"chatcmpl-abc123\",\n  \"object\": \"chat.completion\",\n  \"created\": 1677858242,\n  \"model\": \"moonshotai/kimi-k3.1-pro\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"The image shows a wooden boardwalk through tall grass under a blue sky.\"\n      },\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 256,\n    \"completion_tokens\": 24,\n    \"total_tokens\": 280\n  }\n}\n"
            },
            {
              "name": "Which number is larger, 9.11 or 9.8?",
              "input": {
                "text": "Which number is larger, 9.11 or 9.8?"
              },
              "output": {
                "text": "9.8 is larger than 9.11."
              },
              "requestJson": "{\n  \"model\": \"moonshotai/kimi-k3.1-pro\",\n  \"messages\": [\n    { \"role\": \"user\", \"content\": \"Which number is larger, 9.11 or 9.8?\" }\n  ],\n  \"max_tokens\": 1024,\n  \"temperature\": 1.0,\n  \"stream\": true,\n  \"reasoning_effort\": \"low\"\n}\n"
            }
          ],
          "templates": [
            {
              "title": "Default",
              "response": "{\n  \"choices\": [{\n    \"index\": 0,\n    \"model\": \"moonshotai/kimi-k3.1-pro\",\n    \"message\": {\n      \"role\": \"assistant\",\n      \"content\": \"...\"\n    },\n    \"finish_reason\": \"stop\"\n  }],\n  \"usage\": {\n    \"prompt_tokens\": 9,\n    \"completion_tokens\": 12,\n    \"total_tokens\": 21\n  }\n}\n",
              "requestEjs": {
                "python": "# API access for this model is not available yet.\n#\n# This endpoint is published for preview and playground use only — it is not\n# open for programmatic access, and no API key will authorize it.\n",
                "langChain": "# API access for this model is not available yet.\n#\n# This endpoint is published for preview and playground use only — it is not\n# open for programmatic access, and no API key will authorize it.\n",
                "curl": "# API access for this model is not available yet.\n#\n# This endpoint is published for preview and playground use only — it is not\n# open for programmatic access, and no API key will authorize it."
              }
            }
          ]
        }
      }
    }
  },
  "security": [
    {
      "Token": []
    }
  ],
  "components": {
    "securitySchemes": {
      "Token": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "ChatCompletionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ],
            "const": "chat.completion",
            "title": "Object",
            "default": "chat.completion"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionResponseChoice"
            },
            "type": "array",
            "title": "Choices"
          },
          "usage": {
            "$ref": "#/components/schemas/UsageInfo"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "choices",
          "usage"
        ],
        "title": "ChatCompletionResponse"
      },
      "ChatCompletionResponseChoice": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "message": {
            "$ref": "#/components/schemas/ChatMessage"
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "stop",
                  "length"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Finish Reason"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "index",
          "message"
        ],
        "title": "ChatCompletionResponseChoice"
      },
      "ChatCompletionResponseStreamChoice": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "delta": {
            "$ref": "#/components/schemas/DeltaMessage"
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "stop",
                  "length"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Finish Reason"
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "index",
          "delta"
        ],
        "title": "ChatCompletionResponseStreamChoice"
      },
      "ChatCompletionStreamResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion.chunk"
            ],
            "const": "chat.completion.chunk",
            "title": "Object",
            "default": "chat.completion.chunk"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionResponseStreamChoice"
            },
            "type": "array",
            "title": "Choices"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "choices"
        ],
        "title": "ChatCompletionStreamResponse"
      },
      "ChatMessage": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "ChatMessage"
      },
      "DeltaMessage": {
        "properties": {
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DeltaMessage"
      },
      "ErrorResponse": {
        "properties": {
          "object": {
            "type": "string",
            "title": "Object",
            "default": "error"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Param"
          },
          "code": {
            "type": "integer",
            "title": "Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "message",
          "type",
          "code"
        ],
        "title": "ErrorResponse"
      },
      "ImageURL": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ImageURL"
      },
      "ChatCompletionFunctionParameters": {
        "type": "object",
        "title": "ChatCompletionFunctionParameters",
        "description": "JSON Schema object describing the function arguments.",
        "additionalProperties": true,
        "default": {
          "type": "object",
          "properties": {}
        }
      },
      "ChatCompletionFunction": {
        "type": "object",
        "title": "ChatCompletionFunction",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Function name.",
            "default": "get_current_weather"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Function description.",
            "default": "Get the current weather in a given location."
          },
          "parameters": {
            "$ref": "#/components/schemas/ChatCompletionFunctionParameters"
          }
        },
        "required": [
          "name",
          "description",
          "parameters"
        ]
      },
      "ChatCompletionTool": {
        "type": "object",
        "title": "ChatCompletionTool",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function"
            ],
            "const": "function",
            "title": "Type",
            "default": "function"
          },
          "function": {
            "$ref": "#/components/schemas/ChatCompletionFunction"
          }
        },
        "required": [
          "type",
          "function"
        ]
      },
      "NIMLLMChatCompletionMessage": {
        "properties": {
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Role"
              }
            ],
            "description": "The role of the message's author."
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/NIMVLMChatCompletionContentPartImage"
                    },
                    {
                      "$ref": "#/components/schemas/NIMVLMChatCompletionContentPartText"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content",
            "description": "The contents of the message.\n<br>To pass media (only with role=`user`):\n<br>    - Use content parts. Text is passed with `type`=`text`.\n<br>    - Images are passed with `type`=`image_url`; set `image_url.url` to an image URL or a base64 data URI like `data:image/{format};base64,{base64encodedimage}`.\n<br>For `system` and `assistant` roles, the object list format is not supported.\n"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Optional participant or tool name."
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id",
            "description": "Tool call ID that this tool message is responding to."
          },
          "tool_calls": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls",
            "description": "Tool calls generated by an assistant message."
          },
          "reasoning_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Content",
            "description": "Optional preserved reasoning content from a previous assistant turn."
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "NIMLLMChatCompletionMessage"
      },
      "NIMLLMChatCompletionRequest": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/NIMLLMChatCompletionMessage"
            },
            "type": "array",
            "minItems": 1,
            "title": "Messages",
            "description": "A list of messages comprising the conversation so far."
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The model to use.",
            "default": "moonshotai/kimi-k3.1-pro"
          },
          "tools": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChatCompletionTool"
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools",
            "description": "Optional OpenAI-compatible tool definitions for function calling."
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 65536,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens",
            "description": "The maximum number of tokens that can be generated.",
            "default": 16384
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Changing the seed will produce a different response with similar characteristics. Fixing the seed will reproduce the same results if all other parameters are also kept constant.",
            "default": 0
          },
          "stream": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream",
            "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]`",
            "default": true
          },
          "stream_options": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream Options",
            "description": "Optional OpenAI-compatible stream options, such as `include_usage`."
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "description": "What sampling temperature to use, between 0 and 1. Higher values make the output more random; lower values make it more focused and deterministic. Note: the other sampling parameters (top_p, presence_penalty, frequency_penalty, n) are fixed by the model and are not exposed.",
            "default": 1
          },
          "reasoning_effort": {
            "enum": [
              "low",
              "medium",
              "high",
              "max"
            ],
            "default": "low",
            "title": "Reasoning Effort",
            "description": "Controls how long the model reasons before answering: `low`, `medium`, `high`, or `max`. Per-request override of the serve-time default; unset falls back to the endpoint default (`low`)."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "messages",
          "model"
        ],
        "title": "NIMLLMChatCompletionRequest"
      },
      "NIMVLMChatCompletionContentPartImage": {
        "properties": {
          "image_url": {
            "$ref": "#/components/schemas/ImageURL"
          },
          "type": {
            "type": "string",
            "enum": [
              "image_url"
            ],
            "const": "image_url",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "image_url",
          "type"
        ],
        "title": "NIMVLMChatCompletionContentPartImage"
      },
      "NIMVLMChatCompletionContentPartText": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "const": "text",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "text",
          "type"
        ],
        "title": "NIMVLMChatCompletionContentPartText"
      },
      "Role": {
        "type": "string",
        "enum": [
          "system",
          "assistant",
          "user",
          "tool"
        ],
        "title": "Role"
      },
      "UsageInfo": {
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens",
            "default": 0
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "default": 0
          },
          "completion_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completion Tokens",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UsageInfo"
      }
    }
  }
}
```