Appearance
Authentication
The Mosaic Motion API uses bearer tokens.
http
Authorization: Bearer motion_your_api_keyAPI key ownership
Each motion_ API key belongs to the user who created it. API initiated runs are owned by that user.
This means:
- The job is billed and attributed to the API key owner.
- Polling is limited to jobs owned by the API key owner.
- A key cannot access non-Mosaic Motion routes.
- Key management in the app is separate from runtime API authentication.
Key format
Mosaic Motion API keys start with:
txt
motion_The full key is shown once when created. Store it in a secret manager or server environment variable.
Example
bash
export MOTION_API_KEY="motion_your_api_key"
curl https://api.motion.so/api/motion/sessions \
-H "Authorization: Bearer $MOTION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Create a short product demo video."}'