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

# Upload Content

> Send files to Gloo AI for automatic processing and indexing.

<Info>
  You must have at least one [Publisher](/getting-started/glossary#publisher) in your organization before uploading. See [Manage Publishers](/studio/manage-publishers).
</Info>

<Tabs>
  <Tab title="Via API">
    **Upload once. Search instantly. Build faster.**

    The Data Engine Files API lets you send any file directly to Gloo AI for real-time processing and indexing. Within minutes, your content becomes searchable, context-aware, and ready for AI-driven interactions—no preprocessing or custom pipelines required.

    ## Why It Matters

    Developers often spend weeks wiring together upload, parsing, and indexing pipelines. The Data Engine Files API eliminates that complexity:

    * **Unified ingestion** for all major file types
    * **Automatic parsing and indexing** with no manual steps
    * **Instant availability** in your Gloo AI workspace
    * **Scalable performance** for millions of files

    ## Prerequisites

    Before starting, ensure you have:

    * A **Gloo AI Studio** account
    * Your **Client ID** and **Client Secret** from the [API Credentials page](/studio/manage-api-credentials)

    <Info>
      The Files API requires Bearer token authentication. If you haven't set up
      authentication yet, follow the [Authentication
      Tutorial](/tutorials/authentication).
    </Info>

    ## Upload Files

    Send files directly to the ingestion endpoint. You can mix file types freely—the endpoint automatically detects and processes each format.

    <CodeGroup>
      ```bash Shell theme={null}
      curl -X POST https://platform.ai.gloo.com/ingestion/v2/files \
        -H "Authorization: Bearer $GLOO_API_KEY" \
        -F "files=@/path/to/your/document.pdf"
      ```

      ```python Python theme={null}
      import requests

      url = "https://platform.ai.gloo.com/ingestion/v2/files"
      headers = {"Authorization": f"Bearer {GLOO_API_KEY}"}
      files = {"files": open("document.pdf", "rb")}

      response = requests.post(url, headers=headers, files=files)
      print(response.json())
      ```
    </CodeGroup>

    **Example Response:**

    ```json theme={null}
    {
      "success": true,
      "message": "File processing started in background.",
      "ingesting": ["c999008e-de60-495c-8c9f-6a4b59cdb04b"],
      "duplicates": []
    }
    ```

    <Tip>
      You can upload multiple files in a single request by adding multiple `-F
              "files=@..."` parameters.
    </Tip>

    ## Upload with Your Internal ID

    Use the [`producer_id`](/getting-started/glossary#producer_id) query parameter to associate your internal ID with the uploaded file. This makes it easier to look up items later using your own identifiers. For guidance on choosing a `producer_id` scheme that stays stable across renames and syncs, see [Preparing Content for Ingestion](/best-practices/ingestion-pattern#choose-a-producer_id-scheme-before-the-first-upload).

    ```bash Shell theme={null}
    curl -X POST "https://platform.ai.gloo.com/ingestion/v2/files?producer_id=your-internal-id" \
      -H "Authorization: Bearer $GLOO_API_KEY" \
      -F "files=@/path/to/your/document.pdf"
    ```

    <Warning>
      If `producer_id` is supplied with a multi-file upload, the ID will be ignored.
      Producer IDs must have a one-to-one relationship with a file.
    </Warning>

    ## Next Steps

    * **Update metadata** after upload: See [Edit Content](/api-guides/edit-content)
    * **Look up items** by producer ID: See [Manage Content](/api-guides/manage-content#look-up-by-producer-id)
    * **Full API details**: See [API Reference](/api-reference/ingestion/v2)
    * **More code examples**: See [Upload Files Recipe](/tutorials/upload-files)
  </Tab>

  <Tab title="Via Gloo AI Studio">
    Upload content directly from Studio without writing any code.

    1. Navigate to **Data Engine** in the Studio sidebar, then click **Ingestion**.
    2. Choose your ingestion method:
       * **Web Scraping** — Enter a website URL or sitemap URL
       * **Files** — Upload individual files or multiple files via drag-and-drop (various formats, up to 1GB)
       * **YouTube** — Connect a YouTube channel to automatically build a content library from videos
       * **Feeds** — Follow RSS/Atom feeds for podcasts or blogs, or ONIX catalog URLs for books
    3. Your content will be automatically processed and appear in the **Content Library** with a status indicator.

    ## Next Steps

    * **Edit metadata** after upload: See [Edit Content](/api-guides/edit-content)
    * **View and manage your content**: See [Manage Content](/api-guides/manage-content)
  </Tab>
</Tabs>
