Moonshot V1
Creates a model response for the given chat conversation.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Model ID to use for completion.
moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k, moonshot-v1-8k-vision-preview, moonshot-v1-32k-vision-preview, moonshot-v1-128k-vision-preview "moonshot-v1-8k"
A list of messages comprising the conversation so far.
1[{ "role": "user", "content": "Hello!" }]The maximum number of tokens to generate in the chat completion.
x >= 1Sampling temperature between 0 and 2. Higher values make output more random, lower values more deterministic.
0 <= x <= 21
Nucleus sampling threshold. An alternative to temperature.
0 <= x <= 1Penalizes new tokens based on their existing frequency in the text so far.
-2 <= x <= 2Penalizes new tokens based on whether they appear in the text so far.
-2 <= x <= 2If true, partial message deltas will be sent as server-sent events.
Up to 4 sequences where the API will stop generating further tokens.
How many chat completion choices to generate for each input message.
x >= 1An object specifying the format that the model must output. Setting to {"type": "json_object"} enables JSON mode.
A list of tools the model may call. Currently, only functions are supported as a tool.
Controls which (if any) tool is called by the model.
A unique identifier representing your end-user.