Moonshot logoMoonshot

    moonshot-v1-128k

    moonshot/moonshot-v1-128k

    ChatFilesToolsSystem prompt

    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

    Web searchGtwy web search

    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_tokens

    The maximum number of tokens to generate for the chat completion. Maps to max_completion_tokens.

    creativity_levelTemperature

    Controls 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 P

    Nucleus sampling. The model considers tokens with a cumulative probability mass of top_p. Maps to top_p.

    response_countN

    The number of results to generate for each input message. Must not exceed 5. Maps to n.

    novelty_penaltyPresence Penalty

    Positive 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 Penalty

    Positive values penalize new tokens based on their existing frequency in the text, reducing verbatim repetition. Maps to frequency_penalty.

    tools

    Lists tool definitions or capabilities available to the model.

    tool_choice

    Decides whether to use tools or just the model for generating responses.

    response_type
    additional_stop_sequencesStop Sequences

    Up to 5 stop sequences that halt generation when fully matched. Maps to stop.

    stream

    Sends the response in real-time as it's being generated.