Artificial Intelligence Blogs Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
DEEPA_DORAIRAJ
Product and Topic Expert
Product and Topic Expert
2,354

SAP COMMUNITY  |  PRACTICAL GUIDE  |  SAP BTP  |  SAP AI CORE

SAP Generative AI Hub: A Practitioner's Setup Guide

Step-by-step configuration from BTP entitlements to your first foundation model API call — including the friction points that aren't in the official documentation.

By Deepa Dorairaj   |  SAP AI Solution Architect  |  SAP BTP & AI Core  |  Published 2026

TL;DR: SAP Generative AI Hub gives you governed, auditable access to GPT-4o, Claude, Gemini, Mistral, and SAP's own models from a single BTP service. Getting there requires navigating BTP entitlements, AI Core service instance setup, resource group configuration, and API authentication — none of which is as straightforward as the documentation suggests. This guide covers the complete setup path and the specific friction points that will slow you down if you don't know about them.

What the Generative AI Hub Actually Is

SAP's Generative AI Hub is the access layer within SAP AI Core that gives you a single, governed interface to multiple foundation models — GPT-4o via Azure OpenAI, Claude from Anthropic, Gemini from Google, Mistral, SAP-RPT-1, and others — without building separate integrations to each provider. It handles authentication, usage tracking, rate limiting, and compliance logging in a way that meets enterprise governance requirements.

For SAP architects and data engineers, the key value proposition is straightforward: instead of managing separate API keys, separate billing accounts, and separate compliance considerations for each AI provider, the Generative AI Hub abstracts all of that into a single BTP service with consistent access patterns, audit trails, and cost visibility.

What the documentation does not prepare you for is how much configuration stands between you and your first working API call. This guide covers every step — including the ones that aren't clearly documented — so you can get from zero to a working foundation model integration without the friction we went through.

BEFORE YOU START 

Prerequisites and What You Actually Need

Before beginning setup, confirm you have the following. Missing any of these is the most common reason setup stalls before it starts:

  • A BTP global account with available entitlements — a trial account works for initial experimentation but has model and quota limitations
  • A BTP subaccount in a supported region — AI Core availability varies by region and not all models are available in all regions (covered in detail below)
  • Space Manager or Organization Manager role in your BTP subaccount — standard Developer roles are insufficient for service instance creation
  • Access to the BTP Cockpit — your entry point for all entitlement and service configuration

Region matters more than you might expect. GPT-4o, Claude, and Gemini availability through the Generative AI Hub is not uniform across all BTP regions. US East, EU West, and AP regions have the broadest model availability. If you set up AI Core in an unsupported region, you will successfully create the service instance but find that certain models are simply not visible in the Hub. Check SAP's current model availability matrix before choosing your subaccount region.

STEP 1 OF 5 

BTP Entitlement Setup

Adding the AI Core Entitlement

Navigate to your BTP global account and open the Entitlements section. This is where most teams hit their first friction point — the AI Core service and the Generative AI Hub are separate entitlements and both need to be explicitly added before you can create a service instance.

In the BTP Cockpit, go to Entitlements → Entity Assignments → select your subaccount → Configure Entitlements → Add Service Plans.

Search for and add the following:

  • SAP AI Core — select the Extended service plan (not the Free tier, which has significant model and quota restrictions)
  • SAP AI Launchpad — needed to access the Generative AI Hub UI; easy to miss if you assume the Hub is part of AI Core itself

The most common entitlement mistake: adding SAP AI Core but not SAP AI Launchpad. AI Core is the runtime service. AI Launchpad is the UI that gives you access to the Generative AI Hub prompt editor and model catalog. Without AI Launchpad, you can make API calls but you cannot use the visual interface for prompt experimentation. Add both entitlements before proceeding.

Quota Allocation

After adding the entitlements, allocate quota to your subaccount. The default quota allocation for AI Core is zero — you must explicitly set it. In the Entitlements screen, set the quota for the Extended plan to at least 1 unit to enable service instance creation.

Quota and billing transparency is a genuine friction point here. The Generative AI Hub bills on a token consumption basis per model, but the BTP entitlement setup does not show you projected costs or usage limits upfront. Before running any workloads in production, contact your SAP account team to understand the cost model for your specific contract — trial and CPEA accounts have different billing mechanics.

 

Step

Action

Detail

1

