Setup
Basic Usage
Parameters
Model identifier.
Moonshot API key. Defaults to the
MOONSHOT_API_KEY environment variable.Moonshot API base URL.
Sampling temperature.
Maximum output tokens.
Streaming
Async Usage
Moonshot uses an OpenAI-compatible API. All standard parameters like
temperature, max_tokens, top_p, and stop are supported.