SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Batch Consumption

This tutorial demonstrates how to use batch consumption in SAP AI Core to process multiple LLM requests asynchronously. You will submit two batch jobs — one with multiple text requests and one with mixed input types including text, base64 encoded images, and image URLs — and retrieve structured results from your object store.

Overview

🎓 beginner 45 min. SAP Business Technology PlatformBeginnerArtificial IntelligenceMachine LearningSAP Ai Core
Smita Naik S Smita Naik July 2, 2026
Created by July 2, 2026
Contributors

Prerequisites

Prerequisites

  1. BTP Account
    Set up your SAP Business Technology Platform (BTP) account.
    Create a BTP Account
  2. For SAP Developers or Employees
    Internal SAP stakeholders should refer to the following documentation: How to create BTP Account For Internal SAP Employee, SAP AI Core Internal Documentation
  3. For External Developers, Customers, or Partners
    Follow this tutorial to set up your environment and entitlements: External Developer Setup Tutorial, SAP AI Core External Documentation
  4. Create BTP Instance and Service Key for SAP AI Core
    Follow the steps to create an instance and generate a service key for SAP AI Core:
    Create Service Key and Instance
  5. AI Core Setup Guide
    Step-by-step guide to set up and get started with SAP AI Core:
    AI Core Setup Tutorial
  6. An Extended SAP AI Core service plan is required, as the Generative AI Hub is not available in the Free or Standard tiers. For more details, refer to SAP AI Core Service Plans
  7. You have an object store secret registered in SAP AI Core for one of the following providers:
  1. Bruno API Client Download Bruno from usebruno.com/downloads
  2. SAP Batch consumption Collection Clone the SAP Batch consumption Bruno collection from github.com PLACEHOLDER

Steps

You Will Learn

  • What the supported input types are and when to use each
  • How to structure a JSONL input file with multiple requests of the same input type
  • How to structure a JSONL input file containing multiple input types in a single batch
  • How to create and submit a batch job using Bruno
  • How to monitor batch job status and retrieve results
Step 1 Pre-Read

What Is Batch Consumption?

Batch consumption lets you process large volumes of LLM inference requests asynchronously in SAP AI Core. You package all your requests into a single JSON Lines (.jsonl) file, upload it to your object store, and submit it as a batch job. SAP AI Core processes the requests in the background and writes all results to your object store in a single output file when complete.

When to Use Batch Consumption

Use batch consumption when:

  • You have 50 or more requests to process in one run
  • Your workload is not time-critical
  • You want to reduce inference costs compared to synchronous calls
  • You want SAP AI Core to manage retries and rate limits automatically

Do not use batch consumption when:

  • You need real-time responses (for example, a user-facing chat interface)
  • Your requests use orchestration pipelines — only native LLM calls are supported

Batch Consumption vs Other Asynchronous Approaches

AspectBatch ConsumptionCustom Async OrchestrationMessage Queue
Setup complexityLow — single API callMedium — custom code requiredHigh — integration design required
Rate limit handlingAutomaticManualManual or platform-managed
CostReduced vs synchronousSame as synchronousAdditional platform cost
Best forBulk LLM workloads, offline processingModerate volumes, custom workflowsEvent-driven, cross-system pipelines

Key Constraints

  • Supports native LLM calls only — orchestration requests are not supported
  • All requests in a single batch job must use the same model
  • Output lines are not guaranteed to be in the same order as input lines — always use custom_id to match responses to requests

Batch Limits

LimitValue
Maximum input file size200 MB
Maximum requests per file100,000
Maximum input files (no expiry set)500
Maximum input files (expiry set)10,000
Step 2 Architecture
+
Step 3 Step 1: Connect to SAP AI Core Instance
+
Step 4 Step 2: Register an Object Store Secret
+
Step 5 Step 3: Prepare Your Input File
+
Step 6 Batch Example 1 — Multiple Requests of the Same Input Type
+
Step 7 Batch Example 2 — Multiple Requests of Different Input Types
+
Step 8 Step 4: Upload Your Input File to the Object Store
+
Step 9 Step 5: Create a Batch Job
+
Step 10 Step 6: Check Batch Job Status
+
Step 11 Step 7: Retrieve and Interpret Your Results
+
Step 12 Step 8: Manage Your Batch Jobs
+
Step 13 Troubleshooting
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 13
1. Pre-Read 2. Architecture 3. Step 1: Connect to SAP AI Core Instance 4. Step 2: Register an Object Store Secret 5. Step 3: Prepare Your Input File 6. Batch Example 1 — Multiple Requests of the Same Input Type 7. Batch Example 2 — Multiple Requests of Different Input Types 8. Step 4: Upload Your Input File to the Object Store 9. Step 5: Create a Batch Job 10. Step 6: Check Batch Job Status 11. Step 7: Retrieve and Interpret Your Results 12. Step 8: Manage Your Batch Jobs 13. Troubleshooting

Learn more →