
Sap Ai Core
- 386 installs
- 399 repo stars
- Updated August 4, 2026
- secondsky/sap-skills
Deploy and orchestrate ML models on SAP AI Core via BTP: training pipelines, inference endpoints, Docker templates, and binding AI services to SAP business apps.
About
Covers SAP AI Core on Business Technology Platform: provisioning AI resources, packaging models, deploying inference, and integrating predictions into SAP applications. Targets SaaS, API, and agent scenarios that need governed enterprise ML pipelines instead of ad hoc notebooks or non-SAP cloud-only stacks.
- SAP AI Core on BTP
- Model deployment and serving
- Docker-based ML templates
- Inference API integration
- Enterprise ML operations on SAP
Sap Ai Core by the numbers
- 386 all-time installs (skills.sh)
- +31 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #2,039 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/secondsky/sap-skills --skill sap-ai-coreAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 386 |
|---|---|
| repo stars | ★ 399 |
| Last updated | August 4, 2026 |
| Repository | secondsky/sap-skills ↗ |
What it does
Deploy and orchestrate ML models on SAP AI Core via BTP: training pipelines, inference endpoints, Docker templates, and binding AI services to SAP business apps.
Files
SAP AI Core & AI Launchpad Skill
Related Skills
- sap-btp-cloud-platform: Use for platform context, BTP account setup, and service integration
- sap-cap-capire: Use for building AI-powered applications with CAP or integrating AI services
- sap-cloud-sdk-ai: Use for SDK integration, AI service calls, and Java/JavaScript implementations
- sap-btp-best-practices: Use for production deployment patterns and AI governance guidelines
When to Use This Skill
Use this skill when provisioning SAP AI Core, using SAP AI Launchpad, configuring Generative AI Hub orchestration, choosing model providers, building RAG or grounding flows, managing prompt templates, deploying training/inference workloads, or wiring AI capabilities into SAP applications.
Table of Contents
1. Overview 2. Quick Start 3. Service Plans 4. Model Providers 5. Orchestration 6. Content Filtering 7. Data Masking 8. Grounding (RAG) 9. Tool Calling 10. Structured Output 11. Embeddings 12. ML Training 13. Deployments 14. Bundled Resources 15. SAP AI Launchpad 16. Prompt Registry 17. API Reference 18. Common Patterns 19. Troubleshooting 20. References
Overview
SAP AI Core is a service on SAP Business Technology Platform (BTP) that manages AI asset execution in a standardized, scalable, hyperscaler-agnostic manner. SAP AI Launchpad provides the management UI for AI runtimes including the Generative AI Hub.
Core Capabilities
| Capability | Description |
|---|---|
| Generative AI Hub | Access to LLMs from multiple providers with unified API |
| Orchestration | Modular pipeline for templating, filtering, grounding, masking |
| ML Training | Argo Workflows-based batch pipelines for model training |
| Inference Serving | Deploy models as HTTPS endpoints for predictions |
| Grounding/RAG | Vector database integration for contextual AI |
Three Components
1. SAP AI Core: Execution engine for AI workflows and model serving 2. SAP AI Launchpad: Management UI for AI runtimes and GenAI Hub 3. AI API: Standardized lifecycle management across runtimes
Quick Start
Prerequisites
- SAP BTP enterprise account
- SAP AI Core service instance (Extended plan for GenAI)
- Service key with credentials
1. Get Authentication Token
# Set environment variables from service key
export AI_API_URL="<your-ai-api-url>"
export AUTH_URL="<your-auth-url>"
export CLIENT_ID="<your-client-id>"
export CLIENT_SECRET="<your-client-secret>"
# Get OAuth token
AUTH_TOKEN=$(curl -s -X POST "$AUTH_URL/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET" \
| jq -r '.access_token')2. Create Orchestration Deployment
# Check for existing orchestration deployment
curl -X GET "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json"
# Create orchestration deployment if needed
curl -X POST "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<orchestration-config-id>"
}'3. Use Harmonized API for Model Inference
ORCHESTRATION_URL="<deployment-url>"
curl -X POST "$ORCHESTRATION_URL/v2/completion" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"config": {
"module_configurations": {
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest",
"model_params": {
"max_tokens": 1000,
"temperature": 0.7
}
},
"templating_module_config": {
"template": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "{{?user_query}}"}
]
}
}
},
"input_params": {
"user_query": "What is SAP AI Core?"
}
}'Service Plans
| Plan | Cost | GenAI Hub | Support | Resource Groups |
|---|---|---|---|---|
| Free | Free | No | Community only | Default only |
| Standard | Per resource + baseline | No | Full SLA | Multiple |
| Extended | Per resource + tokens | Yes | Full SLA | Multiple |
Key Restrictions:
- Free and Standard mutually exclusive in same subaccount
- Free → Standard upgrade possible; downgrade not supported
- Max 50 resource groups per tenant
Model Providers
SAP AI Core provides access to model providers through a tenant-specific catalog. Treat exact model names and versions as examples until verified in the target tenant with GET /v2/lm/scenarios/foundation-models/models or SAP AI Launchpad Model Library.
- Azure OpenAI: GPT-family chat, vision, reasoning, realtime, and embedding models where entitled
- SAP Open Source: Llama/Falcon/Mistral-family open source models where enabled
- Google Vertex AI: Gemini-family chat, vision, code, and embedding models where entitled
- AWS Bedrock: Anthropic Claude and Amazon model families where entitled
- Mistral AI: Mistral Large/Small/Codestral-family models where enabled
- IBM: Granite models
- Perplexity: Sonar-family web-grounded models where enabled
For detailed provider configurations and model lists, see references/model-providers.md.
Orchestration
The orchestration service provides unified access to multiple models through a modular pipeline with 8 execution stages: 1. Grounding → 2. Templating (mandatory) → 3. Input Translation → 4. Data Masking → 5. Input Filtering → 6. Model Configuration (mandatory) → 7. Output Filtering → 8. Output Translation
For complete orchestration module configurations, examples, and advanced patterns, see references/orchestration-modules.md.
Content Filtering
Azure Content Safety: Filters content across 4 categories (Hate, Violence, Sexual, SelfHarm) with severity levels 0-6. Azure OpenAI blocks severity 4+ automatically. Additional features include PromptShield and Protected Material detection.
Llama Guard 3: Covers 14 categories including violent crimes, privacy violations, and code interpreter abuse.
Data Masking
Two PII protection methods:
- Anonymization:
MASKED_ENTITY(non-reversible) - Pseudonymization:
MASKED_ENTITY_ID(reversible)
Supported entities (25 total): Personal data, IDs, financial information, SAP-specific IDs, and sensitive attributes. For complete entity list and implementation details, see references/orchestration-modules.md.
Grounding (RAG)
Integrate external data from SharePoint, S3, SFTP, SAP Build Work Zone, and DMS. Supports PDF, HTML, DOCX, images, and more. Limit: 2,000 documents per pipeline with daily refresh. For detailed setup, see references/grounding-rag.md.
Tool Calling
Enable LLMs to execute functions through a 5-step workflow: define tools → receive tool_calls → execute functions → return results → LLM incorporates responses. Templates available in templates/tool-definition.json.
Structured Output
Force model responses to match JSON schemas using strict validation. Useful for structured data extraction and API responses.
Embeddings
Generate semantic embeddings for RAG and similarity search via /v2/embeddings endpoint. Supports document, query, and text input types.
ML Training
Uses Argo Workflows for training pipelines. Key requirements: create default object store secret, define workflow template, create configuration with parameters, and execute training. For complete workflow patterns, see references/ml-operations.md.
Deployments
Deploy models via two-step process: create configuration (with model binding), then create deployment with TTL. Statuses: Pending → Running → Stopping → Stopped/Dead. Templates in templates/deployment-config.json.
SAP AI Launchpad
Web-based UI with 4 key applications:
- Workspaces: Manage connections and resource groups
- ML Operations: Train, deploy, monitor models
- Generative AI Hub: Prompt experimentation and orchestration
- Functions Explorer: Explore available AI functions
Required roles include genai_manager, genai_experimenter, prompt_manager, orchestration_executor, and mloperations_editor. For complete guide, see references/ai-launchpad-guide.md.
Prompt Registry
The Prompt Registry manages the lifecycle of prompt templates from design to runtime, integrating them into SAP AI Core and orchestration workflows.
Two management interfaces:
- Imperative API: Full CRUD via REST, for design-time prompt refinement
- Declarative API: Git repository sync, for runtime and CI/CD use cases
Key endpoints:
POST /v2/lm/promptTemplates— Create a prompt templatePOST /v2/lm/promptTemplates/{id}/substitution— Fill template by IDPOST /v2/lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/substitution— Fill by name
For complete Prompt Registry documentation, see references/ai-launchpad-guide.md.
API Reference
Core Endpoints
Key endpoints: /v2/lm/scenarios, /v2/lm/configurations, /v2/lm/deployments, /v2/lm/executions, /lm/meta. For complete API reference with examples, see references/api-reference.md.
Common Patterns
CAP Integration: SAP CAP is the primary consumer framework for AI Core on BTP. Bind an AI Core service instance to your CAP app via MTA, then call the orchestration API from CAP event handlers using the SAP Cloud SDK for AI. Always process LLM calls asynchronously in production (return 202 Accepted, process in background via cds.spawn) to avoid BTP load balancer timeouts. See sap-cap-capire and sap-cloud-sdk-ai skills for complete code examples.
Simple Chat: Basic model invocation with templating module RAG with Grounding: Combine vector search with LLM for context-aware responses Secure Enterprise Chat: Filtering + masking + grounding for PII protection Templates available in templates/orchestration-workflow.json.
Troubleshooting
Common Issues:
- 401 Unauthorized: Refresh OAuth token
- 403 Forbidden: Check IAM roles, request quota increase
- 404 Not Found: Verify AI-Resource-Group header
- Deployment DEAD: Check deployment logs
- Training failed: Create
defaultobject store secret
Request quota increases via support ticket (Component: CA-ML-AIC).
Bundled Resources
Reference Documentation
1. references/orchestration-modules.md - All orchestration modules in detail 2. references/generative-ai-hub.md - Complete GenAI hub documentation 3. references/model-providers.md - Model providers and configurations 4. references/api-reference.md - Complete API endpoint reference 5. references/grounding-rag.md - Grounding and RAG implementation 6. references/ml-operations.md - ML operations and training 7. references/advanced-features.md - Chat, applications, security, auditing 8. references/ai-launchpad-guide.md - Complete SAP AI Launchpad UI guide
Templates
1. templates/deployment-config.json - Deployment configuration template 2. templates/orchestration-workflow.json - Orchestration workflow template 3. templates/tool-definition.json - Tool calling definition template
Official Sources
- SAP AI Core Guide: https://help.sap.com/docs/sap-ai-core
- SAP AI Launchpad Guide: https://help.sap.com/docs/sap-ai-launchpad
- SAP Note 3437766: Model token rates and limits
SAP AI Core & AI Launchpad Skill
A portable AI coding assistant skill for SAP AI Core and SAP AI Launchpad development on SAP Business Technology Platform (BTP). Claude-specific command metadata is packaging support only; the skill content is intended to remain useful in Codex, OpenCode, and other Markdown-capable harnesses.
Capability Index
| Capability | Status |
|---|---|
| Commands | 1: /ai-core-deployment-check |
| Agents | 0 |
| Hooks | No |
| MCP | No |
| LSP | No |
| Source Freshness | last_verified: 2026-06-12; 2026-06-16 pass corrected portability and evidence wording. |
| Verification | npm run validate; live deployment behavior and model availability remain tenant-verified only. |
Overview
This skill provides guidance for:
- Deploying and consuming generative AI models
- Building orchestration workflows with templating, filtering, and grounding
- Implementing RAG (Retrieval-Augmented Generation) with vector databases
- Managing ML training pipelines with Argo Workflows
- Configuring content filtering and data masking for PII protection
- Using the Generative AI Hub for prompt experimentation
When to Use This Skill
This skill is triggered when working with:
SAP AI Core
- SAP AI Core setup and configuration
- SAP AI Core deployments and executions
- SAP AI Core service plans (Free, Standard, Extended)
- SAP AI Core API endpoints
- AI Core generative AI hub
- AI Core orchestration service
- AI Core foundation models
- AI Core grounding and RAG
SAP AI Launchpad
- SAP AI Launchpad setup
- AI Launchpad generative AI hub
- AI Launchpad prompt experimentation
- AI Launchpad ML operations
- AI Launchpad orchestration workflows
Model Providers
- Azure OpenAI on SAP
- GPT-4o, GPT-4 Turbo, GPT-3.5 on SAP
- AWS Bedrock on SAP
- Claude on SAP BTP
- Anthropic Claude via AI Core
- Google Vertex AI on SAP
- Gemini on SAP
- Mistral AI on SAP
- IBM Granite on SAP
- Llama models on SAP
Features
- LLM deployment on SAP
- Generative AI on SAP BTP
- AI model orchestration
- Prompt templating
- Content filtering for AI
- Data masking for AI
- PII protection in AI
- Vector database integration
- Document grounding
- RAG implementation SAP
- Embeddings generation
- Tool calling with LLMs
- Function calling AI Core
- Structured output AI
- JSON schema responses
- Streaming responses
ML Operations
- ML model training SAP
- Argo Workflows SAP
- Training pipelines
- Batch inference SAP
- Model deployment SAP
- Training schedules
- Execution management
- Artifact management
API & Integration
- AI API SAP
- Harmonized API
- Chat completion API
- Embeddings API
- Orchestration API
- REST API AI Core
Advanced Features
- Multi-turn chat conversations
- Git repository sync applications
- Prompt templates declarative
- Prompt optimization SAP
- AI content as a service
- AI content security
- Data protection privacy GDPR
- Auditing logging SAP AI
- KServe serving templates
- Metadata vector search
- Content packages DataRobot
Keywords
sap ai core, sap ai launchpad, generative ai hub, foundation models,
llm deployment, model orchestration, prompt templating, content filtering,
data masking, pii protection, vector database, document grounding, rag,
embeddings, tool calling, function calling, structured output, streaming,
azure openai sap, gpt-4 sap, claude sap, gemini sap, mistral sap,
llama sap, aws bedrock sap, google vertex ai sap, ibm granite sap,
ml operations, argo workflows, training pipeline, batch inference,
model deployment, ai api, harmonized api, orchestration api,
sap btp ai, enterprise ai, sap machine learning, ai core extended,
prompt experimentation, ai launchpad workspaces, resource groups,
configurations, executions, deployments, artifacts, scenarios,
chat conversations, messages history, git sync applications,
prompt templates, prompt optimization, ai content security,
data protection, gdpr compliance, auditing logging, kserve,
serving templates, metadata retrieval, content packagesFile Structure
sap-ai-core/
├── SKILL.md # Main skill file
├── README.md # This file
├── references/
│ ├── orchestration-modules.md # Detailed orchestration module docs
│ ├── generative-ai-hub.md # Generative AI Hub reference
│ ├── api-reference.md # Complete API reference
│ ├── grounding-rag.md # Grounding and RAG implementation
│ ├── ml-operations.md # ML training and operations
│ ├── model-providers.md # Model providers and configurations
│ ├── advanced-features.md # Chat, security, auditing, templates
│ └── ai-launchpad-guide.md # Complete AI Launchpad UI guide
└── templates/
├── deployment-config.json # Deployment configuration template
├── orchestration-workflow.json # Orchestration workflow template
└── tool-definition.json # Tool calling definition templatePrerequisites
- SAP BTP enterprise account
- SAP AI Core service instance
- Extended service plan (for Generative AI Hub)
- Service key with credentials
Quick Start
1. Set up authentication:
export AI_API_URL="<your-ai-api-url>"
export AUTH_TOKEN="<your-oauth-token>"2. List available models:
curl -X GET "$AI_API_URL/v2/lm/scenarios/foundation-models/models" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"3. Create orchestration deployment and start using models
Before using any model ID from examples or references, list the target tenant catalog:
curl -X GET "$AI_API_URL/v2/lm/scenarios/foundation-models/models" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Documentation Sources
| Resource | URL |
|---|---|
| SAP AI Core Guide | https://help.sap.com/docs/sap-ai-core |
| SAP AI Launchpad Guide | https://help.sap.com/docs/sap-ai-launchpad |
| GitHub Docs Source | https://github.com/SAP-docs/sap-artificial-intelligence |
| SAP Note (Models) | SAP Note 3437766 |
| SAP Discovery Center | https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core |
License
GPL-3.0
Version
Current: 2.3.0 (2026-06-16)
- Documentation-audited AI Core guidance with tenant/runtime verification still pending.
- Model names are examples and must be checked against the target tenant catalog.
- Skill content is portable across Claude, Codex, OpenCode, and similar Markdown-capable harnesses.
Last Updated
2026-06-16
Next Review
Next source refresh and tenant verification remain pending until SAP Help/package evidence or live tenant evidence is available.
Advanced Features Reference
Complete reference for additional SAP AI Core features not covered in other reference files.
Documentation Source: https://github.com/SAP-docs/sap-artificial-intelligence/tree/main/docs/sap-ai-core
---
Table of Contents
1. Chat Conversations 2. Applications (Git Sync) 3. Prompt Templates 4. Prompt Optimization 5. AI Content as a Service 6. AI Content Security 7. Data Protection and Privacy 8. Auditing and Logging 9. ServingTemplate Schema 10. Contextualized Retrieval with Metadata 11. Content Packages
---
Chat Conversations
Multi-turn conversation handling using the orchestration service.
Message History Management
The orchestration service manages conversation history through the messages_history parameter, storing user and assistant role exchanges.
Request Structure
{
"orchestration_config": {
"module_configurations": {
"templating_module_config": {
"template": [
{"role": "user", "content": "{{?current_message}}"}
]
},
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest",
"model_params": {
"max_tokens": 300,
"temperature": 0.1
}
}
}
},
"messages_history": [
{"role": "user", "content": "What is machine learning?"},
{"role": "assistant", "content": "Machine learning is a branch of AI..."},
{"role": "user", "content": "Can you give an example?"},
{"role": "assistant", "content": "Sure, email spam filtering is an example..."}
],
"input_params": {
"current_message": "What about deep learning?"
}
}Key Behavior
- The templating module appends the current user message to the message history
- The combined history generates the prompt sent to the LLM module
- Response
module_results.templatingandorchestration_result.choicescan be used as message history for subsequent requests
Continuation Pattern
def continue_conversation(history, new_message, response):
"""Update conversation history with new exchange."""
history.append({"role": "user", "content": new_message})
history.append({
"role": "assistant",
"content": response["orchestration_result"]["choices"][0]["message"]["content"]
})
return history---
Applications (Git Sync)
Applications synchronize workflow templates from GitHub repositories.
Key Features
- Automatic Sync: Applications sync with GitHub every ~3 minutes
- Manual Sync: Trigger via
POST {{apiurl}}/admin/applications/{{appName}}/refresh
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/v2/admin/applications | POST | Create application |
/v2/admin/applications | GET | List applications |
/v2/admin/applications/{name} | DELETE | Remove application |
/v2/admin/applications/{name}/status | GET | Get sync status |
/admin/applications/{name}/refresh | POST | Trigger manual sync |
Create Application
curl -X POST "$AI_API_URL/v2/admin/applications" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"applicationName": "my-workflows",
"repositoryUrl": "https://github.com/org/ai-workflows",
"revision": "HEAD",
"path": "workflows/"
}'Required Configuration
| Parameter | Description |
|---|---|
applicationName | Application identifier (becomes executable ID) |
repositoryUrl | GitHub repository URL |
path | Path within repository |
revision | Branch, commit SHA, or HEAD |
Sync Status Response
{
"health": "healthy",
"lastSyncTime": "2024-01-15T10:00:00Z",
"status": "Synced",
"message": ""
}Validation Checks
The system validates:
- No duplicate workflow names
- Correct scenario labels on templates
- Valid YAML syntax
- Proper metadata structure (WorkflowTemplate kind)
---
Prompt Templates
Manage prompts through declarative (Git) or imperative (API) approaches.
Declarative Approach (Git-managed)
File Format
Filename: <name>.prompttemplate.ai.sap.yaml
name: customer-support-prompt
version: 0.0.1
scenario: customer-service
spec:
template:
- role: system
content: "You are a helpful customer support agent for {{?company_name}}."
- role: user
content: "{{?customer_query}}"
defaults:
company_name: "Acme Corp"
additional_fields:
metadata:
author: "AI Team"
category: "support"
model_restrictions:
blocked_models:
- model_name: "gpt-3.5-turbo"
versions: ["0613"]Key Characteristics
- Managed through git commits
- Auto-sync with prompt registry
- Marked as
managedBy: declarative - Always reflects HEAD version
- Cannot be edited via imperative API
Imperative Approach (API-managed)
Create Prompt Template
curl -X POST "$AI_API_URL/v2/lm/promptTemplates" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "api-managed-prompt",
"version": "1.0.0",
"scenario": "foundation-models",
"spec": {
"template": [
{"role": "user", "content": "{{?user_input}}"}
]
}
}'List Prompt Templates
curl -X GET "$AI_API_URL/v2/lm/promptTemplates" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Placeholder Syntax
| Syntax | Description |
|---|---|
{{?variable}} | Required input parameter |
{{?variable}} with defaults | Optional if default provided |
---
Prompt Optimization
Automated prompt improvement using optimization runs.
Overview
Prompt Optimization takes an input prompt template and a dataset of desirable responses to maximize a specified metric.
Prerequisites
- Required roles:
genai_managerorcustom_evaluation - Service plan:
extendedtier required - Object store named
defaultmust be registered - Prompt template saved in prompt registry
- Dataset artifact prepared and registered
Dataset Preparation
| Requirement | Value |
|---|---|
| Minimum samples | 25 |
| Maximum samples | 200 |
| Format | JSON array |
Dataset Structure
[
{
"fields": {
"input": "Customer complaint about delivery delay",
"category": "logistics"
},
"answer": {
"sentiment": "negative",
"urgency": "high",
"category": "delivery"
}
}
]Important: Placeholder names in fields must match those in the template exactly. Do not include confidential or personally identifiable information.
Process
1. Submit optimization job with prompt template and dataset 2. System generates multiple prompt variations 3. Evaluates variations against target metric 4. Returns optimized prompt to registry 5. Stores additional results in object store
Launchpad UI Flow (7 Steps)
1. Access: Connect to SAP AI Core via Workspaces app 2. Navigate: Generative AI Hub → Optimization 3. Initiate: Create → Prompt Optimization 4. Configure Artifacts: Select template, models, and dataset 5. Select Metric: Choose evaluation metric 6. Advanced Settings: Configure template name/version (optional) 7. Review & Deploy: Verify and start job
Limitations
| Constraint | Details |
|---|---|
| Duration | Minutes to multiple hours |
| Requests | Submits large number of prompt requests |
| Model Support | Mistral and DeepSeek NOT supported |
Operations (AI Launchpad)
- Create a new prompt optimization
- View existing prompt optimizations
- View detailed run information
---
AI Content as a Service
Publish AI content to SAP BTP Service Marketplace.
Capabilities
- Publish workflows, serving templates, or Docker images
- Distribute as managed service on SAP BTP
- Other tenants can consume via standard APIs
Use Cases
- Monetize AI models and workflows
- Share AI components across organization
- Provide standardized AI services
---
AI Content Security
Security best practices for AI content (workflows, templates, Docker images).
Required Practices
| Practice | Description |
|---|---|
| Threat Modeling | Conduct security risk workshops |
| Static Code Scans | Use SAST tools for vulnerability analysis |
| OSS Vulnerability Scan | Evaluate third-party components |
| OSS Update Strategy | Define update cadence for open-source components |
| Code Reviews | Peer review with security focus |
| Malware Scanning | Scan uploaded data before deployment |
| Secure Code Protection | Use Docker image digest and signature verification |
| Docker Base Image Security | Use minimal, hardened base images |
Key Responsibility
"Users of AI Core are responsible for the content of their Docker images and assume the risk of running compromised containers in the platform."
Docker Security Guidelines
1. Select minimal, hardened base images 2. Keep images updated 3. Remove unnecessary components 4. Use multi-stage builds 5. Scan images for vulnerabilities 6. Sign images for verification
---
Data Protection and Privacy
Compliance features for data protection.
Supported Capabilities
| Feature | Description |
|---|---|
| Data Blocking | Simplified blocking of personal data |
| Data Deletion | Simplified deletion of personal data |
| Change Logging | Audit trail for data changes |
| Read-Access Logging | Track data access |
| Consent Management | Manage user consent |
| Data Storage Controls | Control data storage and processing |
Compliance Scope
- General data protection acts (GDPR, etc.)
- Industry-specific legislation
- Regional privacy requirements
Important Notes
- SAP does not provide legal advice
- Compliance requires secure system operation
- Case-by-case evaluation required
---
Auditing and Logging
Security event logging in SAP AI Core.
Events Logged
| Category | Events |
|---|---|
| Object Store | Create, delete, retrieve secrets |
| Resource Groups | Provision, deprovision |
| Tenants | Provision, retrieve, deprovision |
| Docker Registry | Create, delete secrets |
| Deployments | Create, delete |
| Executions | Create, delete |
| Repositories | Create, delete |
| Applications | Create, delete |
Log Details by Operation Type
| Operation | Logged Details |
|---|---|
| List/Get/Watch | Timestamp, tenant IDs, source IPs, request URI, level |
| Create/Update/Patch | Above + request/response objects |
| Delete | Above + response object |
Authentication Events
| Event | Message |
|---|---|
| Token expired | Jwt is expired |
| Missing auth header | RBAC: access denied |
| Invalid token | Jwt issuer is not configured |
| Wrong tenant | Jwt verification fails |
---
ServingTemplate Schema
API schema for serving templates (KServe integration) for model deployment.
Quotas and Limits
| Limit | Value |
|---|---|
| Max ServingTemplates per tenant | 50 |
| Max WorkflowTemplates per tenant | 50 |
| Bulk operations | Requires bulkUpdates annotation |
Resource Structure
apiVersion: ai.sap.com/v1alpha1
kind: ServingTemplate
metadata:
name: my-serving-template
annotations:
scenarios.ai.sap.com/description: "Description of scenario"
scenarios.ai.sap.com/name: "scenario-name"
executables.ai.sap.com/description: "Description of executable"
executables.ai.sap.com/name: "executable-name"
ai.sap.com/bulkUpdates: "true" # Enable bulk operations
labels:
ai.sap.com/version: "1.0.0"
scenarios.ai.sap.com/id: "unique-scenario-id"
spec:
inputs:
parameters:
- name: modelUri
default: ""
type: string
artifacts:
- name: model
template:
apiVersion: serving.kserve.io/v1beta1
metadata:
name: "{{inputs.parameters.name}}"
spec:
predictor:
containers:
- name: kserve-container
image: "{{inputs.parameters.image}}"
env:
- name: STORAGE_URI
value: "{{inputs.artifacts.model}}"Model Path Configuration
| Environment Variable | Description |
|---|---|
STORAGE_URI | Points to artifact location for model download |
| Default Mount Path | /mnt/models (typical in SAP AI Core examples) |
Important: The /mnt/models path is the typical default used in SAP AI Core examples, but the mount path is configurable via the ServingRuntime/ServingTemplate and container args (e.g., --model_dir). Your inference code should read the path from configuration or environment variables rather than assuming a hardcoded path:
import os
# Read from environment or use default
MODEL_PATH = os.environ.get("MODEL_DIR", "/mnt/models")
def load_model():
"""Load model from configured mount path."""
return load_from_path(MODEL_PATH)Configuration Options:
- Set via container args:
--model_dir=/custom/path - Set via environment variable in ServingTemplate
- Override in KServe InferenceService spec
Annotations Reference
| Annotation | Purpose |
|---|---|
scenarios.ai.sap.com/description | Scenario description |
scenarios.ai.sap.com/name | Scenario display name |
executables.ai.sap.com/description | Executable description |
executables.ai.sap.com/name | Executable display name |
ai.sap.com/bulkUpdates | Enable bulk stop/delete operations |
Labels Reference
| Label | Purpose |
|---|---|
ai.sap.com/version | Version number |
scenarios.ai.sap.com/id | Unique scenario ID |
Parameter Types
Only string type is supported for input parameters.
Placeholder Syntax
Use {{inputs.parameters.ParameterName}} and {{inputs.artifacts.ArtifactName}} in template spec.
Bulk Operations
When ai.sap.com/bulkUpdates: "true" is set:
# Bulk stop deployments
curl -X PATCH "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"targetStatus": "STOPPED",
"deploymentIds": ["deploy-1", "deploy-2", "deploy-3"]
}'
# Bulk delete deployments
curl -X DELETE "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"deploymentIds": ["deploy-1", "deploy-2", "deploy-3"]
}'---
Contextualized Retrieval with Metadata
Include metadata in grounding retrieval results.
Configuration
Add metadata_params to grounding configuration:
{
"grounding_module_config": {
"grounding_service": "document_grounding_service",
"grounding_service_configuration": {
"grounding_input_parameters": ["user_query"],
"grounding_output_parameter": "context",
"metadata_params": ["source", "webUrl", "title"],
"filters": [{"id": "<pipeline-id>"}]
}
}
}Metadata Levels
| Level | Description |
|---|---|
| Data Repository | Repository-level metadata |
| Document | Document-level metadata |
| Chunk | Chunk-level metadata |
Discovery
Query available metadata keys:
curl -X POST "$AI_API_URL/v2/lm/document-grounding/retrieval/search" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"query": "test query",
"filters": [{"id": "<pipeline-id>"}]
}'Naming Convention for Conflicts
When metadata keys exist at multiple levels:
- Chunk-level:
webUrl - Document-level:
document_webUrl - Repository-level:
repository_webUrl
Using Metadata in Prompts
{
"templating_module_config": {
"template": [
{
"role": "system",
"content": "Answer based on the context. Include source references.\n\nContext: {{$context}}"
},
{"role": "user", "content": "{{?user_query}}"}
]
}
}---
Content Packages
Additional Python packages extending SAP AI Core.
Available Packages
| Package | Purpose | PyPI Link |
|---|---|---|
sap-ai-core-datarobot | DataRobot integration | https://pypi.org/project/sap-ai-core-datarobot/ |
sap-computer-vision-package | Image classification and feature extraction | https://pypi.org/project/sap-computer-vision-package/ |
Installation
pip install sap-ai-core-datarobot
pip install sap-computer-vision-packageComputer Vision Package Capabilities
- Image classification
- Feature extraction
- Integration with SAP AI SDK Core
---
Documentation Links
- Chat: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/chat-39321a9.md
- Applications: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/application-7f1e35b.md
- Prompt Templates: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-a-prompt-template-declarative-815def5.md
- AI Content Security: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/ai-content-security-d1cd77f.md
- Data Protection: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/data-protection-and-privacy-d25e4c9.md
- Auditing: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/auditing-and-logging-information-e19844a.md
- API Schema: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/api-schema-spec-ai-sap-com-v1alpha1-4d1ffd2.md
SAP AI Launchpad Complete Guide
Comprehensive reference for SAP AI Launchpad features and operations.
Documentation Source: https://github.com/SAP-docs/sap-artificial-intelligence/tree/main/docs/sap-ai-launchpad
---
Table of Contents
1. Overview 2. Initial Setup 3. Workspaces and Connections 4. User Roles 5. Generative AI Hub 6. Prompt Editor 7. Prompt Registry 8. Prompt Optimization 9. Orchestration Workflows 10. ML Operations 11. Configurations 12. Deployments 13. Executions and Runs 14. Schedules 15. Datasets and Artifacts 16. Model Comparison 17. Applications 18. Meta API and Custom Runtime Capabilities
---
Overview
SAP AI Launchpad is a multitenant SaaS application on SAP BTP that provides:
- Management UI for AI runtimes (SAP AI Core)
- Generative AI Hub for prompt experimentation
- ML Operations for model lifecycle management
- Analytics and monitoring dashboards
Two User Types
| Type | Description |
|---|---|
| AI Scenario Producer | Engineers developing and productizing AI scenarios |
| AI Scenario Consumer | Business analysts subscribing to and using AI scenarios |
---
Initial Setup
Prerequisites
1. SAP BTP enterprise account 2. Subaccount with Cloud Foundry enabled 3. SAP AI Launchpad subscription 4. SAP AI Core instance (for runtime connection)
Setup Steps
1. Create Subaccount with Cloud Foundry environment 2. Subscribe to SAP AI Launchpad in Service Marketplace 3. Create Service Instance of SAP AI Core (if needed) 4. Assign Role Collections to users 5. Add Connection to SAP AI Core runtime
Service Plans
| Plan | Cost | Support | GenAI Hub |
|---|---|---|---|
| Free | Free | Community only, no SLA | No |
| Standard | Monthly fixed price | Full SAP support | Yes |
Note: Free → Standard upgrade preserves data; downgrade not supported.
---
Workspaces and Connections
Adding a Connection
1. Navigate to Administration → Connections 2. Click Add 3. Enter connection details:
- Name
- Service Key (from SAP AI Core)
4. Test connection 5. Save
Managing Connections
| Operation | Description |
|---|---|
| Edit | Modify connection settings |
| Delete | Remove connection |
| Test | Verify connectivity |
| Set Default | Make primary connection |
Assigning Connection to Workspace
1. Navigate to Workspaces 2. Select workspace 3. Click Assign Connection 4. Select connection from dropdown 5. Confirm
---
User Roles
Administrative Roles
| Role | Capabilities |
|---|---|
ailaunchpad_admin | Full administrative access |
ailaunchpad_connections_editor | Manage connections |
ailaunchpad_aicore_admin | SAP AI Core integration management |
ML Operations Roles
| Role | Capabilities |
|---|---|
ailaunchpad_mloperations_viewer | View ML operations |
ailaunchpad_mloperations_editor | Full ML operations access |
Generative AI Hub Roles
| Role | Capabilities |
|---|---|
genai_manager | Full GenAI hub access, save prompts |
genai_experimenter | Prompt experimentation only |
prompt_manager | Manage saved prompts |
prompt_experimenter | Use saved prompts |
Functions Explorer Roles
| Role | Capabilities |
|---|---|
ailaunchpad_functions_explorer_editor_v2 | Edit functions explorer |
ailaunchpad_functions_explorer_viewer_v2 | View functions explorer |
Note: Role names prompt_media_executor and orchestration_executor may be deprecated. Verify current role names in SAP documentation.
---
Generative AI Hub
Access Path
Workspaces → Select workspace → Generative AI Hub
Features
| Feature | Description |
|---|---|
| Prompt Editor | Interactive prompt testing |
| Model Library | Browse available models |
| Grounding Management | Manage document pipelines |
| Orchestration | Build workflow configurations |
| Chat | Direct model interaction |
| Saved Prompts | Prompt management |
Model Library
View model specifications including:
- Capabilities (chat, embeddings, vision)
- Context window sizes
- Performance benchmarks
- Cost per token
- Deprecation dates
---
Prompt Editor
Access
Generative AI Hub → Prompt Editor
Interface Elements
| Element | Description |
|---|---|
| Name | Prompt identifier (manager roles only) |
| Collection | Organize prompts (manager roles only) |
| Messages | Configure message blocks with roles |
| Variables | Define input placeholders |
| Model Selection | Choose model and version |
| Parameters | Adjust model parameters |
| Metadata | Tags and notes (manager roles only) |
Message Roles
- System: Instructions for the model
- User: User input
- Assistant: Previous assistant responses
Variable Syntax
Use {{variable_name}} for placeholders with definitions section.
Running Prompts
1. Configure messages and variables 2. Select model (optional - uses default) 3. Adjust parameters 4. Click Run 5. View response (streaming available)
Image Inputs
- Supported for select models (GPT-4o, Gemini, Llama Vision)
- Maximum 5MB across all inputs
- Requires
prompt_media_executorrole
Saving Prompts
- Click Save (manager roles only)
- Assign to collection
- Add tags and notes
- Version automatically managed
Prompt Types
| Type | Description |
|---|---|
| Question Answering | Q&A interactions |
| Summarization | Extract key points |
| Inferencing | Sentiment, entity extraction |
| Transformations | Translation, format conversion |
| Expansions | Content generation |
---
Prompt Registry
Access: Generative AI Hub → Prompt Registry
The Prompt Registry manages the lifecycle of prompt templates from design to runtime. It integrates prompt templates into SAP AI Core, making them discoverable across applications and orchestration workflows.
Two Management Interfaces
| Interface | Method | Best For | Versioning |
|---|---|---|---|
| Imperative API | REST API (full CRUD) | Design-time refinement | History tracked via /history endpoint |
| Declarative API | Git repository sync | Runtime use cases, CI/CD | Git-managed, auto-synced |
Imperative API: Create a Prompt Template
Send a POST request to {{apiurl}}/v2/lm/promptTemplates:
{
"name": "summarization-template",
"scenarioId": "foundation-models",
"version": "0.0.1",
"template": [
{"role": "system", "content": "Summarize the following text concisely."},
{"role": "user", "content": "{{?input_text}}"}
],
"defaults": {
"input_text": ""
},
"additional_fields": {}
}Declarative API: Create via Git
1. Create a prompt template file: <name>.prompttemplate.ai.sap.yaml 2. Push to a synced git repository 3. The template auto-syncs within minutes 4. Verify via GET {{apiurl}}/v2/lm/promptTemplates 5. Declarative templates are marked managedBy: <declarative> and are always the head version
Using a Prompt Template at Runtime
Fill a template by ID:
POST {{apiurl}}/v2/lm/promptTemplates/{{promptTemplateId}}/substitutionOr fill by name, scenario, and version:
POST {{apiurl}}/v2/lm/scenarios/{{scenarioId}}/promptTemplates/{{promptTemplateName}}/versions/{{versionId}}/substitutionInclude variable values in the request body. Add query parameter metadata=true to return the full template definition.
Resource Group Scope
By default, prompt templates are managed at the main-tenant level. To scope to a resource group:
--header 'AI-Resource-Group-Scope: true'
--header 'AI-Resource-Group: <resource group>'Integration with Orchestration
Prompt templates from the registry can be referenced in orchestration workflows via the templating module, enabling centralized prompt management across multiple applications.
Required Roles
| Role | Capabilities |
|---|---|
prompt_manager | Create, update, delete prompt templates |
prompt_experimenter | Use saved prompt templates |
---
Prompt Optimization
Access: Generative AI Hub → Prompt Optimization
Prompt Optimization evaluates and refines prompts using reference datasets. Available since Q1 2026.
Key Features
- Variable mapping to reconcile mismatches between prompts and datasets
- Metrics including
EXACT_MATCH(Boolean: output exactly matches reference) - Automated evaluation against ground-truth responses
Variable Mapping
When prompt variable names differ from dataset column names, variable mapping aligns them:
{
"variable_mapping": [
{"prompt_variable": "user_query", "dataset_column": "question"},
{"prompt_variable": "context_text", "dataset_column": "document"}
]
}Configuration
Create a configuration for prompt optimization via the API, referencing a prompt template from the Prompt Registry and a dataset in the object store.
---
Orchestration Workflows
Access
Generative AI Hub → Orchestration → Create
Workflow Modules
| Order | Module | Required |
|---|---|---|
| 1 | Grounding | Optional |
| 2 | Templating | Mandatory |
| 3 | Input Translation | Optional |
| 4 | Data Masking | Optional |
| 5 | Input Filtering | Optional |
| 6 | Model Configuration | Mandatory |
| 7 | Output Filtering | Optional |
| 8 | Output Translation | Optional |
Required Modules Explained:
- Templating: Constructs the actual prompt/messages sent to the LLM using input variables and context
- Model Configuration: Specifies which LLM model to use and its parameters (temperature, max_tokens, etc.)
Building Workflows
1. Click Create to start new workflow 2. Configure required modules (Templating, Model) 3. Enable optional modules via Edit 4. Configure each enabled module 5. Click Test to run workflow 6. Click Save to store configuration
JSON Upload
- Maximum file size: 200 KB
- Format: JSON with
module_configurations - Note: Workflows with images can be downloaded but not uploaded
Saving Workflows
- Save as configuration for reuse
- Assign name and description
- Link to deployments
---
ML Operations
Access
Workspaces → Select workspace → ML Operations
Components
| Component | Purpose |
|---|---|
| Configurations | Parameter and artifact settings |
| Executions | Training jobs |
| Deployments | Model serving |
| Schedules | Automated executions |
| Datasets | Training data |
| Models | Trained models |
| Result Sets | Inference outputs |
| Other Artifacts | Miscellaneous artifacts |
---
Configurations
Creating Configuration
1. Navigate to ML Operations → Configurations 2. Click Create 3. Enter details:
- Name
- Scenario
- Executable
- Parameters
- Input artifacts
4. Save
Configuration Contents
| Field | Description |
|---|---|
| Name | Configuration identifier |
| Scenario | AI scenario reference |
| Executable | Workflow or serving template |
| Parameter Bindings | Key-value parameters |
| Artifact Bindings | Input artifact references |
---
Deployments
Creating Deployment
1. Navigate to ML Operations → Deployments 2. Click Create 3. Select configuration 4. Set duration (optional TTL) 5. Click Create
Deployment Details
| Field | Description |
|---|---|
| ID | Unique identifier |
| Status | Current state |
| URL | Inference endpoint |
| Configuration | Associated config |
| Created | Timestamp |
| Duration | TTL if set |
Deployment Statuses
| Status | Description | Actions |
|---|---|---|
| Pending | Starting | Stop |
| Running | Active | Stop |
| Stopping | Shutting down | Wait |
| Stopped | Inactive | Delete |
| Dead | Failed | Delete |
| Unknown | Initial | Delete |
Operations
| Operation | Description |
|---|---|
| View | See deployment details |
| View Logs | Access pipeline logs |
| Update | Change configuration |
| Stop | Halt deployment |
| Delete | Remove deployment |
Bulk Operations
- Stop multiple deployments
- Delete multiple deployments (up to 100)
---
Executions and Runs
Creating Execution
1. Navigate to ML Operations → Executions 2. Click Create 3. Select configuration 4. Click Create
Execution Statuses
| Status | Description |
|---|---|
| Pending | Queued |
| Running | Executing |
| Completed | Finished successfully |
| Dead | Failed |
| Stopped | Manually stopped |
Viewing Execution Details
- Parameters and artifacts
- Status and timing
- Logs from pipeline
- Output artifacts
- Metrics
Comparing Executions
1. Select multiple executions 2. Click Compare 3. View side-by-side:
- Parameters
- Metrics
- Durations
4. Create charts for visualization
---
Schedules
Creating Schedule
1. Navigate to ML Operations → Schedules 2. Click Create 3. Select configuration 4. Set cron expression 5. Define start/end dates 6. Save
Cron Expression Format
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (0-6)
│ │ │ │ │
* * * * *Schedule Operations
| Operation | Description |
|---|---|
| View | See schedule details |
| Edit | Modify schedule |
| Stop | Pause schedule |
| Resume | Restart schedule |
| Delete | Remove schedule |
---
Datasets and Artifacts
Dataset Registration
1. Navigate to ML Operations → Datasets 2. Click Register 3. Enter details:
- Name
- URL (ai://secret-name/path)
- Scenario
- Description
4. Save
Artifact Types
| Type | Description |
|---|---|
| Dataset | Training/validation data |
| Model | Trained model |
| Result Set | Inference results |
| Other | Miscellaneous |
Finding Artifacts
- Filter by scenario
- Search by name
- Sort by date
- View details
---
Model Comparison
Comparing Models
1. Navigate to ML Operations → Models 2. Select multiple models 3. Click Compare 4. View:
- Configuration differences
- Metric comparisons
- Performance charts
Creating Comparison Charts
1. Select metrics to compare 2. Choose chart type 3. Configure axes 4. Generate visualization
---
Applications
Managing Applications
Access: Administration → Applications
Operations
| Operation | Description |
|---|---|
| Create | Add new application |
| View | See application details |
| Edit | Modify settings |
| Delete | Remove application |
| Create Disclaimer | Add usage disclaimer |
Chat Application
Create chat interfaces using deployed models:
1. Create application 2. Configure model deployment 3. Set disclaimer (optional) 4. Share application URL
---
Meta API and Custom Runtime Capabilities
The Meta API identifies which capabilities apply to a given AI runtime, allowing SAP AI Launchpad to display only relevant features.
Purpose
| Function | Description |
|---|---|
| Capability Management | Enable/disable capabilities based on AI use case |
| UI Streamlining | Hide unnecessary features to reduce confusion |
| API Decoupling | Reduce impact of backend API changes |
Supported Capabilities
| Capability | Description |
|---|---|
userDeployments | Allows users to create custom deployments |
userExecutions | Enables execution functionality |
staticDeployments | System-managed deployments |
timeToLiveDeployments | TTL-based deployment limits |
bulkUpdates | Bulk operations support |
executionSchedules | Scheduling functionality |
analytics | Analytics dashboard |
Metadata Refresh
- Automatic: Refreshed periodically on schedule
- On-demand: Users can trigger manual refresh
- Administration: SAP Runtime team manages active capabilities
Custom Runtime Usage
Custom runtimes can selectively implement only necessary capabilities, creating a tailored experience:
AI Runtime → Meta API Query → Capability List → Filtered UI---
Accessibility Features
SAP AI Launchpad provides:
- Keyboard navigation
- Screen reader support
- High contrast themes
- Accessible UI components
---
Language Settings
Change interface language: 1. Navigate to user settings 2. Select language preference 3. Save changes
Supported languages vary by region and deployment.
---
Documentation Links
- What is AI Launchpad: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/what-is-sap-ai-launchpad-760889a.md
- Initial Setup: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/initial-setup-5d8adb6.md
- Service Plans: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/service-plans-ec1717d.md
- ML Operations: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/ml-operations-df78271.md
- Generative AI Hub: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/generative-ai-hub-b0b935b.md
- Prompt Experimentation: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/prompt-experimentation-384cc0c.md
- Orchestration: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/build-your-orchestration-workflow-b7dc8b4.md
- Deployments: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/deployments-0543c2c.md
SAP AI Core API Reference
Complete API reference for SAP AI Core.
Documentation Source: https://github.com/SAP-docs/sap-artificial-intelligence/tree/main/docs/sap-ai-core
---
Authentication
OAuth Token Endpoint
curl -X POST "https://<id-zone>.authentication.<region>.hana.ondemand.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET"Required Headers
| Header | Description |
|---|---|
Authorization | Bearer <token> |
AI-Resource-Group | Resource group name (e.g., default) |
Content-Type | application/json |
---
Base URLs
| Environment | URL Pattern |
|---|---|
| AI API | https://api.ai.prod.<region>.hana.ondemand.com |
| Inference | https://api.ai.prod.<region>.hana.ondemand.com/v2/inference/deployments/<deployment-id> |
| OAuth | https://<id-zone>.authentication.<region>.hana.ondemand.com/oauth/token |
Regions: eu10, eu11, us10, us21, jp10, ap10, ap11
---
API Versioning
All endpoints use the /v2/* versioned routes:
/v2/lm/*- Language model operations/v2/inference/*- Inference deployments/v2/admin/*- Administrative operations (secrets, repositories)
---
Scenarios
List Scenarios
GET $AI_API_URL/v2/lm/scenariosResponse:
{
"count": 2,
"resources": [
{
"id": "foundation-models",
"name": "Foundation Models",
"description": "Access to generative AI models"
},
{
"id": "orchestration",
"name": "Orchestration",
"description": "Unified model access with pipeline features"
}
]
}---
Models
List Available Models
GET $AI_API_URL/v2/lm/scenarios/foundation-models/modelsResponse:
{
"count": 50,
"resources": [
{
"model": "gpt-4o",
"accessType": "Remote",
"displayName": "GPT-4o",
"provider": "azure-openai",
"executableId": "azure-openai",
"versions": [
{
"name": "2024-05-13",
"isLatest": true,
"capabilities": ["text-generation", "chat"],
"contextLength": 128000,
"inputCost": 5.0,
"outputCost": 15.0,
"isStreamingSupported": true
}
]
}
]
}---
Configurations
Create Configuration
POST $AI_API_URL/v2/lm/configurationsRequest Body:
{
"name": "my-config",
"executableId": "azure-openai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "latest"}
],
"inputArtifactBindings": []
}Response:
{
"id": "abc123-def456-ghi789",
"message": "Configuration created"
}List Configurations
GET $AI_API_URL/v2/lm/configurationsQuery Parameters:
| Parameter | Description |
|---|---|
scenarioId | Filter by scenario |
executableId | Filter by executable |
$top | Limit results |
$skip | Skip results |
Get Configuration
GET $AI_API_URL/v2/lm/configurations/{configurationId}Delete Configuration
DELETE $AI_API_URL/v2/lm/configurations/{configurationId}---
Deployments
Create Deployment
POST $AI_API_URL/v2/lm/deploymentsRequest Body:
{
"configurationId": "<configuration-id>",
"ttl": "24h"
}TTL Format: Natural numbers with units: m (minutes), h (hours), d (days)
- Valid:
5m,2h,7d - Invalid:
4.5h,4h30m(fractional and combined units not supported) - Tip: Convert combined durations to a single unit (e.g.,
270minstead of4h30m)
Response:
{
"id": "d12345-abcd-efgh",
"deploymentUrl": "https://...",
"status": "PENDING",
"message": "Deployment created"
}Get Deployment
GET $AI_API_URL/v2/lm/deployments/{deploymentId}Response:
{
"id": "d12345-abcd-efgh",
"configurationId": "c12345-abcd",
"configurationName": "my-config",
"scenarioId": "foundation-models",
"status": "RUNNING",
"statusMessage": "",
"deploymentUrl": "https://...",
"createdAt": "2024-01-15T10:00:00Z",
"modifiedAt": "2024-01-15T10:05:00Z"
}Deployment Statuses
| Status | Description |
|---|---|
UNKNOWN | Initial state |
PENDING | Starting up |
RUNNING | Active, serving requests |
STOPPING | Shutting down |
STOPPED | Inactive |
DEAD | Failed |
List Deployments
GET $AI_API_URL/v2/lm/deploymentsUpdate Deployment
PATCH $AI_API_URL/v2/lm/deployments/{deploymentId}Request Body:
{
"configurationId": "<new-configuration-id>"
}Stop Deployment
PATCH $AI_API_URL/v2/lm/deployments/{deploymentId}Request Body:
{
"targetStatus": "STOPPED"
}Delete Deployment
DELETE $AI_API_URL/v2/lm/deployments/{deploymentId}---
Executions
Create Execution
POST $AI_API_URL/v2/lm/executionsRequest Body:
{
"configurationId": "<configuration-id>"
}Get Execution
GET $AI_API_URL/v2/lm/executions/{executionId}Execution Statuses
| Status | Description |
|---|---|
UNKNOWN | Initial state |
PENDING | Queued |
RUNNING | Executing |
COMPLETED | Finished successfully |
DEAD | Failed |
STOPPED | Manually stopped |
List Executions
GET $AI_API_URL/v2/lm/executionsStop Execution
PATCH $AI_API_URL/v2/lm/executions/{executionId}Request Body:
{
"targetStatus": "STOPPED"
}Delete Execution
DELETE $AI_API_URL/v2/lm/executions/{executionId}Get Execution Logs
GET $AI_API_URL/v2/lm/executions/{executionId}/logs---
Artifacts
Register Artifact
POST $AI_API_URL/v2/lm/artifactsRequest Body:
{
"name": "training-data",
"kind": "dataset",
"url": "ai://<object-store>/<path>",
"scenarioId": "<scenario-id>",
"description": "Training dataset"
}Artifact Kinds:
dataset: Training datamodel: Trained modelresultset: Inference resultsother: Other artifacts
Get Artifact
GET $AI_API_URL/v2/lm/artifacts/{artifactId}List Artifacts
GET $AI_API_URL/v2/lm/artifacts---
Resource Groups
Create Resource Group
POST $AI_API_URL/v2/admin/resourceGroupsRequest Body:
{
"resourceGroupId": "my-resource-group"
}List Resource Groups
GET $AI_API_URL/v2/admin/resourceGroupsDelete Resource Group
DELETE $AI_API_URL/v2/admin/resourceGroups/{resourceGroupId}---
Secrets
Create Generic Secret
POST $AI_API_URL/v2/admin/secretsRequest Body:
{
"name": "my-secret",
"data": {
"key1": "value1",
"key2": "value2"
}
}Create Object Store Secret
POST $AI_API_URL/v2/admin/objectStoreSecretsAWS S3:
{
"name": "default",
"type": "S3",
"pathPrefix": "my-bucket/path",
"data": {
"AWS_ACCESS_KEY_ID": "<key>",
"AWS_SECRET_ACCESS_KEY": "<secret>"
}
}List Secrets
GET $AI_API_URL/v2/admin/secretsDelete Secret
DELETE $AI_API_URL/v2/admin/secrets/{secretName}---
Meta API
Get Runtime Capabilities
GET $AI_API_URL/lm/metaResponse:
{
"capabilities": {
"logs.executions": true,
"logs.deployments": true,
"multitenant": true,
"shareable": false,
"staticDeployments": true,
"userDeployments": true,
"userExecutions": true,
"timeToLiveDeployments": true,
"analytics": true,
"bulkUpdates": true,
"executionSchedules": true
},
"limits": {
"deployments.maxRunningCount": 10,
"executions.maxRunningCount": 10,
"minimumFrequencyHour": 1,
"timeToLiveDeployments.minimum": "5m",
"timeToLiveDeployments.maximum": "90d"
},
"extensions": {
"analytics": "1.0",
"metrics": "1.0",
"resourceGroups": "1.0",
"dataset": "1.0"
}
}---
Orchestration API
Chat Completion
POST $ORCHESTRATION_URL/v2/completionRequest Body:
{
"config": {
"module_configurations": {
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest",
"model_params": {
"max_tokens": 1000,
"temperature": 0.7
}
},
"templating_module_config": {
"template": [
{"role": "system", "content": "{{?system}}"},
{"role": "user", "content": "{{?user}}"}
]
}
}
},
"input_params": {
"system": "You are a helpful assistant.",
"user": "Hello!"
}
}Streaming Completion
POST $ORCHESTRATION_URL/v2/completionRequest Body:
{
"config": {
"module_configurations": {
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest",
"model_params": {
"stream": true
}
},
"templating_module_config": {
"template": [{"role": "user", "content": "{{?prompt}}"}]
}
}
},
"input_params": {"prompt": "Tell me a story"}
}Embeddings
POST $ORCHESTRATION_URL/v2/embeddingsRequest Body:
{
"config": {
"module_configurations": {
"embedding_module_config": {
"model_name": "text-embedding-3-large",
"model_version": "latest",
"model_params": {
"encoding_format": "float",
"dimensions": 1024
}
}
}
},
"input": ["Text to embed"]
}---
Grounding API
Create Pipeline
POST $AI_API_URL/v2/lm/groundingPipelinesRequest Body (SharePoint):
{
"name": "hr-docs-pipeline",
"configuration": {
"dataSource": {
"type": "sharepoint",
"configuration": {
"siteUrl": "https://company.sharepoint.com/sites/HR",
"folderPath": "/Documents/Policies"
}
},
"secretName": "sharepoint-secret"
}
}List Pipelines
GET $AI_API_URL/v2/lm/groundingPipelinesDelete Pipeline
DELETE $AI_API_URL/v2/lm/groundingPipelines/{pipelineId}---
Error Responses
Standard Error Format
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"requestId": "req-12345",
"target": "deployments"
}
}Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Invalid or expired token |
FORBIDDEN | 403 | Missing permissions or quota exceeded |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Resource already exists |
QUOTA_EXCEEDED | 429 | Rate limit or quota exceeded |
INTERNAL_ERROR | 500 | Server error |
---
Bulk Operations
Bulk Update Deployments
PATCH $AI_API_URL/v2/lm/deploymentsRequest Body:
{
"deployments": [
{"id": "dep1", "targetStatus": "STOPPED"},
{"id": "dep2", "targetStatus": "STOPPED"}
]
}Limit: 100 items per request
Bulk Delete Deployments
DELETE $AI_API_URL/v2/lm/deploymentsRequest Body:
{
"deploymentIds": ["dep1", "dep2", "dep3"]
}---
Schedules
Create Schedule
POST $AI_API_URL/v2/lm/executionSchedulesRequest Body:
{
"configurationId": "<config-id>",
"cron": "0 0 * * *",
"start": "2024-01-01T00:00:00Z",
"end": "2024-12-31T23:59:59Z"
}Cron Format: minute hour day month weekday
List Schedules
GET $AI_API_URL/v2/lm/executionSchedulesDelete Schedule
DELETE $AI_API_URL/v2/lm/executionSchedules/{scheduleId}---
Documentation Links
- AI API Overview: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/ai-api-overview-716d4c3.md
- Configurations: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-configurations-884ae34.md
- Deployments: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/deploy-models-dd16e8e.md
Generative AI Hub Reference
Complete reference for SAP AI Core Generative AI Hub.
Documentation Source: SAP Help Portal - SAP AI Core
---
Overview
The Generative AI Hub integrates large language models (LLMs) into SAP AI Core and SAP AI Launchpad, providing unified access to models from multiple providers.
Model availability note: SAP AI Core model IDs, versions, regions, and deprecation dates change by tenant, service plan, entitlement, and SAP Note 3437766 updates. Treat model names in this reference as examples. Before creating deployments, verify the exact target catalog in SAP AI Launchpad Model Library or with GET /v2/lm/scenarios/foundation-models/models.
Key Features
- Access to LLMs from multiple providers via unified API
- Harmonized API for model switching without code changes
- Prompt experimentation in AI Launchpad UI
- Prompt Registry for prompt template lifecycle management (available since Q1 2026)
- Orchestration workflows with filtering, masking, grounding, translation
- Token-based metering and billing
Prerequisites
- SAP AI Core with Extended service plan
- Valid service key credentials
- Resource group created
---
Global Scenarios
Two scenarios provide generative AI access:
| Scenario ID | Description | Use Case |
|---|---|---|
foundation-models | Direct model access | Single model deployment |
orchestration | Unified multi-model access | Pipeline workflows |
---
Model Providers
1. Azure OpenAI (azure-openai)
Access to OpenAI models via Azure's private instance.
Example model families to verify in tenant catalog:
- GPT-family chat and multimodal models
- Reasoning model families
- Realtime conversational models, where enabled
- Text embedding models
Deprecated/retiring patterns: older GPT-4, GPT-4 Turbo, GPT-4-32k, and GPT-3.5-era deployments should be checked against SAP Note 3437766 and migrated before retirement dates shown in the tenant catalog.
Capabilities: Chat, embeddings, vision, reasoning, realtime
2. SAP-Hosted Open Source (aicore-opensource)
SAP-hosted open source models via OpenAI-compatible API.
Example model families to verify in tenant catalog:
- Llama-family chat and vision models
- Mistral/Mixtral-family instruction models
- Falcon-family models
Capabilities: Chat, embeddings, vision (select models)
3. Google Vertex AI (gcp-vertexai)
Access to Google's AI models.
Example model families to verify in tenant catalog:
- Gemini-family chat, vision, code, and long-context models
- Gemini Flash-family lower-latency models
- Google embedding models
Deprecated/retiring patterns: older Gemini and PaLM-era deployments should be checked against SAP Note 3437766 and migrated before retirement dates shown in the tenant catalog.
Capabilities: Chat, embeddings, vision, code, image generation
4. AWS Bedrock (aws-bedrock)
Access to models via AWS Bedrock.
Example model families to verify in tenant catalog:
- Anthropic Claude-family chat models
- Amazon Nova-family models
- Amazon Titan text and embedding models
Capabilities: Chat, embeddings
5. Mistral AI (aicore-mistralai)
SAP-hosted Mistral models.
Models:
- Mistral Large
- Mistral Medium
- Mistral Small
- Mistral 7B Instruct
- Codestral
Capabilities: Chat, code
6. IBM (aicore-ibm)
SAP-hosted IBM models.
Example model families to verify in tenant catalog:
- Granite chat/instruct models
- Granite code models
Capabilities: Chat, code
7. Perplexity (aicore-perplexity)
Perplexity AI models accessed through SAP AI Core where enabled for the tenant.
Example model families to verify in tenant catalog:
- Sonar-family web-grounded chat models
- Deep-research models with citations, where enabled
Capabilities: Chat with citations, web-grounded responses
Note: Sonar and Sonar Pro models support an output-with-citations feature in orchestration, returning source URLs alongside responses.
---
API: List Available Models
curl -X GET "$AI_API_URL/v2/lm/scenarios/foundation-models/models" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json"Response Structure
{
"count": 50,
"resources": [
{
"model": "gpt-4o",
"accessType": "Remote",
"displayName": "GPT-4o",
"provider": "azure-openai",
"allowedScenarios": ["foundation-models"],
"executableId": "azure-openai",
"description": "OpenAI's most advanced model",
"versions": [
{
"name": "2024-05-13",
"isLatest": true,
"capabilities": ["text-generation", "chat", "vision"],
"contextLength": 128000,
"inputCost": 5.0,
"outputCost": 15.0,
"deprecationDate": null,
"retirementDate": null,
"isStreamingSupported": true
}
]
}
]
}Model Metadata Fields
| Field | Description |
|---|---|
model | Model identifier for API calls |
accessType | "Remote" (external) or "Local" (SAP-hosted) |
provider | Provider identifier |
executableId | Executable ID for deployments |
contextLength | Maximum context window tokens |
inputCost | Cost per 1K input tokens |
outputCost | Cost per 1K output tokens |
deprecationDate | Date version becomes deprecated |
retirementDate | Date version is removed |
isStreamingSupported | Streaming capability |
---
Deploying a Model
Step 1: Create Configuration
curl -X POST "$AI_API_URL/v2/lm/configurations" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "gpt4o-deployment-config",
"executableId": "azure-openai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "latest"}
]
}'Step 2: Create Deployment
curl -X POST "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<config-id-from-step-1>"
}'Step 3: Check Status
curl -X GET "$AI_API_URL/v2/lm/deployments/<deployment-id>" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Wait for status RUNNING and note the deploymentUrl.
---
Using the Harmonized API
The harmonized API provides unified access without model-specific code.
Chat Completion
curl -X POST "$DEPLOYMENT_URL/chat/completions" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is SAP AI Core?"}
],
"max_tokens": 1000,
"temperature": 0.7
}'With Streaming
curl -X POST "$DEPLOYMENT_URL/chat/completions" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Tell me a story"}],
"stream": true
}'Embeddings
curl -X POST "$DEPLOYMENT_URL/embeddings" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-large",
"input": ["Document chunk to embed"],
"encoding_format": "float"
}'---
Orchestration Deployment
For unified access to multiple models:
Create Orchestration Deployment
# Get orchestration configuration ID
curl -X GET "$AI_API_URL/v2/lm/configurations?scenarioId=orchestration" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"
# Create deployment
curl -X POST "$AI_API_URL/v2/lm/deployments" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<orchestration-config-id>"
}'Use Orchestration API
curl -X POST "$ORCHESTRATION_URL/v2/completion" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"config": {
"module_configurations": {
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest"
},
"templating_module_config": {
"template": [
{"role": "user", "content": "{{?prompt}}"}
]
}
}
},
"input_params": {
"prompt": "What is machine learning?"
}
}'---
Model Version Management
Auto-Upgrade Strategy
Set modelVersion to "latest" for automatic upgrades:
{
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "latest"}
]
}Pinned Version Strategy
Specify exact version for stability:
{
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "2024-05-13"}
]
}Manual Version Upgrade
Patch deployment with new configuration:
curl -X PATCH "$AI_API_URL/v2/lm/deployments/<deployment-id>" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<new-config-id>"
}'---
SAP AI Launchpad UI
Prompt Experimentation
Access: Workspaces → Generative AI Hub → Prompt Editor
Features:
- Interactive prompt testing
- Model selection and parameter tuning
- Variable placeholders
- Image inputs (select models)
- Streaming responses
- Save prompts (manager roles)
Required Roles
| Role | Capabilities |
|---|---|
genai_manager | Full access, save prompts |
genai_experimenter | Test only, no save |
prompt_manager | Manage saved prompts |
prompt_experimenter | Use saved prompts |
prompt_media_executor | Upload images |
Prompt Types
- Question Answering: Q&A interactions
- Summarization: Extract key points
- Inferencing: Sentiment, entity extraction
- Transformations: Translation, format conversion
- Expansions: Content generation
---
Model Library
View model specifications and benchmarks in AI Launchpad:
Access: Generative AI Hub → Model Library
Information available:
- Model capabilities
- Context window sizes
- Performance benchmarks (win rates, arena scores)
- Cost per token
- Deprecation schedules
---
Rate Limits and Quotas
Refer to SAP Note 3437766 for:
- Token conversion rates per model
- Rate limits (requests/minute, tokens/minute)
- Regional availability
- Deprecation dates
Quota Increase Request
Submit support ticket:
- Component:
CA-ML-AIC - Include: tenant ID, current limits, requested limits, justification
---
Best Practices
Model Selection
| Use Case | Selection Guidance |
|---|---|
| General chat | Use the tenant-approved flagship chat model with enterprise data handling enabled. |
| Cost-sensitive | Prefer smaller or mini/nano variants shown in the tenant catalog. |
| Long context | Choose catalog entries with the required context window and verify token cost. |
| Embeddings | Use the approved embedding model for the target vector store and language coverage. |
| Code | Prefer code-capable catalog entries and validate output with project tests. |
| Vision | Choose multimodal catalog entries and verify image-input support. |
| Reasoning | Use reasoning-capable catalog entries only when latency/cost tradeoffs are acceptable. |
| Citations / web-grounded | Use citation-capable models where enabled and preserve returned source URLs. |
| Deep research | Use deep-research models where enabled and validate citation quality. |
| Realtime | Use realtime catalog entries only after confirming endpoint and quota support. |
Cost Optimization
1. Use smaller models for simple tasks 2. Implement caching for repeated queries 3. Set appropriate max_tokens limits 4. Use streaming for better UX without extra cost 5. Monitor token usage via AI Launchpad analytics
Reliability
1. Implement fallback configurations 2. Pin model versions in production 3. Monitor deprecation dates 4. Test before upgrading versions
---
Documentation Links
- Generative AI Hub: https://help.sap.com/docs/sap-ai-core/generative-ai/generative-ai-hub
- Supported Models: https://help.sap.com/docs/sap-ai-core/generative-ai/supported-models
- SAP Note 3437766: Token rates, limits, deprecation
- SAP Discovery Center: https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core
Grounding and RAG Reference
Complete reference for SAP AI Core grounding capabilities (Retrieval-Augmented Generation).
Documentation Source: https://github.com/SAP-docs/sap-artificial-intelligence/tree/main/docs/sap-ai-core
---
Overview
Grounding integrates external, contextually relevant data into AI processes, enhancing LLM capabilities beyond general training material using vector databases.
Key Benefits
- Provide domain-specific context
- Access real-time data
- Reduce hallucinations
- Enable enterprise knowledge retrieval
---
Architecture
Indexing Pipeline
Documents → Preprocessing → Chunking → Embedding → Vector Database1. Upload documents to supported repository 2. Pipeline preprocesses and chunks documents 3. Embedding model generates vectors 4. Vectors stored in managed vector database
Retrieval Pipeline
User Query → Embedding → Vector Search → Retrieved Chunks → LLM Context1. User query converted to embedding 2. Vector similarity search in database 3. Relevant chunks retrieved 4. Chunks injected into LLM prompt
---
Supported Data Sources
| Source | Type | Configuration |
|---|---|---|
| Microsoft SharePoint | Cloud | Site URL, folder path |
| AWS S3 | Object storage | Bucket, prefix |
| SFTP | File server | Host, path |
| SAP Build Work Zone | SAP | Site, content |
| SAP Document Management | SAP | Repository, folder |
---
Document Specifications
Supported Formats
| Format | Content Types |
|---|---|
| Text, tables, images | |
| HTML | Text, structure |
| TXT | Plain text |
| DOCX | Text, tables |
| PPT/PPTX | Text, tables, images |
| JPEG/JPG | Images with OCR |
| PNG | Images with OCR |
| TIFF | Images with OCR |
Limits
- Maximum documents per pipeline: 2,000
- Refresh rate: Daily automatic refresh
- File size: Varies by format
---
Data Management APIs
Three primary APIs for document processing and retrieval:
Pipelines API
Creates data management pipelines that fetch documents from supported data sources.
| Feature | Description |
|---|---|
| Purpose | Automated document fetching, preprocessing, chunking, embedding |
| Best for | Documents in external repositories |
| Output | Vectors stored in HANA Vector Store |
| Note | No need to call Vector API after using Pipelines API |
Vector API
REST APIs for direct document ingestion and retrieval using vector embeddings.
| Feature | Description |
|---|---|
| Purpose | Manual document upload and embedding |
| Best for | Directly uploaded/managed documents |
| Process | Preprocesses chunks and stores semantic embeddings |
Retrieval API
Performs similarity searches on the vector database.
| Feature | Description |
|---|---|
| Purpose | Information retrieval using semantic search |
| Works with | Repositories (Pipelines API) or collections (Vector API) |
| Output | Ranked relevant document chunks |
API Comparison
| Use Case | Recommended API |
|---|---|
| Documents in SharePoint/S3/SFTP | Pipelines API |
| Direct file uploads | Vector API |
| Custom chunking needed | Vector API |
| Full automation | Pipelines API |
---
Implementation Options
Option 1: Pipeline API
Automated document processing pipeline.
Create SharePoint Pipeline
curl -X POST "$AI_API_URL/v2/lm/groundingPipelines" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "hr-policies-pipeline",
"configuration": {
"dataSource": {
"type": "sharepoint",
"configuration": {
"siteUrl": "https://company.sharepoint.com/sites/HR",
"folderPath": "/Documents/Policies"
}
},
"secretName": "sharepoint-credentials"
}
}'Create S3 Pipeline
curl -X POST "$AI_API_URL/v2/lm/groundingPipelines" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "knowledge-base-pipeline",
"configuration": {
"dataSource": {
"type": "s3",
"configuration": {
"bucket": "my-knowledge-base",
"prefix": "documents/"
}
},
"secretName": "s3-credentials"
}
}'Create SFTP Pipeline
curl -X POST "$AI_API_URL/v2/lm/groundingPipelines" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "docs-sftp-pipeline",
"configuration": {
"dataSource": {
"type": "sftp",
"configuration": {
"host": "sftp.company.com",
"port": 22,
"path": "/documents"
}
},
"secretName": "sftp-credentials"
}
}'Option 2: Vector API
Direct vector upload for custom chunking/embedding.
Create Collection
curl -X POST "$AI_API_URL/v2/lm/groundingCollections" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "custom-knowledge-base",
"embeddingConfig": {
"model": "text-embedding-3-small",
"dimensions": 1536
}
}'Note: Use text-embedding-3-small for 1536 dimensions or text-embedding-3-large with 3072 dimensions. Ensure model and dimensions align with OpenAI/SAP AI Core specifications.
Add Documents
curl -X POST "$AI_API_URL/v2/lm/groundingCollections/{collectionId}/documents" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"documents": [
{
"id": "doc-001",
"content": "Document chunk text...",
"metadata": {
"source": "policy-manual.pdf",
"page": 5,
"department": "HR"
}
},
{
"id": "doc-002",
"content": "Another chunk...",
"metadata": {
"source": "policy-manual.pdf",
"page": 6,
"department": "HR"
}
}
]
}'Add Pre-computed Vectors
curl -X POST "$AI_API_URL/v2/lm/groundingCollections/{collectionId}/documents" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"documents": [
{
"id": "doc-001",
"content": "Document chunk text...",
"vector": [0.123, -0.456, 0.789, ...],
"metadata": {"source": "manual.pdf"}
}
]
}'---
Creating Secrets
SharePoint Secret
curl -X POST "$AI_API_URL/v2/admin/secrets" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "sharepoint-credentials",
"data": {
"clientId": "<azure-app-client-id>",
"clientSecret": "<azure-app-client-secret>",
"tenantId": "<azure-tenant-id>"
}
}'S3 Secret
curl -X POST "$AI_API_URL/v2/admin/secrets" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "s3-credentials",
"data": {
"AWS_ACCESS_KEY_ID": "<access-key>",
"AWS_SECRET_ACCESS_KEY": "<secret-key>",
"AWS_REGION": "us-east-1"
}
}'SFTP Secret
curl -X POST "$AI_API_URL/v2/admin/secrets" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "sftp-credentials",
"data": {
"username": "<username>",
"password": "<password>"
}
}'---
Using Grounding in Orchestration
Basic Grounding Configuration
{
"config": {
"module_configurations": {
"grounding_module_config": {
"grounding_service": "document_grounding_service",
"grounding_service_configuration": {
"grounding_input_parameters": ["user_query"],
"grounding_output_parameter": "context",
"filters": [
{
"id": "<pipeline-id>",
"search_configuration": {
"max_chunk_count": 5
}
}
]
}
},
"templating_module_config": {
"template": [
{
"role": "system",
"content": "Answer based on the following context:\n\n{{$context}}\n\nIf the answer is not in the context, say you don't know."
},
{
"role": "user",
"content": "{{?user_query}}"
}
]
},
"llm_module_config": {
"model_name": "gpt-4o",
"model_version": "latest"
}
}
},
"input_params": {
"user_query": "What is the vacation policy?"
}
}Grounding with Metadata Filters
{
"grounding_module_config": {
"grounding_service": "document_grounding_service",
"grounding_service_configuration": {
"grounding_input_parameters": ["user_query"],
"grounding_output_parameter": "context",
"filters": [
{
"id": "<pipeline-id>",
"data_repositories": ["<specific-repo-id>"],
"document_metadata": [
{
"key": "department",
"value": "HR"
},
{
"key": "document_type",
"value": "policy"
}
],
"search_configuration": {
"max_chunk_count": 10,
"max_document_count": 5,
"similarity_threshold": 0.7
}
}
]
}
}
}Multiple Pipeline Sources
{
"grounding_module_config": {
"grounding_service": "document_grounding_service",
"grounding_service_configuration": {
"grounding_input_parameters": ["user_query"],
"grounding_output_parameter": "context",
"filters": [
{
"id": "<hr-pipeline-id>",
"search_configuration": {"max_chunk_count": 3}
},
{
"id": "<it-pipeline-id>",
"search_configuration": {"max_chunk_count": 3}
},
{
"id": "<finance-pipeline-id>",
"search_configuration": {"max_chunk_count": 3}
}
]
}
}
}---
Search Configuration Options
| Parameter | Type | Description | Default |
|---|---|---|---|
max_chunk_count | int | Maximum chunks to retrieve | 5 |
max_document_count | int | Maximum source documents | No limit |
similarity_threshold | float | Minimum similarity score (0-1) | 0.0 |
---
Managing Pipelines
List Pipelines
curl -X GET "$AI_API_URL/v2/lm/groundingPipelines" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Get Pipeline Status
curl -X GET "$AI_API_URL/v2/lm/groundingPipelines/{pipelineId}" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Pipeline Statuses:
PENDING: InitializingINDEXING: Processing documentsREADY: Available for queriesFAILED: Error occurred
Delete Pipeline
curl -X DELETE "$AI_API_URL/v2/lm/groundingPipelines/{pipelineId}" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"---
Best Practices
Document Preparation
1. Clean content: Remove irrelevant headers, footers, boilerplate 2. Consistent formatting: Use clear headings and structure 3. Metadata tagging: Add useful metadata for filtering 4. Regular updates: Keep documents current
Chunking Strategy
1. Semantic chunks: Break at logical boundaries (sections, paragraphs) 2. Appropriate size: 200-500 tokens per chunk typically works well 3. Overlap: Consider 10-20% overlap between chunks 4. Context preservation: Include section headers in chunks
Query Optimization
1. Clear questions: Rephrase vague queries 2. Keyword inclusion: Include relevant technical terms 3. Context addition: Add domain context to queries
Retrieval Tuning
| Use Case | max_chunk_count | similarity_threshold |
|---|---|---|
| Precise answers | 3-5 | 0.8 |
| Comprehensive | 10-15 | 0.6 |
| Exploratory | 20+ | 0.5 |
---
Troubleshooting
No Results Returned
1. Check pipeline status is READY 2. Verify documents were indexed successfully 3. Lower similarity threshold 4. Increase max_chunk_count 5. Check metadata filters match documents
Irrelevant Results
1. Increase similarity threshold 2. Add metadata filters 3. Review document chunking 4. Check embedding model matches query style
Performance Issues
1. Reduce max_chunk_count 2. Add specific metadata filters 3. Use multiple smaller pipelines 4. Consider pagination for large result sets
---
Documentation Links
- Grounding Overview: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/grounding-035c455.md
- Pipeline API: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-a-document-grounding-pipeline-using-the-pipelines-api-0a13e1c.md
- SharePoint Pipeline: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-a-pipeline-with-microsoft-sharepoint-4b8d58c.md
- S3 Pipeline: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-a-pipeline-with-aws-s3-7f97adf.md
ML Operations Reference
Complete reference for SAP AI Core ML training and operations.
Documentation Source: https://github.com/SAP-docs/sap-artificial-intelligence/tree/main/docs/sap-ai-core
---
Overview
SAP AI Core uses Argo Workflows for training pipelines, supporting batch jobs for model preprocessing, training, and inference.
Key Components
| Component | Description |
|---|---|
| Scenarios | AI use case implementations |
| Executables | Reusable workflow templates |
| Configurations | Parameters and artifact bindings |
| Executions | Running instances of workflows |
| Artifacts | Datasets, models, and results |
---
Workflow Engine
Argo Workflows
SAP AI Core uses Argo Workflows (container-native workflow engine) supporting:
- Direct Acyclic Graph (DAG) structures
- Parallel step execution
- Container-based steps
- Data ingestion and preprocessing
- Model training and batch inference
Limitation: Not optimized for time-critical tasks due to scheduling overhead.
---
Prerequisites
1. Object Store Secret (Required)
Create a secret named default for training output artifacts:
curl -X POST "$AI_API_URL/v2/admin/objectStoreSecrets" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "default",
"type": "S3",
"pathPrefix": "my-bucket/training-output",
"data": {
"AWS_ACCESS_KEY_ID": "<access-key>",
"AWS_SECRET_ACCESS_KEY": "<secret-key>"
}
}'Note: Without a default secret, training pipelines will fail.
2. Docker Registry Secret
For custom training images:
curl -X POST "$AI_API_URL/v2/admin/dockerRegistrySecrets" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "docker-registry",
"data": {
".dockerconfigjson": "<base64-encoded-docker-config>"
}
}'3. Git Repository
Sync workflow templates from Git:
curl -X POST "$AI_API_URL/v2/admin/repositories" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "training-repo",
"url": "https://github.com/org/training-workflows",
"username": "<git-user>",
"password": "<git-token>"
}'---
Workflow Template
Basic Structure
apiVersion: ai.sap.com/v1alpha1
kind: WorkflowTemplate
metadata:
name: text-classifier-training
annotations:
scenarios.ai.sap.com/description: "Train text classification model"
scenarios.ai.sap.com/name: "text-classifier"
executables.ai.sap.com/description: "Training executable"
executables.ai.sap.com/name: "text-classifier-train"
artifacts.ai.sap.com/training-data.kind: "dataset"
artifacts.ai.sap.com/trained-model.kind: "model"
labels:
scenarios.ai.sap.com/id: "text-classifier"
executables.ai.sap.com/id: "text-classifier-train"
ai.sap.com/version: "1.0.0"
spec:
imagePullSecrets:
- name: docker-registry
entrypoint: main
arguments:
parameters:
- name: learning_rate
default: "0.001"
- name: epochs
default: "10"
artifacts:
- name: training-data
path: /data/input
archive:
none: {}
templates:
- name: main
steps:
- - name: preprocess
template: preprocess-data
- - name: train
template: train-model
- - name: evaluate
template: evaluate-model
- name: preprocess-data
container:
image: my-registry/preprocessing:latest
command: ["python", "preprocess.py"]
args: ["--input", "/data/input", "--output", "/data/processed"]
- name: train-model
container:
image: my-registry/training:latest
command: ["python", "train.py"]
args:
- "--data=/data/processed"
- "--lr={{workflow.parameters.learning_rate}}"
- "--epochs={{workflow.parameters.epochs}}"
- "--output=/data/model"
outputs:
artifacts:
- name: trained-model
path: /data/model
globalName: trained-model
archive:
none: {}
- name: evaluate-model
container:
image: my-registry/evaluation:latest
command: ["python", "evaluate.py"]
args: ["--model", "/data/model"]Annotations Reference
| Annotation | Description |
|---|---|
scenarios.ai.sap.com/name | Human-readable scenario name |
scenarios.ai.sap.com/id | Scenario identifier |
executables.ai.sap.com/name | Executable name |
executables.ai.sap.com/id | Executable identifier |
artifacts.ai.sap.com/<name>.kind | Artifact type (dataset, model, etc.) |
---
Artifacts
Types
| Kind | Description | Use Case |
|---|---|---|
dataset | Training/validation data | Input for training |
model | Trained model | Output from training |
resultset | Inference results | Output from batch inference |
other | Miscellaneous | Logs, metrics, configs |
Register Input Artifact
curl -X POST "$AI_API_URL/v2/lm/artifacts" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "training-dataset-v1",
"kind": "dataset",
"url": "ai://default/datasets/training-v1",
"scenarioId": "text-classifier",
"description": "Training dataset version 1"
}'URL Format
ai://default/<path>- Uses default object store secretai://<secret-name>/<path>- Uses named object store secret
List Artifacts
curl -X GET "$AI_API_URL/v2/lm/artifacts?scenarioId=text-classifier" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"---
Configurations
Create Training Configuration
curl -X POST "$AI_API_URL/v2/lm/configurations" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"name": "text-classifier-config-v1",
"executableId": "text-classifier-train",
"scenarioId": "text-classifier",
"parameterBindings": [
{"key": "learning_rate", "value": "0.001"},
{"key": "epochs", "value": "20"},
{"key": "batch_size", "value": "32"}
],
"inputArtifactBindings": [
{"key": "training-data", "artifactId": "<dataset-artifact-id>"}
]
}'---
Executions
Create Execution
curl -X POST "$AI_API_URL/v2/lm/executions" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<configuration-id>"
}'Execution Statuses
| Status | Description |
|---|---|
UNKNOWN | Initial state |
PENDING | Queued for execution |
RUNNING | Currently executing |
COMPLETED | Finished successfully |
DEAD | Failed |
STOPPED | Manually stopped |
Check Execution Status
curl -X GET "$AI_API_URL/v2/lm/executions/<execution-id>" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Get Execution Logs
curl -X GET "$AI_API_URL/v2/lm/executions/<execution-id>/logs" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Stop Execution
curl -X PATCH "$AI_API_URL/v2/lm/executions/<execution-id>" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{"targetStatus": "STOPPED"}'---
Metrics
Write Metrics from Training
In your training code:
import requests
import os
def log_metrics(metrics: dict, step: int):
"""Log metrics to SAP AI Core."""
api_url = os.environ.get("AICORE_API_URL")
token = os.environ.get("AICORE_AUTH_TOKEN")
execution_id = os.environ.get("AICORE_EXECUTION_ID")
response = requests.post(
f"{api_url}/v2/lm/executions/{execution_id}/metrics",
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
},
json={
"metrics": [
{"name": name, "value": value, "step": step}
for name, value in metrics.items()
]
}
)
# Usage in training loop
for epoch in range(epochs):
train_loss = train_epoch()
val_loss = validate()
log_metrics({
"train_loss": train_loss,
"val_loss": val_loss,
"accuracy": accuracy
}, step=epoch)Read Metrics
curl -X GET "$AI_API_URL/v2/lm/executions/<execution-id>/metrics" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"---
Training Schedules
Create Schedule
curl -X POST "$AI_API_URL/v2/lm/executionSchedules" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" \
-H "Content-Type: application/json" \
-d '{
"configurationId": "<configuration-id>",
"cron": "0 0 * * 0",
"start": "2024-01-01T00:00:00Z",
"end": "2024-12-31T23:59:59Z"
}'Cron Expression Format
SAP AI Core uses 5-field cron expressions with 3-letter day-of-week names:
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (mon, tue, wed, thu, fri, sat, sun)
│ │ │ │ │
* * * * *Examples:
0 0 * * *- Daily at midnight0 0 * * sun- Weekly on Sunday0 0 * * fri- Weekly on Friday0 0 1 * *- Monthly on 1st0 */6 * * *- Every 6 hours
Note: Using * * * * * treats the schedule as "Run Always" (continuous check), which differs from standard cron behavior. Minimum interval for pipeline schedules is 1 hour.
List Schedules
curl -X GET "$AI_API_URL/v2/lm/executionSchedules" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"Delete Schedule
curl -X DELETE "$AI_API_URL/v2/lm/executionSchedules/<schedule-id>" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default"---
SAP AI Launchpad
ML Operations App
Access: Workspaces → ML Operations
Features:
- View scenarios and executables
- Create/manage configurations
- Run/monitor executions
- View training metrics
- Manage artifacts
- Create schedules
Required Roles
| Role | Capabilities |
|---|---|
operations_manager | Access ML Operations app |
mloperations_viewer | View-only access |
mloperations_editor | Full edit access |
Comparing Runs
1. Navigate to ML Operations → Executions 2. Select multiple executions 3. Click "Compare" 4. View side-by-side metrics and parameters
---
Best Practices
Workflow Design
1. Modular steps: Break workflow into reusable templates 2. Parameterization: Use parameters for hyperparameters 3. Artifact management: Define clear input/output artifacts 4. Error handling: Include retry logic for flaky operations
Resource Management
1. Appropriate sizing: Match container resources to workload 2. GPU allocation: Request GPUs only when needed 3. Storage: Use object store for large datasets 4. Cleanup: Delete old executions and artifacts
Monitoring
1. Log metrics: Track loss, accuracy, etc. during training 2. Check logs: Review execution logs for errors 3. Compare runs: Analyze different hyperparameter settings 4. Set alerts: Monitor for failed executions
---
Troubleshooting
Execution Failed
1. Check execution logs: GET /v2/lm/executions/{id}/logs 2. Verify object store secret exists and is named default 3. Check Docker image is accessible 4. Verify artifact paths are correct 5. Check resource quota not exceeded
Artifacts Not Found
1. Verify artifact URL format: ai://default/<path> 2. Check object store secret permissions 3. Verify file exists in object store 4. Check artifact registered in correct scenario
Schedule Not Running
1. Verify schedule is active (not paused) 2. Check cron expression is valid 3. Verify start/end dates bracket current time 4. Check configuration still exists
---
Documentation Links
- Training Overview: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/train-your-model-a9ceb06.md
- ML Operations (Launchpad): https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-launchpad/ml-operations-df78271.md
- Schedules: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/create-a-training-schedule-bd409a9.md
- Metrics: https://github.com/SAP-docs/sap-artificial-intelligence/blob/main/docs/sap-ai-core/view-the-metric-resource-for-an-execution-d85dd44.md
Model Providers Reference
Complete reference for SAP AI Core model providers and available models.
Documentation Source: SAP Help Portal - SAP AI Core
Latest Models: SAP Note 3437766
---
Overview
SAP AI Core provides access to models from multiple providers via the Generative AI Hub. All models are accessed through a unified API, allowing easy switching between providers.
Catalog rule: This reference describes provider families and common configuration shapes. Exact model IDs, versions, context windows, pricing, regions, and deprecation dates must be verified in the target tenant through SAP AI Launchpad Model Library, GET /v2/lm/scenarios/foundation-models/models, and SAP Note 3437766 before implementation.
---
Provider Summary
| Provider | Executable ID | Access Type | Model Categories |
|---|---|---|---|
| Azure OpenAI | azure-openai | Remote | Chat, Embeddings, Vision, Reasoning, Realtime |
| SAP Open Source | aicore-opensource | Local | Chat, Embeddings, Vision |
| Google Vertex AI | gcp-vertexai | Remote | Chat, Embeddings, Vision, Code, Image Gen |
| AWS Bedrock | aws-bedrock | Remote | Chat, Embeddings |
| Mistral AI | aicore-mistralai | Local | Chat, Code |
| IBM | aicore-ibm | Local | Chat, Code |
| Perplexity | aicore-perplexity | Remote | Chat with Citations, Deep Research |
---
1. Azure OpenAI
Executable ID: azure-openai Access Type: Remote (Azure-hosted)
Example Model Families
| Family | Typical Capabilities | Selection Guidance |
|---|---|---|
| GPT chat/multimodal | Chat, vision, structured output | Verify exact model ID, context window, and region in tenant catalog. |
| Reasoning models | Complex reasoning chains | Use when quality justifies added latency/cost; verify quota. |
| Realtime models | Low-latency conversational API | Verify endpoint support and streaming/realtime quotas. |
| Embedding models | Vector embeddings | Match dimensions and language coverage to the target vector store. |
Deprecated/retiring patterns: older GPT-4, GPT-4 Turbo, GPT-4-32k, and GPT-3.5-era deployments should be checked against SAP Note 3437766 and migrated before retirement dates shown in the tenant catalog.
Configuration Example
{
"name": "azure-gpt4o-config",
"executableId": "azure-openai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "2024-05-13"}
]
}---
2. SAP-Hosted Open Source
Executable ID: aicore-opensource Access Type: Local (SAP-hosted)
Example Model Families
| Family | Typical Capabilities | Selection Guidance |
|---|---|---|
| Llama-family | Chat, reasoning, select vision variants | Verify enabled model IDs and context windows in tenant catalog. |
| Mistral/Mixtral-family | Instruction following, code, low-latency chat | Check tenant catalog before using exact IDs. |
| Falcon-family | General text generation | Use only where explicitly enabled. |
Configuration Example
{
"name": "llama-config",
"executableId": "aicore-opensource",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "meta--llama-3.1-70b-instruct"},
{"key": "modelVersion", "value": "latest"}
]
}---
3. Google Vertex AI
Executable ID: gcp-vertexai Access Type: Remote (Google Cloud)
Example Model Families
| Family | Typical Capabilities | Selection Guidance |
|---|---|---|
| Gemini Pro-family | Chat, vision, code, long context | Verify catalog entry, preview/stable status, and token limits. |
| Gemini Flash-family | Fast multimodal responses | Use for lower-latency use cases when enabled. |
| Google embedding models | Vector embeddings | Match dimensions and language coverage to the target vector store. |
Deprecated/retiring patterns: older Gemini and PaLM-era deployments should be checked against SAP Note 3437766 and migrated before retirement dates shown in the tenant catalog.
Configuration Example
{
"name": "gemini-config",
"executableId": "gcp-vertexai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "gemini-1.5-pro"},
{"key": "modelVersion", "value": "latest"}
]
}---
4. AWS Bedrock
Executable ID: aws-bedrock Access Type: Remote (AWS)
Example Model Families
| Family | Typical Capabilities | Selection Guidance |
|---|---|---|
| Anthropic Claude-family | Chat, reasoning, coding, summarization | Verify exact model ID and Bedrock regional availability in SAP AI Core catalog. |
| Amazon Nova-family | General chat and multimodal tasks | Use only where enabled in the tenant catalog. |
| Amazon Titan-family | Text and embeddings | Verify dimensions and cost before vector workloads. |
Configuration Example
{
"name": "claude-config",
"executableId": "aws-bedrock",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "anthropic--claude-3-5-sonnet"},
{"key": "modelVersion", "value": "latest"}
]
}---
5. Mistral AI
Executable ID: aicore-mistralai Access Type: Local (SAP-hosted)
Models
| Model | Parameters | Context | Use Case |
|---|---|---|---|
| mistral-large | - | 32K | Advanced reasoning |
| mistral-medium | - | 32K | Balanced |
| mistral-small | - | 32K | Cost-efficient |
| codestral | - | 32K | Code generation |
Configuration Example
{
"name": "mistral-config",
"executableId": "aicore-mistralai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "mistralai--mistral-large"},
{"key": "modelVersion", "value": "latest"}
]
}---
6. IBM
Executable ID: aicore-ibm Access Type: Local (SAP-hosted)
Granite Models
| Model | Parameters | Use Case |
|---|---|---|
| granite-family entries | Various | Verify exact model ID and generation in the tenant catalog |
| granite-13b-chat | 13B | Conversational |
| granite-13b-instruct | 13B | Task completion |
| granite-code | - | Code generation |
Configuration Example
{
"name": "granite-config",
"executableId": "aicore-ibm",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "ibm--granite-13b-chat"},
{"key": "modelVersion", "value": "latest"}
]
}---
7. Perplexity
Executable ID: aicore-perplexity Access Type: Remote (Perplexity-hosted) Availability: tenant-dependent; verify in SAP AI Core catalog.
Example Model Families
| Family | Use Case |
|---|---|
| Sonar-family | Web-grounded chat with citations |
| Deep-research family | Longer research flows with citations where enabled |
Unique Features:
- Returns citation URLs alongside responses
- Web-grounded responses for up-to-date information
- Supports output-with-citations in orchestration workflows
Configuration Example
{
"name": "perplexity-config",
"executableId": "aicore-perplexity",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "perplexity--sonar"},
{"key": "modelVersion", "value": "latest"}
]
}---
Model Selection Guide
By Use Case
| Use Case | Selection Guidance |
|---|---|
| General chat | Use the highest-quality tenant-approved chat model that meets cost and data-residency constraints. |
| Code generation | Use a code-capable catalog entry and validate output with project tests. |
| Long documents | Select catalog entries with sufficient context and explicit long-context support. |
| Vision/images | Choose multimodal catalog entries and verify image-input support. |
| Embeddings | Match embedding dimensions, language coverage, and vector-store requirements. |
| Cost-sensitive | Prefer smaller or mini/nano variants shown in the tenant catalog. |
| High throughput | Prefer lower-latency catalog entries and confirm quota. |
| Reasoning | Use reasoning-capable catalog entries when latency/cost tradeoffs are acceptable. |
| Web-grounded / citations | Use citation-capable entries and preserve returned source URLs. |
| Deep research | Use only where deep-research entries are enabled and validate citation quality. |
| Realtime | Verify realtime endpoint and quota support before implementation. |
By Budget
| Budget | Tier | Guidance |
|---|---|---|
| Low | Economy | Use smaller variants and strict token limits. |
| Medium | Standard | Use balanced chat models with predictable latency. |
| High | Premium | Use top-tier catalog entries after confirming quota and cost. |
By Capability
| Capability | Selection Guidance |
|---|---|
| Reasoning | Choose reasoning-capable entries and measure latency/cost. |
| Speed | Choose smaller, low-latency variants with sufficient quality. |
| Context length | Verify the context window reported by the tenant catalog. |
| Multimodal | Verify input media types and output modality support. |
| Code | Use code-capable entries and validate against project tests. |
| Citations | Use citation-capable entries and preserve returned source URLs. |
---
Model Version Management
Version Strategies
| Strategy | Configuration | Use Case |
|---|---|---|
| Latest | "modelVersion": "latest" | Development, auto-upgrade |
| Pinned | "modelVersion": "2024-05-13" | Production stability |
Checking Available Versions
curl -X GET "$AI_API_URL/v2/lm/scenarios/foundation-models/models" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "AI-Resource-Group: default" | \
jq '.resources[] | select(.model == "gpt-4o") | .versions'Handling Deprecation
1. Monitor deprecationDate in model metadata 2. Plan migration before retirementDate 3. Test new version in staging 4. Update configuration with new version 5. Patch existing deployments
---
Pricing Considerations
Pricing varies by:
- Model complexity (larger = more expensive)
- Input vs output tokens (output often 2-3x input cost)
- Provider region
- Access type (Remote vs Local)
Reference: SAP Note 3437766 for current token rates.
Cost Optimization
1. Right-size models: Use smaller models for simple tasks 2. Batch requests: Combine multiple queries when possible 3. Cache responses: Store and reuse common query results 4. Limit tokens: Set appropriate max_tokens limits 5. Use streaming: No additional cost, better UX
---
Rate Limits
Rate limits vary by:
- Service plan tier
- Model provider
- Specific model
Default limits (vary by configuration):
- Requests per minute: 60-600
- Tokens per minute: 40K-400K
Handling Rate Limits
import time
from requests.exceptions import HTTPError
def call_with_retry(func, max_retries=3):
for attempt in range(max_retries):
try:
return func()
except HTTPError as e:
if e.response.status_code == 429:
wait_time = 2 ** attempt
time.sleep(wait_time)
else:
raise
raise Exception("Max retries exceeded")---
Documentation Links
- Supported Models: https://help.sap.com/docs/sap-ai-core/generative-ai/supported-models
- Generative AI Hub: https://help.sap.com/docs/sap-ai-core/generative-ai/generative-ai-hub
- SAP Note 3437766: Token rates, limits, deprecation dates
- SAP Discovery Center: https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$comment": "SAP AI Core Deployment Configuration Template",
"foundation_model_configuration": {
"name": "my-model-deployment-config",
"executableId": "azure-openai",
"scenarioId": "foundation-models",
"parameterBindings": [
{"key": "modelName", "value": "gpt-4o"},
{"key": "modelVersion", "value": "latest"}
]
},
"orchestration_configuration": {
"name": "my-orchestration-config",
"executableId": "orchestration",
"scenarioId": "orchestration",
"parameterBindings": []
},
"deployment_request": {
"configurationId": "<configuration-id-from-above>",
"ttl": "24h"
},
"deployment_with_replicas": {
"configurationId": "<configuration-id>",
"ttl": "7d",
"minReplicas": 1,
"maxReplicas": 3
},
"_documentation": {
"ttl_format": "Natural numbers with units: m (minutes), h (hours), d (days)",
"ttl_examples": ["5m", "2h", "7d", "30d"],
"executable_ids": {
"azure-openai": "Azure OpenAI models (GPT-4o, GPT-4, GPT-3.5)",
"aicore-opensource": "SAP-hosted open source (Llama, Mistral, Falcon)",
"gcp-vertexai": "Google Vertex AI (Gemini, PaLM)",
"aws-bedrock": "AWS Bedrock (Claude, Titan)",
"aicore-mistralai": "Mistral AI models",
"aicore-ibm": "IBM Granite models",
"orchestration": "Orchestration service"
},
"model_version_options": {
"latest": "Auto-upgrade to newest version",
"specific": "Pin to specific version (e.g., '2024-05-13')"
}
}
}