Open BTP Cockpit

Navigate to your global account → Subaccounts → select your subaccount

2

Open Entitlements

Entitlements → Entity Assignments → Configure Entitlements

3

Add AI Core

Add Service Plans → search 'SAP AI Core' → select Extended plan

4

Add AI Launchpad

Add Service Plans → search 'SAP AI Launchpad' → select Standard plan

5

Set quota

Set AI Core Extended plan quota to minimum 1 unit → Save

STEP 2 OF 5 

Creating the AI Core Service Instance

Service Instance Creation

With entitlements in place, navigate to your BTP subaccount → Services → Service Marketplace → search for SAP AI Core → select the Extended plan → Create.

During instance creation you will be prompted to provide a JSON configuration parameter. For standard Generative AI Hub access, the default configuration is sufficient — do not skip this step by leaving it empty, as certain model access features require the configuration to be present even if it is set to default values.

{
  "serviceName": "aicore",
  "description": "AI Core instance for Generative AI Hub access"
}

Creating a Service Key

After the service instance is created, you need a service key to generate the credentials your applications will use for API authentication. In the service instance detail view, select Service Keys → Create → provide a name → Create.

The service key JSON contains the clientid, clientsecret, url (for OAuth token endpoint), and serviceurls.AI_API_URL (your AI Core API base URL). Save this immediately and store it securely — you will need all four values for API authentication.

API authentication is more complex than a simple API key. AI Core uses OAuth 2.0 client credentials flow. Your application must first call the token endpoint with the clientid and clientsecret to obtain a bearer token, then include that token in each AI Core API call. Tokens expire and must be refreshed. Many teams expect a simple API key pattern and are surprised by the OAuth requirement. Plan your authentication implementation before writing any AI logic.

STEP 3 OF 5 

Resource Group Configuration

What Resource Groups Are and Why They Matter

A resource group in SAP AI Core is a logical isolation boundary for AI workloads — models, deployments, and executions run within a resource group context. It is not obvious from the documentation that resource group configuration is a prerequisite for accessing the Generative AI Hub, but it is. Without a configured resource group, model deployments will not be visible even after AI Core and AI Launchpad are correctly set up.

Resource group configuration is done through the AI Core API, not through the BTP Cockpit UI — which is another friction point teams don't anticipate. You will need to make a direct API call to create your resource group using the service key credentials you obtained in Step 2.

Creating the Resource Group via API

First, obtain an OAuth token using your service key credentials:

# Step 1: Get OAuth token
curl -X POST '<token_url>/oauth/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials' \
  -d 'client_id=<clientid>' \
  -d 'client_secret=<clientsecret>'

Then create your resource group using the bearer token:

# Step 2: Create resource group
curl -X PUT '<AI_API_URL>/v2/admin/resourceGroups' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"resourceGroupId": "default"}'

Once the resource group is created, return to the AI Launchpad. You should now see the resource group available in the dropdown. Select it and navigate to the Generative AI Hub — the model catalog will now be visible and accessible.

STEP 4 OF 5 

Accessing the Generative AI Hub and Available Models

Navigating to the Hub

With AI Launchpad subscribed and your resource group configured, navigate to your BTP subaccount → Instances and Subscriptions → SAP AI Launchpad → Go to Application. Select your AI Core connection, choose your resource group, and open the Generative AI Hub from the left navigation.

The Hub has two primary sections you will use immediately: the Chat interface for interactive prompt testing and the Prompt Editor for structured experimentation with system prompts, parameters, and response comparison across models.

Available Foundation Models

The following models were available and tested during our setup. Model availability evolves — check the SAP AI Core release notes for the current catalog as new models are added regularly:

 

Model

Provider

Type

Best For

GPT-4o

Azure OpenAI

General LLM

Complex reasoning, code generation, document analysis

GPT-4o mini

Azure OpenAI

General LLM

Cost-efficient tasks, high-volume processing

Claude 3.5 Sonnet

Anthropic

General LLM

Long context, nuanced analysis, structured output

Claude 3 Haiku

Anthropic

General LLM

Fast, cost-efficient, high-volume classification

Gemini 1.5 Pro

Google

General LLM

Multimodal, very long context window

Mistral Large

Mistral AI

General LLM

European data residency, strong multilingual

Mistral Small

Mistral AI

General LLM

Cost-efficient European-hosted option

