API Usage Quick Start
Get up and running with the MOASIS API in a few minutes: create an API key, submit a prompt, and poll for your generated motion.
1. Create an API Key
Open Settings → API Keys in the MOASIS web app and create a key with the CHAT scope. See Key Management for details.
Every request must include the key in the Authorization header:
Authorization: Bearer sk-<your-api-key>2. Submit a Prompt and Poll for Results
bash
# 1. Submit a prompt
conversationId=$(curl -s -X POST http://mohub-dev.vgentx.com/api/v1/chat/generate \
-H "Authorization: Bearer sk-<your-api-key>" \
-H "Content-Type: application/json" \
-d '{"message": "Generate a person walking forward."}' | jq -r '.data.conversationId')
# 2. Poll until the turn completes and tasks are available
curl -s http://mohub-dev.vgentx.com/api/v1/chat/generate/conversation/$conversationId/tasks \
-H "Authorization: Bearer sk-<your-api-key>"
# 3. Once a task is COMPLETED, grab the presigned URL from its contents
wget $PRESIGNED_URL -O output.fbx # or
wget $PRESIGNED_URL -O output.mp4That's it — once a task's status is COMPLETED, its contents[].presignedUrl is a downloadable link to the generated motion.
Next Steps
For the full request/response shapes, individual endpoints, and task status values, see Text-To-Motion.