Loading...
Aimi.fmSync API Endpoints
POST Initialize Video Upload
This should be the first step in uploading a video. This endpoint prepares the system for a new video file and returns an identifier for the upload.
Endpoint
POST /sync/initialize_video_uploadExample Request
curl -X POST https://api.aimi.fm/sync/initialize_video_upload -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"file_name": "my_awesome_video.mp4",
"file_size": 10485760,
"file_type": "video/mp4"
}'POST Upload Video Chunk
After initializing an upload, use this endpoint to upload the video file in chunks.
Endpoint
POST /sync/upload_chunkExample Request
curl -X POST https://api.aimi.fm/sync/upload_chunk -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/octet-stream" -H "X-Upload-Id: YOUR_UPLOAD_ID" -H "X-Chunk-Index: 0" --data-binary "@chunk_0.bin"POST Complete Video Upload
Once all video chunks have been uploaded, call this endpoint to finalize the upload process.
Endpoint
POST /sync/complete_video_uploadExample Request
curl -X POST https://api.aimi.fm/sync/complete_video_upload -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"upload_id": "YOUR_UPLOAD_ID"
}'POST Analyze Video
After a video is successfully uploaded, this endpoint starts the analysis process to extract musical information.
Endpoint
POST /sync/video_analysisExample Request
curl -X POST https://api.aimi.fm/sync/video_analysis -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"video_id": "YOUR_VIDEO_ID"
}'POST Generate Musical Plan
This endpoint generates a musical plan based on the analysis of the video.
Endpoint
POST /sync/generateExample Request
curl -X POST https://api.aimi.fm/sync/generate -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"analysis_id": "YOUR_ANALYSIS_ID"
}'POST Execute Plan
This endpoint executes the generated musical plan to create the final audio.
Endpoint
POST /sync/executeExample Request
curl -X POST https://api.aimi.fm/sync/execute -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"plan_id": "YOUR_PLAN_ID"
}'POST Check Status
Use this endpoint to check the status of a video analysis or plan execution.
Endpoint
POST /sync/statusExample Request
curl -X POST https://api.aimi.fm/sync/status -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"job_id": "YOUR_JOB_ID"
}'