sap-cloud-sdk-ai-python

Integrates SAP Generative AI Hub and Orchestration Service into Python applications.

Updated May 18, 2026
One-click install
npx skills add https://github.com/Melik1986/axon-erp-api --skill sap-cloud-sdk-ai-python-melik1986
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sap-cloud-sdk-ai-python
Source: https://github.com/Melik1986/axon-erp-api/tree/main/cursor/skills/sap-cloud-sdk-ai-python
Command: npx skills add https://github.com/Melik1986/axon-erp-api --skill sap-cloud-sdk-ai-python-melik1986

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sap-ai-sdk-gen, and includes references (resource) components.

What problem does it solve? Connecting Python applications to SAP AI Core and Generative AI Hub requires handling authentication, deployment discovery, and provider-specific SDK differences. This Skill provides working patterns for calling LLMs through SAP's proxy, so you avoid wiring credentials, model deployments, and orchestration pipelines from scratch. ## Core Features & Use Cases - Native Model Access: Call OpenAI, Amazon Bedrock, Google GenAI, and SAP RPT-1 models through SAP AI Core with unified authentication via the gen_ai_hub package. - Orchestration Service: Build pipelines combining prompt templating, content filtering, data masking, and document grounding in a single API call. - LangChain Integration: Initialize LangChain LLMs and embedding models backed by SAP AI Core using init_llm and init_embedding_model. - Use Case: You are building a Python service that must answer questions grounded in company documents while masking PII. Use this Skill to configure an orchestration pipeline with grounding, masking, and filtering modules routed through your AI Core tenant. ## Quick Start Use the sap-cloud-sdk-ai-python skill to write a Python chat completion call to gpt-4o-mini through SAP Generative AI Hub.

Frequently Asked Questions about sap-cloud-sdk-ai-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call OpenAI models through SAP AI Core in Python?▼

Install sap-ai-sdk-gen and use gen_ai_hub.proxy.native.openai to create chat completions with a model name like gpt-4o-mini. The SDK routes requests through SAP AI Core using AICORE_CLIENT_ID, AICORE_CLIENT_SECRET, AICORE_AUTH_URL, and AICORE_BASE_URL environment variables.

How to migrate from generative-ai-hub-sdk to sap-ai-sdk-gen?▼

Uninstall generative-ai-hub-sdk and install sap-ai-sdk-gen from PyPI. The Python import name gen_ai_hub stays identical, so existing import statements continue to work. Update dependency declarations in requirements.txt or pyproject.toml to the new package name.

Does the SAP AI Python SDK support LangChain integration?▼

Yes, the gen_ai_hub.proxy.langchain module provides init_llm and init_embedding_model for harmonised model initialization, plus provider classes like ChatOpenAI, ChatBedrockConverse, and ChatGoogleGenerativeAI. LangChain dependencies are included with the [all] install extra.

Why does the SDK raise No credentials found in any source?▼

This error means the SDK found no AI Core credentials in keyword arguments, environment variables, config file, or VCAP_SERVICES. Set the four required AICORE_ environment variables or create a config.json profile under ~/.aicore to resolve it.

Can I use content filtering and data masking with SAP Orchestration Service?▼

Yes, the gen_ai_hub.orchestration_v2 module supports FilteringModuleConfig with Azure Content Safety thresholds and MaskingModuleConfig with SAP Data Privacy Integration for anonymization or pseudonymization of PII entities like emails and person names.

What happens when no deployment is found for a model name?▼

The SDK raises a No deployment found error when the requested model is not deployed in your AI Core resource group. Deploy the model in SAP AI Launchpad or pass the deployment_id directly to the client call to bypass model discovery.