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

# Upload Document

## Description

Uploads a document to the Translation Service.

* **Either** `file` **or** `source_url` must be provided (not both); otherwise the API returns **400**.
* **`languages`** is required: a comma-separated list of locales validated against **text-capable** languages (same validation as other text translation flows).
* **`context_for_translation`** is optional; empty string if omitted.
* **`name`** is optional; the filename stem is used when uploading a `file` without `name`.


## OpenAPI

````yaml post /v1/document
openapi: 3.1.0
info:
  title: Lingopal VOD API
  description: API for Video on Demand processing, transcription, and translation services
  version: 0.0.1
servers:
  - url: https://api.lingopal.ai
security: []
paths:
  /v1/document:
    post:
      tags:
        - document
      summary: Upload Document
      operationId: upload_document_v1_document_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_document_v1_document_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_upload_document_v1_document_post:
      properties:
        context_for_translation:
          anyOf:
            - type: string
            - type: 'null'
          title: Context For Translation
          default: ''
        file:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: File
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        languages:
          type: string
          title: Languages
          default: ''
      type: object
      title: Body_upload_document_v1_document_post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````