# Convert audio format

- **Method:** `POST`
- **Path:** `/api/v1/audio/convert`
- **Operation ID:** `convert_audio_api_v1_audio_convert_post`
- **Tags:** Audio

Convert base64-encoded WAV audio to another format (mp3, flac). Returns the converted audio as base64.

## Effective servers

- `http://127.0.0.1:8100`

  Voice Creator Pro on this computer

## Request body

**Required:** `true`

**Content type:** `application/json`

schema: `AudioConvertRequest`

- **`audio_base64` (required)**: `string`

  Base64-encoded WAV audio to convert
- **`format` (required)**: `string`

  Target format ID (e.g. 'mp3', 'flac')

**Example:**

```json
{
  "audio_base64": "",
  "format": ""
}
```

## Responses

### 200 Successful Response

**Content type:** `application/json`

schema: `AudioConvertResponse`

- **`audio_base64` (required)**: `string`

  Base64-encoded converted audio
- **`format` (required)**: `string`

  Format the audio was converted to
- **`success` (required)**: `boolean`

  Whether conversion succeeded

**Example:**

```json
{
  "success": true,
  "audio_base64": "",
  "format": ""
}
```

### 422 Validation Error

**Content type:** `application/json`

schema: `HTTPValidationError`

- **`detail`**: `array`

  **Items:**

  schema: `ValidationError`
  - **`loc` (required)**: `array of (string | integer)`
  - **`msg` (required)**: `string`
  - **`type` (required)**: `string`
  - **`ctx`**: `object`
  - **`input`**: `any`

**Example:**

```json
{
  "detail": [
    {
      "loc": [
        ""
      ],
      "msg": "",
      "type": "",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Schemas

- `AudioConvertRequest` — shown above.
- `AudioConvertResponse` — shown above.
- `HTTPValidationError` — shown above.
- `ValidationError` — shown above.
