cURL examples
Uthana provides a powerful GraphQL API for all programmatic access to animation, character, and motion data. There is no REST API—all features are available via GraphQL.
This guide shows how to use curl to interact with the GraphQL API, including authentication, queries, mutations, and file uploads.
Endpoint
https://uthana.com/graphql
Authentication
Use the -u flag to authenticate with your API key:
curl -s "https://uthana.com/graphql" \
-u YOUR_API_KEY: \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{<your-query-or-mutation>}'
or include your API key in the basic Authorization header, base64-encoded with a colon:
AUTH_STRING=$(echo -n "<your-api-key>:" | base64)
curl -H "Authorization: Basic $AUTH_STRING" \
https://uthana.com/graphql
or as a query parameter:
curl 'https://uthana.com/graphql?apikey=<your-api-key>'
Making GraphQL queries with cURL
Send a POST request with your query or mutation in the JSON body:
Get motion details
curl -X POST https://uthana.com/graphql \
-u <your-api-key>: \
-H "Content-Type: application/json" \
-d '{
"query": "query GetMotion($id: String!) { motion(id: $id) { id name created } }",
"variables": { "id": "m3G3XSJrjEJH" }
}'
Get org info
curl -X POST https://uthana.com/graphql \
-u <your-api-key>: \
-H "Content-Type: application/json" \
-d '{"query":"{ org { id name } }"}'
Download a motion
To download a motion file with character mesh (fbx or glb), use the following endpoint:
https://uthana.com/motion/file/motion_viewer/{character_id}/{motion_id}/{type}/{character_id}-{motion_id}.{type}
- character_id: The character's ID
- motion_id: The motion's ID
- type: The file type/format (
fbx,glb)
Download a motion as FBX
curl -L "https://uthana.com/motion/file/motion_viewer/<character-id>/<motion-id>/fbx/<character-id>-<motion-id>.fbx" \
-u <your-api-key>: \
-o motion.fbx
- Replace
<character-id>and<motion-id>with your actual IDs. - The
-Lflag follows redirects (if any). - The
-oflag saves the file asmotion.fbx.
Download a motion without character mesh (currently only GLB is supported)
To download a motion-only GLB file (animation data without the character mesh), use the following endpoint:
curl -L "https://uthana.com/motion/animation/motion_viewer/<character-id>/<motion-id>/glb/<character-id>-<motion-id>.glb" \
-u <your-api-key>: \
-o motion-only.glb
- Replace
<character-id>and<motion-id>with your actual IDs. - The
-Lflag follows redirects (if any). - The
-oflag saves the file asmotion-only.glb. - Motion-only GLB files contain animation data without the character mesh. The character ID is required to ensure the correct skeleton is used.