Endpoint Details
Review how to make this request and handle its possible responses.
https://integrate.api.nvidia.com/v1/chat/completionsInvokes inference using the model chat parameters. If uploading large images, this POST should be used in conjunction with the NVCF API which allows for the upload of large assets. You can find details on how to use NVCF Asset APIs here: https://docs.api.nvidia.com/cloud-functions/reference/createasset
Request Body
Edit the request fields below.
Request details
Parameters8 Parameters
messagesrequiredA list of messages comprising the conversation so far.
1messages[].rolerequiredThe role of the message's author.
messages[].contentrequiredThe contents of the message. <br>To pass images (only with role=`user`): <br> - When content is a string, image can be passed together with the text with `img` HTML tags that wraps an image URL (`<img src="{url}" />`), base64 encoded image data (`<img src="data:image/{format};base64,{base64encodedimage}" />`), or an NVCF asset ID (`<img src="data:image/{format};asset_id,{asset_id}" />`) when the container is hosted in NVCF and the payload exceeds 200KB. <br> - When content is a list of objects, images can be passed as objects with type=`image_url`. <br> - In both cases, images can be PNG, JPG or JPEG. <br>For `system` and `assistant` roles, the object list format is not supported.
modelrequiredThe model to use.
nvidia/ising-calibration-1.5-31bmax_tokensoptionalThe maximum number of tokens that can be generated.
32768seedoptionalChanging 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.
streamoptionalIf 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]`
falsetemperatureoptionalWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
1top_poptionalAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
0.95top_koptionalThe number of highest probability vocabulary tokens to keep for top-k sampling.
64Headers4 Headers
AuthorizationrequiredFormat: Bearer $NVIDIA_API_KEY
Content-TyperequiredAcceptoptionalNVCF-INPUT-ASSET-REFERENCESstring