{
  "openapi": "3.1.0",
  "info": {
    "title": "Voice Verification API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.cometapi.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/suno/persona/voice/verify": {
      "post": {
        "summary": "Voice verification",
        "operationId": "voice_verify",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "phrase_id",
                  "voice_recording_id"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL of the recorded verification audio matching phrase_text. Supports .mp3 or .wav."
                  },
                  "phrase_id": {
                    "type": "string",
                    "description": "phrase_id from the get verification phrase step"
                  },
                  "voice_recording_id": {
                    "type": "string",
                    "description": "voice_recording_id from the upload voice step"
                  }
                }
              },
              "examples": {
                "Example 1": {
                  "summary": "Example 1",
                  "value": {
                    "url": "https://your-audio-host/voice-sample.mp3",
                    "phrase_id": "<phrase_id>",
                    "voice_recording_id": "<voice_recording_id>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "verification_id for use in the create persona step"
                    },
                    "status": {
                      "type": "string",
                      "description": "Verification status. approved means passed."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Default",
            "source": "curl https://api.cometapi.com/suno/persona/voice/verify \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"url\": \"https://your-audio-host/voice-sample.mp3\",\n      \"phrase_id\": \"<phrase_id>\",\n      \"voice_recording_id\": \"<voice_recording_id>\"\n    }'\n"
          },
          {
            "lang": "Python",
            "label": "Default",
            "source": "import os\nimport requests\n\nresponse = requests.post(\n    \"https://api.cometapi.com/suno/persona/voice/verify\",\n    headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]},\n    json={\n            \"url\": \"https://your-audio-host/voice-sample.mp3\",\n            \"phrase_id\": \"<phrase_id>\",\n            \"voice_recording_id\": \"<voice_recording_id>\"\n    },\n)\n\nprint(response.json())  # code success returns a task id in data; poll GET /suno/fetch/{task_id}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Default",
            "source": "const response = await fetch(\"https://api.cometapi.com/suno/persona/voice/verify\", {\n    method: \"POST\",\n    headers: {\n        Authorization: `Bearer ${process.env.COMETAPI_KEY}`,\n        \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n            \"url\": \"https://your-audio-host/voice-sample.mp3\",\n            \"phrase_id\": \"<phrase_id>\",\n            \"voice_recording_id\": \"<voice_recording_id>\"\n        }),\n});\n\nconsole.log(await response.json()); // code success returns a task id in data; poll GET /suno/fetch/{task_id}\n"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token authentication. Use your CometAPI key."
      }
    }
  }
}
