> ## 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

> Upload a video 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/video/base64_to_url' \
```

## Body

```json json theme={null}
{   
    "key":"your_api_key",
    "init_obj":"data:video/mp4;base64,<base64>"
}
```


## OpenAPI

````yaml POST /video/base64_to_url
openapi: 3.1.0
info:
  title: ModelsLab Video API
  description: >-
    A comprehensive API for AI-driven video generation including text-to-video,
    image-to-video, scene transitions, and video management capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /video/base64_to_url:
    post:
      summary: Convert base64 video to URL
      description: Upload a video in base64 format and retrieve it as a URL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Base64ToUrlRequest'
      responses:
        '200':
          description: Base64 conversion response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base64ToUrlResponse'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Base64ToUrlRequest:
      type: object
      required:
        - key
        - init_obj
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        init_obj:
          type: string
          description: >-
            Base64 encoded video data with data URI format
            (data:video/mp4;base64,)
    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 video URLs
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````