Quickstart
MoonNexAI public APIs authenticate requests with a Bearer API key.
Authorization: Bearer <MOONNEXAI_API_KEY>Recommended API domains:
| Domain | When to use |
|---|---|
https://moonnexai.com | Primary API domain; use this by default. |
OpenAI-compatible clients usually require /v1 at the end of the Base URL, for example https://moonnexai.com/v1.
Example requests
cURL
curl https://moonnexai.com/v1/models \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"JavaScript
const response = await fetch('https://moonnexai.com/v1/models', {
headers: {
Authorization: 'Bearer <MOONNEXAI_API_KEY>'
}
})
const models = await response.json()
console.log(models)Python
import requests
response = requests.get(
"https://moonnexai.com/v1/models",
headers={"Authorization": "Bearer <MOONNEXAI_API_KEY>"},
timeout=30,
)
print(response.json())Minimal video task workflow
Video, digital human, music and some image APIs return asynchronous tasks. Start video generation with POST /v1/videos:
curl https://moonnexai.com/v1/videos \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-kz-fast",
"prompt": "A cinematic product video, slow camera push-in, clean studio light.",
"duration": 5,
"aspect_ratio": "16:9"
}'Save the returned id or task_id, then query the task:
curl https://moonnexai.com/v1/tasks/task_xxx \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Check status and error before reading a result URL. Continue polling queued or running tasks and stop on a terminal state.
For image-to-video and image references, provide public URLs from storage you control. Selecting a video model does not automatically create an OSS URL or a model asset ID. mode=oss is intended for integration testing and does not guarantee long-term storage or availability. Asset authentication and test uploads are free where those capabilities are available.
Next steps
- Read the API Reference and endpoint directory.
- Review authentication, API keys and groups, task management, webhooks and errors.
- Browse text, images, video, uploads, digital humans, music and Web / Gemini.
- For Dreamina Seedance, see the combined Dreamina Seedance 2.0 / Dreamina Seedance 2.5 guide.
- Complete the integration checklist before going live.