Skip to content

Quickstart

Get started with Batch4LLM. This guide shows you how to extract the title from a set of PDF documents.

What you need:

  • A running Batch4LLM instance (local or hosted)
  • PDF documents to process
  • A Gemini API key (this guide uses Gemini, but all providers work)
  1. An endpoint connects Batch4LLM to an LLM provider. To create one, in the Sidebar on the left, click Endpoints. Then click Add Endpoint in the top right corner.

    In the pop-up, select Gemini as the provider. Enter "gemini" as the name and paste your Gemini API key. Click Add Endpoint. The endpoint is validated in the backend before it’s added. If there’s a problem with the API key or the endpoint, the error is shown immediately (see Endpoint connection errors).

  2. A prompt is the instruction sent to the model for each document. In the Sidebar on the left, click Prompts. Then click Add Prompt in the top right corner.

    You’ll be asked to choose between Simple and Complex. Choose Simple — it sends your text as the prompt exactly as you enter it. Complex can be used later to build prompts made up of multiple sub-tasks, giving the LLM instructions in several separate steps.

    Enter "Retrieve pdf title" as the name. Paste the following into the text box:

    Your given a pdf document. Please extract the title from it.
    Only answer with the document title without
    any formatting or additional information.

    Leave all other settings as they are and click Add. Your new prompt will now appear in the overview.

  3. Go to Files and click Upload Files. Either click the file box to browse your files, or drag and drop them in. Your files will appear in a list below the box.

    Type My documents in the file tag field and press Enter. Then click Upload files. Uploading may take a few seconds or a few minutes depending on how many files you have.

  4. A batch processes your documents using your chosen endpoint and prompt. Go to Batches in the Sidebar and click Create Batch.

    In the pop-up, click on Select a model.... For this guide, select gemini-2.5-flash. You can also use the search bar to look for a specific model.

    Then click on Select files..., click the My documents tag you assigned earlier, and click Done in the bottom right corner.

    Next, select the prompt you just created. For the file handling, leave the setting on Upload. This uploads your documents as they are, and the model provider processes them directly on their end.

    Leave all other settings as they are and click Start Batch. Wait for the batch to finish.

    When the batch is done, you will see a green indicator. Click on the batch and select View details to get an overview of all the files processed, the LLM answers, and the token and cost usage.

  5. Return to the Batch Overview by clicking the arrow in the top left corner. Then, in the same column as View Details, select Export on your finished batch.

    Leave the settings in the pop-up as they are and click Export. Allow downloads in your browser if prompted.

    You will receive a CSV file with one row per document. The LLM answer — in this case, the PDF title — is included as its own column.

You’re done! You just processed a set of documents with a prompt and exported the results.