Console

API Overview

Use the API Reference to look up Moss API endpoints, request parameters, return values, streaming events, and shared rules. Start with the scenario guides for integration workflows; use the corresponding Reference page as the authority for field-level implementation.

Authentication

Send a Bearer Token in the request headers for every call. Export the Key as an environment variable and never commit it to a source repository.

cURL
curl "https://api.mosi.cn/v1/models" \
  -H "Authorization: Bearer $MOSS_API_KEY"

Endpoint overview

EndpointCapabilitySynchronousAsynchronousStreaming
GET /v1/modelsList available models✓--
POST /v1/filesUpload a file and obtain a file_id✓--
GET /v1/filesList files✓--
GET /v1/files/{file_id}Get file details✓--
DELETE /v1/files/{file_id}Delete a file✓--
POST /v1/audio/speechGenerate single-speaker speech, synchronously or as a stream✓✓✓
POST /v1/audio/speech/speakersGenerate multi-speaker dialogue✓✓-
POST /v1/audio/transcriptionsTranscribe audio✓✓✓
GET /v1/audio/voicesList voices✓--
POST /v1/audio/voicesCreate a voice✓--
POST /v1/audio/voice/generationsGenerate a voice✓✓-
POST /v1/responsesUnderstand images or video✓--
WSS /v1/realtimeRealtime video understanding, bidirectional WebSocket events (Beta)--✓
GET /v1/audio/tasks/{task_id}Get a task✓--
POST /v1/images/generationsGenerate an image✓--

Shared rules

RuleDescription
Base URLhttps://api.mosi.cn
AuthenticationAuthenticate every request with Authorization: Bearer $MOSS_API_KEY.
JSON requestsSpeech generation, transcription from a file_id or URL, multimodal understanding, and image generation use application/json.
File uploadsLocal file uploads use multipart/form-data; follow the field names documented for each endpoint.
SynchronousThe request stays connected and returns the result when processing completes.
AsynchronousLong-running audio operations can pass async=true, then poll GET /v1/audio/tasks/{task_id}.
StreamingHTTP streaming endpoints document the stream field and response protocol; realtime video understanding uses bidirectional WebSocket events, not SSE.
ErrorsSynchronous failures use the platform error object; field-level errors are documented on the endpoint page.