Endpoint Details
Review how to make this request and handle its possible responses.
https://integrate.api.nvidia.com/v1/chat/completionsGiven a list of messages comprising a conversation, the model will return a response. Compatible with OpenAI. See https://platform.openai.com/docs/api-reference/chat/create
Request Body
Edit the request fields below.
Request details
Parameters10 Parameters
modeloptionalz-ai/glm-5.3-flashmax_tokensoptionalThe maximum number of tokens to generate in any given call. Note that the model is not aware of this value, and generation will simply stop at the number of tokens specified.
1024Minimum: 1streamoptionalIf set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events (SSE) as they become available (JSON responses are prefixed by `data: `), with the stream terminated by a `data: [DONE]` message.
falsetemperatureoptionalThe sampling temperature to use for text generation. The higher the temperature value is, the less deterministic the output text will be. It is not recommended to modify both temperature and top_p in the same call.
0.5Minimum: 0Maximum: 1top_poptionalThe top-p sampling mass used for text generation. The top-p value determines the probability mass that is sampled at sampling time. For example, if top_p = 0.2, only the most likely tokens (summing to 0.2 cumulative probability) will be sampled. It is not recommended to modify both temperature and top_p in the same call.
1Minimum: 0Maximum: 1stopoptionalA string or a list of strings where the API will stop generating further tokens. The returned text will not contain the stop sequence.
nullfrequency_penaltyoptionalIndicates how much to penalize new tokens based on their existing frequency in the text so far, decreasing model likelihood to repeat the same line verbatim.
0Minimum: -2Maximum: 2presence_penaltyoptionalPositive values penalize new tokens based on whether they appear in the text so far, increasing model likelihood to talk about new topics.
0Minimum: -2Maximum: 2seedoptionalThe model generates random results. Changing the input seed alone will produce a different response with similar characteristics. It is possible to reproduce results by fixing the input seed (assuming all other hyperparameters are also fixed).
0Minimum: 0Maximum: 18446744073709552000messagesrequiredA list of messages comprising the conversation so far.
[{"role":"user","content":"Which number is larger, 9.11 or 9.8?"}]Example: [{"role":"user","content":"Which number is larger, 9.11 or 9.8?"}]Headers3 Headers
AuthorizationrequiredFormat: Bearer $NVIDIA_API_KEY
Content-TyperequiredAcceptoptional