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

# LlamaParse

> Learn how to use the LlamaParse integration with Julep

## Overview

Welcome to the LlamaParse integration guide for Julep! This integration allows you to parse documents efficiently, enabling you to build workflows that require document processing capabilities. Whether you're developing a document management system or need to extract information from files, this guide will walk you through the setup and usage.

## Prerequisites

<Info type="info" title="API Key Required">
  To use the LlamaParse integration, you need an API key. You can obtain this key by signing up at [LlamaParse](https://docs.cloud.llamaindex.ai/llamaparse/getting_started/web_ui).
</Info>

## How to Use the Integration

To get started with the LlamaParse integration, follow these steps to configure and create a task:

<Steps>
  <Step title="Configure Your API Key">
    Add your API key to the tools section of your task. This will allow Julep to authenticate requests to LlamaParse on your behalf.
  </Step>

  <Step title="Create Task Definition">
    Use the following YAML configuration to define your document parsing task:

    ```yaml LlamaParse Example [expandable] theme={"dark"}
    name: LlamaParse Task

    tools:
    - name: llama_parse
      type: integration
      integration:
        provider: llama-parse
        method: parse
        setup:
          llamaparse_api_key: "LLAMAPARSE_API_KEY"
          params: # Optional setup parameters
            key1: "value1" # these are placeholders for the actual parameters
            key2: "value2" # these are placeholders for the actual parameters

    main:
    - tool: llama_parse
      arguments:
        file: base64_encoded_file # this is a placeholder for the actual file
        filename: document.pdf # this is a placeholder for the actual filename
        base64: true
        params: # Optional arguments parameters
          key1: value1 # these are placeholders for the actual parameters
          key2: value2 # these are placeholders for the actual parameters
    ```
  </Step>

  <Step title="Run Task">
    Deploy your task by creating a new execution.
  </Step>
</Steps>

### YAML Explanation

<AccordionGroup>
  <Accordion title="Basic Configuration">
    * ***name***: A descriptive name for the task, in this case, "LlamaParse Task".
    * ***tools***: This section lists the tools or integrations being used. Here, `llama_parse` is defined as an integration tool.
  </Accordion>

  <Accordion title="Tool Configuration">
    * ***type***: Specifies the type of tool, which is `integration` in this context.
    * ***integration***: Details the provider and setup for the integration.
      * ***provider***: Indicates the service provider, which is `llama-parse` for LlamaParse.
      * ***method***: Indicates the method to be used, which is `parse` for LlamaParse. If not specified, the method will be `parse` by default.
      * ***setup***: Contains configuration Details
        * ***llamaparse\_api\_key***: (Required) The API key of the LlamaParse account.
        * ***params***: (Optional) Optional parameters for the configuration.
  </Accordion>

  <Accordion title="Execution Configuration">
    * ***main***: Defines the main execution steps.
      * ***tool***: Refers to the tool defined earlier (`llama_parse`).
      * ***arguments***: Specifies the input parameters for the tool:
        * ***file***: Can be either a base64 encoded file string or an array of http/https URLs to load
        * ***filename***: (optional) The name of the file (only used with base64 encoded files). Defaults to None.
        * ***base64***: (optional) Whether the input file is base64 encoded. Defaults to false.
        * ***params***: (optional) Optional arguments parameters that can override setup parameters for specific tasks. Defaults to None.
  </Accordion>
</AccordionGroup>

<Callout type="info" title="Additional Parameters">
  The different parameters available for the LlamaParse integration can be found in the [LlamaParse API documentation](https://github.com/run-llama/llama_parse/blob/main/README.md).
</Callout>

<Note>
  Remember to replace `LLAMAPARSE_API_KEY` with your actual API key and ensure your file is base64 encoded if `base64` is set to true. Use the `params` field to pass any additional parameters required by your specific use case.
</Note>

<Note>
  LlamaParse supports a wide range of different file types. For a full list of supported file types, please refer to the [LlamaParse documentation](https://github.com/run-llama/llama_parse/blob/main/llama_parse/utils.py).
</Note>

## Conclusion

With the LlamaParse integration, you can efficiently process documents and extract valuable information.
This integration provides a robust solution for document processing, enhancing your workflow's capabilities and user experience.

<Tip>
  For more information, please refer to the [LlamaParse documentation](https://docs.cloud.llamaindex.ai/llamaparse/getting_started/python).
</Tip>
