{
 "openapi": "3.0.3",
 "info": {
  "title": "Singing voice (commercial): SoulX-Singer",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space Soul-AILab/SoulX-Singer; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://soul-ailab-soulx-singer.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Music and sound",
  "slot": "Singing voice",
  "need": "Make a given voice sing given lyrics or a melody.",
  "role": "commercial",
  "space": "Soul-AILab/SoulX-Singer",
  "space_url": "https://huggingface.co/spaces/Soul-AILab/SoulX-Singer",
  "model": "SoulX-Singer",
  "license": "Apache-2.0",
  "license_class": "open",
  "gpu_seconds_booked": "60",
  "notes": "\"Voice A sings song B\"; it transcribes and separates internally. Avoid its stateful voice-conversion tab.",
  "caveats": "",
  "lineup_call": "/synthesis_function(prompt_audio, target_audio, control=\"melody\"|\"score\", auto_shift, pitch_shift, seed) \u2192 audio",
  "api_style": "v1"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/synthesis_function": {
   "post": {
    "description": "Make a given voice sing given lyrics or a melody. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/synthesis_function/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/Soul-AILab/SoulX-Singer. License: Apache-2.0. \n\nUpstream description: Single-button: runs transcription first if metadata not provided, then synthesis.\nReturns, in order: Generated audio: filepath; Prompt metadata: filepath; Target metadata: filepath",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 2,
          "maxItems": 12,
          "items": {},
          "description": "Positional inputs, in this order:\n0. prompt_audio: filepath (required)\n1. target_audio: filepath (required)\n2. prompt_metadata: filepath (default null)\n3. target_metadata: filepath (default null)\n4. control: Literal['melody', 'score'] (default \"melody\")\n5. auto_shift: bool (default true)\n6. pitch_shift: float (default 0)\n7. seed: float (default 12306)\n8. prompt_lyric_lang: Literal['Mandarin', 'Cantonese', 'English'] (default \"English\")\n9. target_lyric_lang: Literal['Mandarin', 'Cantonese', 'English'] (default \"English\")\n10. prompt_vocal_sep: bool (default false)\n11. target_vocal_sep: bool (default true)"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "prompt_audio",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "target_audio",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "prompt_metadata",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": false,
      "default": null
     },
     {
      "name": "target_metadata",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": false,
      "default": null
     },
     {
      "name": "control",
      "schema": {
       "enum": [
        "melody",
        "score"
       ],
       "title": "Radio",
       "type": "string"
      },
      "required": false,
      "default": "melody"
     },
     {
      "name": "auto_shift",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": true
     },
     {
      "name": "pitch_shift",
      "schema": {
       "type": "number"
      },
      "required": false,
      "default": 0
     },
     {
      "name": "seed",
      "schema": {
       "type": "number"
      },
      "required": false,
      "default": 12306
     },
     {
      "name": "prompt_lyric_lang",
      "schema": {
       "type": "string",
       "enum": [
        "Mandarin",
        "Cantonese",
        "English"
       ]
      },
      "required": false,
      "default": "English"
     },
     {
      "name": "target_lyric_lang",
      "schema": {
       "type": "string",
       "enum": [
        "Mandarin",
        "Cantonese",
        "English"
       ]
      },
      "required": false,
      "default": "English"
     },
     {
      "name": "prompt_vocal_sep",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": false
     },
     {
      "name": "target_vocal_sep",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": true
     }
    ],
    "operationId": "music_singing_voice_commercial",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Singing voice (commercial): SoulX-Singer",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/synthesis_function/{event_id}": {
   "get": {
    "summary": "Read the result stream for /synthesis_function",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "music_singing_voice_commercial_result",
    "tags": [
     "Music and sound"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}