{"openapi":"3.1.0","info":{"title":"StemConsole API","description":"Split songs into stems (vocals, drums, bass, other, guitar, piano), one at a time or in batches, and manage your StemConsole library and setlists. Uses your account's plan and allowance. Docs and API keys: https://stemconsole.ai/developers/","version":"1.0.0"},"servers":[{"url":"https://stemconsole.ai/api/v1"}],"paths":{"/health":{"get":{"summary":"Service health","operationId":"v1_health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/me":{"get":{"summary":"Your plan, allowance and API limits","operationId":"v1_me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/splits":{"post":{"summary":"Split one song","description":"JSON {audio_url, model, name} fetches a public audio URL. For a local file send multipart/form-data with `file` (up to 100 MB through stemconsole.ai; use /uploads for up to 200 MB). Models: vocals (2 stems), fast (4 stems), full (6 stems, Pro or a credit). Poll GET /splits/{id} until status is done.","operationId":"v1_create_split_splits_post","security":[{"HTTPBearer":[]}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["audio_url"],"properties":{"audio_url":{"type":"string","format":"uri","description":"Public URL of the audio file."},"model":{"type":"string","enum":["vocals","fast","full"],"default":"vocals"},"name":{"type":"string","description":"Song name for your library."}}}},"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string","enum":["vocals","fast","full"],"default":"vocals"},"name":{"type":"string"}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":16,"maxLength":64},"description":"Retrying with the same key returns the split already started."}]},"get":{"summary":"Your songs, newest first","operationId":"v1_list_splits_splits_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/splits/batch":{"post":{"summary":"Split up to 10 songs from URLs","description":"Queues every item and runs them in order, at most 2 at a time. Each item draws on the account's allowance like a single split; one that hits a limit fails on its own. Poll GET /batches/{id}.","operationId":"v1_create_batch_splits_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiBatchReq"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/batches/{batch_id}":{"get":{"summary":"A batch and each song's split","operationId":"v1_get_batch_batches__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel the songs a batch has not started yet","operationId":"v1_cancel_batch_batches__batch_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uploads":{"post":{"summary":"Start a direct upload of a local file (up to 200 MB)","description":"Returns one presigned URL per part: PUT each part's bytes to its URL, keep each response's ETag header, then POST /uploads/complete.","operationId":"v1_start_upload_uploads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiUploadReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/uploads/complete":{"post":{"summary":"Finish a direct upload and split it","operationId":"v1_complete_upload_uploads_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiUploadDone"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/splits/{split_id}":{"get":{"summary":"A split's status, stems and download links","operationId":"v1_get_split_splits__split_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"string","title":"Split Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Rename a song","operationId":"v1_rename_split_splits__split_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"string","title":"Split Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRenameReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete a song and its files (ends its share link)","operationId":"v1_delete_split_splits__split_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"string","title":"Split Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/setlists":{"get":{"summary":"Your setlists","operationId":"v1_list_setlists_setlists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create a setlist: one share link for several songs (Pro)","operationId":"v1_create_setlist_setlists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSetlistReq"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/setlists/{setlist_id}":{"put":{"summary":"Replace a setlist's title and songs (Pro)","operationId":"v1_update_setlist_setlists__setlist_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setlist_id","in":"path","required":true,"schema":{"type":"string","title":"Setlist Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSetlistReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete a setlist","operationId":"v1_delete_setlist_setlists__setlist_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setlist_id","in":"path","required":true,"schema":{"type":"string","title":"Setlist Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApiBatchItem":{"properties":{"audio_url":{"type":"string","title":"Audio Url"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["audio_url"],"title":"ApiBatchItem"},"ApiBatchReq":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiBatchItem"},"type":"array","title":"Items"},"model":{"type":"string","title":"Model","default":"vocals"}},"type":"object","required":["items"],"title":"ApiBatchReq"},"ApiRenameReq":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ApiRenameReq"},"ApiSetlistReq":{"properties":{"title":{"type":"string","title":"Title"},"split_ids":{"items":{"type":"string"},"type":"array","title":"Split Ids"}},"type":"object","required":["title","split_ids"],"title":"ApiSetlistReq"},"ApiUploadDone":{"properties":{"upload_token":{"type":"string","title":"Upload Token"},"parts":{"items":{"$ref":"#/components/schemas/DirectUploadPart"},"type":"array","title":"Parts"},"filename":{"type":"string","title":"Filename"},"model":{"type":"string","title":"Model","default":"vocals"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["upload_token","parts","filename"],"title":"ApiUploadDone"},"ApiUploadReq":{"properties":{"filename":{"type":"string","title":"Filename"},"size":{"type":"integer","title":"Size"},"model":{"type":"string","title":"Model","default":"vocals"}},"type":"object","required":["filename","size"],"title":"ApiUploadReq"},"DirectUploadPart":{"properties":{"n":{"type":"integer","title":"N"},"etag":{"type":"string","title":"Etag"}},"type":"object","required":["n","etag"],"title":"DirectUploadPart"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"An API key (sc_live_...) from https://stemconsole.ai/developers/","scheme":"bearer"}}}}