> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Suno Check voice availability

> Check whether a custom voice is ready to use; `isAvailable` is returned at once, with no task to poll and no callback.

`ai-music-api/check-voice` is the last step of the Suno custom voice (Suno Voice) workflow: it confirms whether a voice created from your own recording is ready to use.

The custom voice workflow:

1. **Generate a verification phrase** (`ai-music-api/validation-phrase`): submit a voice sample and get a phrase to read aloud. The ID of this task is the Voice ID.
2. **Create the voice** (`ai-music-api/create-voice`): upload the recording of the phrase to build the voice.
3. **Check availability** (this endpoint): pass the Voice ID as `task_id`; `isAvailable: true` means the voice is ready.

Once ready, use the voice in Generate Music and other endpoints with `persona_id` (the Voice ID) and `persona_model: "voice_persona"`. The result is returned at once; there is nothing to poll.

## Setup

The Suno endpoints share `POST /api/v1/jobs/createTask` (`model` selects the endpoint and the parameters go in `input`). This endpoint is synchronous: the create request returns the result directly, with no need to poll the query endpoint. See the [Suno introduction](https://docs.dreamto.ai/en/music/suno.md) for the flow, chaining tasks and how long files are kept. The base URL is `https://api.dreamto.ai`; send the API Key in the `Authorization: Bearer` header.

Every response has HTTP status 200; the `code` in the body tells the outcome: `200` is success, anything else an error (see the response examples of this endpoint).

| Endpoint | Purpose |
| - | - |
| [`POST /api/v1/jobs/createTask`](https://docs.dreamto.ai/en/api-reference/suno-voice-check/create-task) | Create task |
| [`GET /api/v1/jobs/recordInfo?taskId=...`](https://docs.dreamto.ai/en/api-reference/suno-voice-check/query-task) | Get task |

## Parameters

`model` is `ai-music-api/check-voice`; the parameters go in `input`. Requests that break a rule return `code: 422`; no task is created or charged.

| Field | Values |
| - | - |
| `task_id` | Required Voice ID: the task ID of the verification phrase (`validation-phrase`) task |

## Pricing

Billed per request: each succeeded task is charged once at the model price shown in the console. The balance is checked for that price when the task is created (`code: 402` when insufficient); invalid requests and failed tasks are not charged.

## Quick start

This endpoint answers synchronously: `data` in the create response is the result, so there is nothing to poll and no need to call the query endpoint. `$DREAMTO_API_KEY` is your API Key.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ai-music-api/check-voice",
    "input": {
      "task_id": "c2a81e5f09d34b7e8f61a2d4c9b03e75"
    }
  }'
```

```python Python theme={null}
import os

import requests

BASE_URL = "https://api.dreamto.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"}

payload = {
    "model": "ai-music-api/check-voice",
    "input": {
        "task_id": "c2a81e5f09d34b7e8f61a2d4c9b03e75"
    }
}

created = requests.post(f"{BASE_URL}/api/v1/jobs/createTask", headers=HEADERS, json=payload, timeout=120).json()
if created["code"] != 200:
    raise SystemExit(f"{created['code']}: {created['msg']}")
data = created["data"]
print("available" if data["isAvailable"] else "not available")
```

## Callback

This endpoint returns its result at once and sends no callback; `callBackUrl` can be left out.

## Notes

* Pass the ID of the verification phrase task as `task_id` (the Voice ID, also returned in `resultJson.resultUrls[0]` of the create-voice task). Passing the ID of the create-voice task itself returns `isAvailable: false`.
* The verification phrase task stays in progress while it waits for the recording and can be checked meanwhile; an unknown task, a task of another account, one older than 14 days or one that is not a verification phrase / create-voice task returns `code: 422` and is not charged.
* Before the recording is made or while the voice is not ready, the endpoint returns `code: 422` with a `msg` such as `suno_user_id is missing` or `Voice record not found`. Within a few seconds after create-voice completes it may also return `suno_user_id is missing`; retry after a short delay; this does not mean the voice is unavailable.
* The result is returned at once in `data.isAvailable` of the createTask response; there is nothing to poll and no callback is sent. The answer reflects the current state; while the voice is not ready, check again later.
* `taskId` is issued by DreamTo (32 hex digits) and can only be queried with an API Key of the same account; an unknown or expired task returns `code: 422` with `msg: recordInfo is null`.
* The body accepts only `model`, `callBackUrl` and `input`; undeclared `input` fields, wrong types and values that break a rule return `code: 422` with an English reason in `msg`; no task is created or charged.
* Every file link in a result (audio, cover image, video and so on) is a DreamTo download link (`/v1/tasks/{task_id}/artifacts/...`) that works without an API Key and supports `Range`; files are kept for 14 days after the task is created, so download them promptly.
* `param` echoes the create request, with `input` as a JSON string that needs a second parse; the credits used are not returned, and the charge is shown in the DreamTo console bills.
* `failCode` / `failMsg` of a failed task come from the model service (content moderation, a source audio that cannot be downloaded and so on); internal errors are reported as `failCode: "500"` with `failMsg: "Internal Error, Please try again later."`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.