AsyncAPI channel · Moonshot AI
· Moonshot AI Chat Completions Streaming API
v1/chat/completions
HTTP+SSE channel for streaming chat completions. The client POSTs a
chat request with `stream: true` and the server responds with a
`text/event-stream` body. Each event is a `data:` line whose value
is either a JSON `chat.completion.chunk` object or the literal
string `[DONE]`.
Client request body that opens a streaming chat completion.
Content-Type: application/json
ChatCompletionChunkEvent
One streamed `chat.completion.chunk` object. Delivered on the wire
as `data: {json}\n\n`.
Content-Type: application/json
ChatCompletionDoneEvent
Sentinel event marking the end of the SSE stream. Delivered on
the wire as the literal `data: [DONE]\n\n`. The payload is the
string `[DONE]` (not JSON).
Content-Type: text/plain
About AsyncAPI
The AsyncAPI specification describes event-driven APIs the way OpenAPI describes request/response APIs. A channel is the named pipe — a webhook URL, a Kafka topic, a WebSocket route, an MQTT subject — that producers and consumers publish or subscribe to. Each channel carries one or more messages with structured payloads, and an operation declares whether a given party sends or receives on that channel.
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.