Skip to main content

API Parameters

This page provides a complete list of all parameters supported by the Knox Chat API.

Core Parameters

Parameter NameTypeDefault ValueDescription
modelStringNoneThe model ID to use. If not specified, the user's default setting will be used.
messagesArray of ObjectsNoneAn array of messages for chat completion requests. Each message should include "role" and "content" fields.
promptStringNoneThe prompt text for text completion requests.

Shared Parameters

The following parameters can be used for both completion and chat completion requests:

Parameter NameTypeDefault ValueDescription
max_tokensIntegerNoneMaximum number of tokens to generate (range: [1, context_length)).
temperatureDouble1.0Sampling temperature (range: [0, 2]). Higher values produce more diverse results.
top_pDouble1.0Top-p sampling value (range: (0, 1]). Controls the probability space of vocabulary considered by the model.
top_kIntegerNoneTop-k sampling value (range: [1, Infinity)). Only considers the k most probable tokens.
streamBooleanfalseEnable streaming of results.
seedIntegerNoneSeed value for deterministic output.
frequency_penaltyDouble0.0Frequency penalty (range: [-2, 2]). Decreases the probability of tokens that have been used frequently.
presence_penaltyDouble0.0Presence penalty (range: [-2, 2]). Decreases the probability of tokens that have already appeared.
repetition_penaltyDouble1.0Repetition penalty (range: (0, 2]). Decreases the probability of repeated words.
logit_biasObjectNoneA mapping from token IDs to bias values for adjusting the probability of specific tokens.
min_pDouble0.0Minimum probability threshold (range: [0, 1]). Filters out tokens below the threshold.
top_aDoubleNoneAlternative top sampling parameter (range: [0, 1]).
top_logprobsIntegerNoneNumber of top log probabilities to return.

Knox Chat Specific Parameters

The following parameters are specific to Knox Chat:

Parameter NameTypeDefault ValueDescription
modelsArray of StringsNoneList of alternative models for routing override.
providerObjectNoneProvider preferences for routing.
transformsArray of StringsNoneList of prompt transformations (Knox Chat only).
reasoningObjectNoneConfiguration for model reasoning/thinking tokens.
usageObjectNoneWhether to include usage information in the response.

Context Length Limitations

Each model has different context length limitations, which determine the total number of input and output tokens. You can query the model list via the /v1/models endpoint to view the context_length value for each model.