Spaces:
Running
Running
MLSE Player 3D API Curl Commands
These curl commands can be used to interact with the MLSE Player 3D API for generating 3D player models.
Upload an Image
Upload the matthews.jpg file to generate a 3D model:
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/upload" \
-F "file=@/Users/[email protected]/Downloads/matthews.jpg" \
-F "player_name=matthews" \
-F "use_keypoints=true" \
-F "use_mask=true"
Check Job Status
Check the status of a processing job (replace JOB_ID with the actual job ID from the upload response):
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/status" \
-H "Content-Type: application/json" \
-d '{
"job_id": "JOB_ID"
}'
Example with a specific job ID:
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/status" \
-H "Content-Type: application/json" \
-d '{
"job_id": "f7285376-585b-46c6-80d1-94eba9af5bc8"
}'
List All Jobs
List all processing jobs:
curl -X GET "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/jobs"
Get 3D Model File
Download the generated 3D model file (replace JOB_ID with the actual job ID):
curl -X GET "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/model/JOB_ID" --output matthews_3d.glb
Example with a specific job ID:
curl -X GET "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/model/f7285376-585b-46c6-80d1-94eba9af5bc8" --output matthews_3d.glb
View Preview Image
Open this URL in your browser to view the preview image:
https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/outputs/JOB_ID/matthews_preview.jpg
Example with a specific job ID:
https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/outputs/f7285376-585b-46c6-80d1-94eba9af5bc8/matthews_preview.jpg
Process Base64-Encoded Image
If you need to process a base64-encoded image instead of uploading a file:
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/process" \
-H "Content-Type: application/json" \
-d '{
"image_data": "BASE64_ENCODED_IMAGE_DATA",
"player_name": "matthews",
"options": {
"use_keypoints": true,
"use_mask": true
}
}'
Workflow Example
Upload image and get job ID:
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/upload" \ -F "file=@/Users/[email protected]/Downloads/matthews.jpg" \ -F "player_name=matthews" \ -F "use_keypoints=true" \ -F "use_mask=true"Check job status until completed:
curl -X POST "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/status" \ -H "Content-Type: application/json" \ -d '{ "job_id": "YOUR_JOB_ID" }'Download 3D model when ready:
curl -X GET "https://huggingface.co/proxy/jakereardon-mlse-player-3d.hf.space/api/model/YOUR_JOB_ID" --output matthews_3d.glb