{"openapi":"3.0.3","info":{"title":"S1 solutions API","version":"1","description":"Two engines: S1SVC, singing voice conversion of whole songs (mode cover), and S1SEP, separation into an HQ acapella and other stems (mode separate). Create a job, upload the song (and, for a cover, a 10-30 s voice sample) to the returned links with HTTP PUT, start the job, poll it until it is done and download the result. Billing is per second of source audio; a separation costs a fraction of a cover. Inputs are deleted when the job ends and the results some minutes after they are ready."},"servers":[{"url":"https://s1solutions.pro"}],"security":[{"apiKey":[]}],"paths":{"/v1/jobs":{"post":{"summary":"Create a job","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["mp3","wav"],"default":"mp3"},"mode":{"type":"string","enum":["cover","separate","music"],"default":"cover"},"raw":{"type":"boolean","default":false,"description":"Cover only: next to the finished track (result_url), also return the converted vocal straight from the voice conversion (raw_url): no restoration, vocal processing, mix or master. Same length as the song, silence between phrases, mono. Same price."},"prompt":{"type":"string","description":"music only: genre, mood, tempo, vocals, instruments"},"lyrics":{"type":"string","description":"music only: lyrics, optional [Verse]/[Chorus] tags"},"duration_sec":{"type":"integer","minimum":10,"maximum":300,"default":180},"stems":{"type":"array","items":{"type":"string","enum":["acapella","vocals","instrumental","backs","lead"]},"default":["acapella","instrumental"],"description":"Separation only. acapella = dry restored lead vocal; lead keeps its reverb."}}}}}},"responses":{"200":{"description":"Upload links (HTTP PUT, raw file body, valid 30 minutes). voice_url only for a cover.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["cover","separate","music"]},"upload":{"type":"object","properties":{"track_url":{"type":"string"},"voice_url":{"type":"string"}},"required":["track_url"]}},"required":["id","mode","upload"]}}}},"400":{"description":"Unknown format, mode or stem, or raw for a mode other than cover.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many jobs are waiting for uploads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{job_id}/start":{"post":{"summary":"Start a job after its files are uploaded","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"A file is not uploaded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Balance too low for the longest allowed track.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The job has failed or expired. A repeated start of a started job answers 200 with the job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The queue is full or file storage is not answering; send the same start again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Job status and, when done, the result links","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance":{"get":{"summary":"Account balance","responses":{"200":{"description":"Balance in US dollars.","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <API key>"}},"schemas":{"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["cover","separate","music"]},"status":{"type":"string","enum":["awaiting_upload","queued","running","done","failed","expired"]},"format":{"type":"string","enum":["mp3","wav"]},"created_at":{"type":"string","format":"date-time"},"queue_position":{"type":"integer","description":"Jobs ahead in the queue (status queued)."},"estimated_sec":{"type":"integer","description":"Estimated seconds until the result (queued, running)."},"track_sec":{"type":"number","description":"Duration of the source track (done)."},"cost":{"type":"number","description":"Amount charged, US dollars (done)."},"raw":{"type":"boolean","description":"Present and true for a cover created with raw: the job also has raw_url."},"result_url":{"type":"string","nullable":true,"description":"Cover: download link for the finished track (done). Valid for result_expires_in_sec; null once expired."},"raw_url":{"type":"string","nullable":true,"description":"Cover created with raw: download link for the raw converted vocal (done). Same lifetime as result_url."},"results":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Separation: stem name -> download link (done). Links are null once expired."},"result_expires_in_sec":{"type":"integer"},"error":{"type":"string","description":"Why the job failed (failed). Nothing is charged for a failed job."}},"required":["id","mode","status","format","created_at"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}