# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. openapi: 3.1.0 info: title: NVIDIA NIM for VLMs summary: Accelerated VLM inference for NVIDIA GPUs. version: 1.1.2 paths: /v1/health/ready: get: tags: - Health summary: Health Ready description: Provide your implementation of readiness to know when container ready to accept traffic operationId: health_ready_v1_health_ready_get responses: '200': description: Successful Response content: application/json: schema: {} /v1/chat/completions: post: summary: OpenAI-compatible chat endpoint operationId: create_chat_completion_v1_chat_completions_post parameters: - name: content-type in: header required: false schema: anyOf: - type: string - type: 'null' title: Content-Type requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NIMLLMChatCompletionRequest' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/NIMLLMChatCompletionResponse' - $ref: '#/components/schemas/NIMLLMChatCompletionStreamResponse' title: Response Create Chat Completion V1 Chat Completions Post '400': description: Received an invalid request possibly containing unsupported or out-of-range parameter values. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: The requested model does not exist. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '415': description: Unsupported Media Type content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/files: post: tags: - Files summary: Upload a media file that can be used as inference input. description: Upload media files to be used as inference input. Currently, only images upto 50 MB are supported. operationId: add_media_file requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/AddFileRequest' responses: "200": description: Successful Response. content: application/json: schema: $ref: '#/components/schemas/AddFileResponse' "500": description: The invocation ended with an error. content: application/json: schema: $ref: '#/components/schemas/Errors' get: tags: - Files summary: Returns a list of the uploaded files. description: Returns a list that includes ID, file name, size, purpose, file size, and media type for the uploaded files. operationId: list_media_files responses: "200": description: Successful Response. content: application/json: schema: $ref: '#/components/schemas/ListFilesResponse' "500": description: The invocation ended with an error. content: application/json: schema: $ref: '#/components/schemas/Errors' /v1/files/{file_id}: delete: tags: - Files summary: Delete a uploaded file. description: Deletes an uploaded file based on ID. operationId: delete_media_file parameters: - name: file_id in: path required: true schema: type: string maxLength: 36 pattern: '[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}' description: File having 'file_id' to be deleted. title: File Id description: File having 'file_id' to be deleted. responses: "200": description: Successful Response. content: application/json: schema: $ref: '#/components/schemas/DeleteFileResponse' "500": description: The invocation ended with an error. content: application/json: schema: $ref: '#/components/schemas/Errors' components: schemas: BaseModel: properties: {} type: object title: BaseModel ChatCompletionLogProb: properties: token: type: string title: Token logprob: type: number title: Logprob default: -9999.0 bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes additionalProperties: false type: object required: - token title: ChatCompletionLogProb ChatCompletionLogProbs: properties: content: anyOf: - items: $ref: '#/components/schemas/ChatCompletionLogProbsContent' type: array - type: 'null' title: Content additionalProperties: false type: object title: ChatCompletionLogProbs ChatCompletionLogProbsContent: properties: token: type: string title: Token logprob: type: number title: Logprob default: -9999.0 bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes top_logprobs: items: $ref: '#/components/schemas/ChatCompletionLogProb' type: array title: Top Logprobs additionalProperties: false type: object required: - token title: ChatCompletionLogProbsContent ChatCompletionNamedFunction: properties: name: type: string title: Name additionalProperties: false type: object required: - name title: ChatCompletionNamedFunction ChatCompletionNamedToolChoiceParam: properties: function: $ref: '#/components/schemas/ChatCompletionNamedFunction' type: type: string const: function title: Type default: function additionalProperties: false type: object required: - function title: ChatCompletionNamedToolChoiceParam ChatCompletionResponseChoice: properties: index: type: integer title: Index message: $ref: '#/components/schemas/ChatMessage' logprobs: anyOf: - $ref: '#/components/schemas/ChatCompletionLogProbs' - type: 'null' finish_reason: anyOf: - type: string enum: - stop - length - tool_calls - type: 'null' title: Finish Reason default: stop 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' logprobs: anyOf: - $ref: '#/components/schemas/ChatCompletionLogProbs' - type: 'null' finish_reason: anyOf: - type: string enum: - stop - length - tool_calls - 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 ChatCompletionToolsParam: properties: type: type: string const: function title: Type default: function function: $ref: '#/components/schemas/FunctionDefinition' additionalProperties: false type: object required: - function title: ChatCompletionToolsParam ChatMessage: properties: role: type: string title: Role content: anyOf: - type: string - type: 'null' title: Content tool_calls: anyOf: - items: $ref: '#/components/schemas/ToolCall' type: array - type: 'null' title: Tool Calls 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 tool_calls: anyOf: - items: $ref: '#/components/schemas/ToolCall' type: array - type: 'null' title: Tool Calls 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 FunctionCall: properties: name: anyOf: - type: string - type: 'null' title: Name default: '' arguments: anyOf: - type: string - type: 'null' title: Arguments default: '' additionalProperties: false type: object title: FunctionCall FunctionDefinition: properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description parameters: anyOf: - type: object - type: 'null' title: Parameters additionalProperties: false type: object required: - name title: FunctionDefinition HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ImageURL: properties: url: type: string title: Url type: object required: - url title: ImageURL Logprob: properties: logprob: type: number title: Logprob rank: anyOf: - type: integer - type: 'null' title: Rank decoded_token: anyOf: - type: string - type: 'null' title: Decoded Token type: object required: - logprob title: Logprob NIMLLMChatCompletionMessage: properties: role: $ref: '#/components/schemas/Role' description: The role of the message's author. content: anyOf: - type: string minLength: 1 - items: anyOf: - $ref: '#/components/schemas/NIMVLMChatCompletionContentPartImage' - $ref: '#/components/schemas/NIMVLMChatCompletionContentPartText' - $ref: '#/components/schemas/NIMVLMChatCompletionContentPartVideo' - $ref: '#/components/schemas/NIMVLMChatCompletionContentPartVideoStreaming' type: array title: Content description: "The contents of the message.\n
To pass images (only\ \ with role=`user`):\n
- When content is a string, image\ \ can be passed together with the text with `img` HTML tags that wraps\n\ \ an image URL (``),\n base64 encoded\ \ image data (``),\n or an NVCF asset ID (``)\n when the container is hosted in NVCF and the payload exceeds\ \ 200KB.\n or http link (`https:{image_link}`)\n
\ \ - When content is a list of objects, images can be passed as objects\ \ with type=`image_url`.\n
- In both cases, images can\ \ be PNG, JPG or JPEG.\n
To pass videos (only with role=`user`):\n\ \
- When content is a string, video can be passed together\ \ with the text with `video` HTML tags that wraps\n a video URL\ \ (`