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

# Using Static Documents

> Use text, PDF, Word, and other documents in your corpus.

You can use files as sources for any of your corpora.

Files can be added via the [Web App](https://app.ultravox.ai/rag) or via the [Create Corpus File Upload API](/api-reference/corpora/corpora-uploads-post).

## Upload Files via Web App

<Steps>
  <Step title="Create New Source">
    * Go to [RAG](https://app.ultravox.ai/rag) in the Ultravox web application.
    * Click `New Source` in the top right corner.
  </Step>

  <Step title="Add Details and Files">
    * Select the `Collection` to which you want to add the content.
    * (Optionally) Add a `Name` and `Description` for the new source.
    * Select `Document` and add files.

    <img className="block dark:hidden" src="https://mintcdn.com/fixie-ff99b187/RRU3EPaTCQ6pUNKk/images/screenshots/corpus/add-source-from-document-light.png?fit=max&auto=format&n=RRU3EPaTCQ6pUNKk&q=85&s=2616c28a81a5dafb62cd2d5712c32ef4" width="2880" height="1600" data-path="images/screenshots/corpus/add-source-from-document-light.png" />

    <img className="hidden dark:block" src="https://mintcdn.com/fixie-ff99b187/RRU3EPaTCQ6pUNKk/images/screenshots/corpus/add-source-from-document-dark.png?fit=max&auto=format&n=RRU3EPaTCQ6pUNKk&q=85&s=4ab070525dd834a2bceac7df3a00488b" width="2880" height="1600" data-path="images/screenshots/corpus/add-source-from-document-dark.png" />
  </Step>

  <Step title="Save">
    * Click `Save` and wait a few moments for your content to be uploaded and ingested.
  </Step>
</Steps>

## Upload Files via API

To upload files using the API, follow these steps:

<Steps>
  <Step title="Step 1: Request Upload URL">
    * Use the [Create Corpus File Upload API](/api-reference/corpora/corpora-uploads-post)
    * Include the MIME type string in the request body
    * This returns the URL to use for upload and the unique ID for the document
    * URLs expire after 5 minutes. Request a new one if it expires before using it

    <Note>The URL that is returned is tied to the provided MIME type. The same MIME type must be used during upload.</Note>
  </Step>

  <Step title="Step 2: Upload File">
    * Use the `presignedUrl` from Step 1 to upload the document
    * Ensure the MIME type in the upload matches what was specified in Step 1

    For example, if we requested an upload URL for a text file (MIME type `text/plain`):

    ```bash theme={null}
    FILE_PATH="/path/to/your/file"
    UPLOAD_URL="https://storage.googleapis.com/fixie-ultravox-prod/..."

    curl -X PUT \
      -H "Content-Type: text/plain" \
      --data-binary @"$FILE_PATH" \
      "$UPLOAD_URL"
    ```
  </Step>

  <Step title="Step 3: Create New Source with Uploaded Document">
    * Use the [Create Corpus Source API](/api-reference/corpora/corpora-sources-post)
    * Use `upload` to provide the `documentId` from Step 1

    <Note>You can provide an array of Document IDs to bulk create a source.</Note>
  </Step>
</Steps>

## Supported File Types

The following types of static files are currently supported:

| File Extension | Type of File                               | MIME Type                                                                 |
| -------------- | ------------------------------------------ | ------------------------------------------------------------------------- |
| doc            | Microsoft Word Document                    | application/msword                                                        |
| docx           | Microsoft Word Open XML Document           | application/vnd.openxmlformats-officedocument.wordprocessingml.document   |
| txt            | Plain Text Document                        | text/plain                                                                |
| md             | Markdown Document                          | text/markdown                                                             |
| ppt            | Microsoft PowerPoint Presentation          | application/vnd.ms-powerpoint                                             |
| pptx           | Microsoft PowerPoint Open XML Presentation | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| pdf            | Portable Document Format                   | application/pdf                                                           |

## Limits

See the [Overall Limits](/api-reference/corpora/overview#overall-limits) section for details on limits for the number of sources, file sizes, and more.
