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

# Base64 to URL

> The Base64 to URL endpoint allows you to upload audio in base64 format and retrieve it as a URL.

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/voice/base64_to_url' \
```

### Body

```json json theme={null}
{   
    "key":"your_api_key",
    "init_audio":"data:audio/wav;base64,<base64>"
}
```


## OpenAPI

````yaml POST /voice/base64_to_url
openapi: 3.1.0
info:
  title: ModelsLab Voice API
  description: >-
    A comprehensive API for AI-driven voice and audio generation including
    text-to-speech, voice cloning, music generation, and audio processing
    capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /voice/base64_to_url:
    post:
      summary: Convert base64 audio to URL
      description: Uploads base64 audio and returns a URL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Base64ToUrlRequest'
      responses:
        '200':
          description: Base64 to URL response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base64ToUrlResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Base64ToUrlRequest:
      type: object
      required:
        - key
        - init_audio
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        init_audio:
          type: string
          description: Base64 format audio file (MP3/WAV, 10-15 seconds for faster upload)
    Base64ToUrlResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          description: Status of the conversion
        id:
          type: integer
          description: Unique identifier for the conversion
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of converted audio URLs
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````