SAP-RPT-1

SAP

Tabular/structured

Numerical predictions on SAP tabular data

Not all models are available in all regions. If a model you expect to see is missing from your Hub catalog, the most likely cause is that your AI Core instance is in a region where that model is not yet deployed. This is not always clearly surfaced in the UI — the model simply does not appear rather than showing as unavailable. Check SAP's regional availability documentation if your expected models are missing.

STEP 5 OF 5 

Making Your First API Call

Using the Prompt Editor for Experimentation

Before writing any code, use the Generative AI Hub's built-in Prompt Editor to verify your setup is working and to experiment with models. The Prompt Editor allows you to set a system prompt, write a user message, adjust temperature and max token parameters, and compare responses across multiple models side by side.

This is the fastest way to validate that your entitlements, service instance, resource group, and model access are all correctly configured before investing time in application code.

Direct API Integration

For application integration, the AI Core API follows a consistent pattern across all models. After obtaining an OAuth token, construct your request to the chat completions endpoint:

import requests

# Step 1: Get OAuth bearer token
token_response = requests.post(
    f'{token_url}/oauth/token',
    data={
        'grant_type': 'client_credentials',
        'client_id': client_id,
        'client_secret': client_secret
    }
)
bearer_token = token_response.json()['access_token']

# Step 2: Call foundation model via AI Core API
headers = {
    'Authorization': f'Bearer {bearer_token}',
    'Content-Type': 'application/json',
    'AI-Resource-Group': 'default'
}

payload = {
    'model': 'gpt-4o',
    'messages': [
        {'role': 'system', 'content': 'You are an SAP data analyst.'},
        {'role': 'user', 'content': 'Summarize this SAP exception log: ...'}
    ],
    'max_tokens': 500,
    'temperature': 0.3
}

response = requests.post(
    f'{ai_api_url}/v2/inference/deployments/<deployment_id>/chat/completions',
    headers=headers,
    json=payload
)
print(response.json()['choices'][0]['message']['content'])

The deployment_id in the API endpoint URL is model-specific and changes when SAP updates model versions. Retrieve current deployment IDs programmatically from the AI Core API rather than hardcoding them — hardcoded deployment IDs are the most common cause of sudden API failures after a model version update.

Switching Between Models

The same API pattern works across all models in the Generative AI Hub — only the model parameter and deployment_id change. This is the core value of the Hub's abstraction layer: your application code does not need to change when you switch from GPT-4o to Claude or Mistral. The authentication, request structure, and response format are consistent.

The Friction Points: A Summary

For teams setting up the Generative AI Hub for the first time, these are the specific issues that will slow you down if you don't know about them upfront:

 

Step

Action

Detail

1

Missing AI Launchpad entitlement

AI Core alone is not sufficient — add SAP AI Launchpad separately or you will have no UI access to the Hub

2

Zero default quota

BTP allocates zero quota by default — explicitly set quota to at least 1 unit after adding the entitlement

3

Resource group not created

Models are invisible in the Hub until a resource group exists — create via API call before opening the Launchpad

4

OAuth not simple API key

AI Core uses OAuth 2.0 client credentials — implement token refresh logic before writing AI application code

5

Regional model gaps

Models missing from your catalog are likely unavailable in your region — check availability before choosing subaccount region

6

Hardcoded deployment IDs

Deployment IDs change with model updates — retrieve programmatically to avoid silent failures after SAP updates

What You Can Build From Here

With the Generative AI Hub correctly configured, the path to production SAP AI applications becomes significantly clearer. The governed, multi-model access layer means your team can experiment across GPT-4o, Claude, Gemini, and Mistral without managing separate provider relationships, and switch models based on performance, cost, or compliance requirements without rewriting application code.

The natural next steps from this setup are connecting the Generative AI Hub to your HANA Cloud vector store for RAG-based applications on SAP data, building SAP Joule extensions that leverage foundation model capabilities, and integrating AI Core into your BTP CAP application workflows for intelligent enterprise applications.

The setup friction is real but it is a one-time cost. Once the entitlements, service instance, resource group, and authentication are in place, the development experience is significantly smoother than managing individual AI provider integrations.

If you hit any of the friction points listed above or encounter issues not covered here, drop a comment below. These are the setups where community knowledge compounds quickly — your specific error message or configuration issue is likely something another practitioner has already solved.