moonshot-v1-128k
moonshot/moonshot-v1-128k
Context
131K
Max output
131K
Input / 1M
$2.00
Output / 1M
$5.00
Cached / 1M
Free
Cutoff
—
About this model
Moonshot V1 128K is Moonshot AI's generation model with a 131,072-token context window, suitable for generating very long texts and handling long-context chat, generation, and tool-calling tasks. Supports ToolCalls, JSON Mode, and Partial Mode.
Best suited for
- Very long-form text generation
- Long-context conversational AI and chat within 128K tokens
- Large document analysis, summarization, and Q&A
- Tool-calling and function-calling agents
- JSON/structured output generation
Built-in tools
Hosted by the gateway — enable them per request without wiring your own endpoint.
Capabilities
Files
Accepts file attachments — PDFs, transcripts, spreadsheets.
Tools
Native function calling, so agents can invoke your endpoints.
System prompt
Honours a dedicated system role, separate from the user turn.
Supported parameters
max_tokensThe maximum number of tokens to generate for the chat completion. Maps to max_completion_tokens.
creativity_levelTemperatureControls the creativity of responses. Higher values (e.g., 0.7) increase randomness; lower values (e.g., 0.2) make responses more focused and deterministic. Maps to temperature.
probability_cutoffTop PNucleus sampling. The model considers tokens with a cumulative probability mass of top_p. Maps to top_p.
response_countNThe number of results to generate for each input message. Must not exceed 5. Maps to n.
novelty_penaltyPresence PenaltyPositive values penalize new tokens based on whether they appear in the text so far, increasing the likelihood of new topics. Maps to presence_penalty.
repetition_penaltyFrequency PenaltyPositive values penalize new tokens based on their existing frequency in the text, reducing verbatim repetition. Maps to frequency_penalty.
toolsLists tool definitions or capabilities available to the model.
tool_choiceDecides whether to use tools or just the model for generating responses.
response_typeadditional_stop_sequencesStop SequencesUp to 5 stop sequences that halt generation when fully matched. Maps to stop.
streamSends the response in real-time as it's being generated.