Authentication
All current /v1 endpoints require API Key authentication, and pass through gateway cross-cutting capabilities such as trace, body limit, access log, metering, and guardrail.
Obtain an API Key
Open Mossland
Go to the Mossland console and sign in to your account.
Open the API Key management platform
Click "API Key management platform" to open it and create a new API Key.
Copy and store it safely
The API Key is shown in full only at creation time. Save it to a server-side environment variable or a secrets management system.
Request headers
Every request carries the API Key via Authorization: Bearer <your-api-key>.
curl https://api.mosi.cn/v1/audio/speech \
-H "Authorization: Bearer $MOSS_API_KEY" \
-H "Content-Type: application/json" \
-d @request.json
Store your key
During local development you can put the API Key in a .env file; in production you should use a server-side environment variable or a secrets management system. Do not hardcode the API Key in frontend code or in public repositories.