{"id":23204,"library":"ai-core-sdk","title":"SAP AI Core SDK","description":"[DEPRECATED] Official SAP AI Core SDK for Python (version 2.6.2, requires Python >=3.9). This library provides programmatic access to SAP AI Core services for training, deployment, and inference. It is in maintenance mode and has been superseded by the AI SDK (ai-sdk). Users are advised to migrate away.","status":"deprecated","version":"2.6.2","language":"python","source_language":"en","source_url":"https://github.com/SAP/ai-core-sdk","tags":["sap","ai","machine-learning","cloud"],"install":[{"cmd":"pip install ai-core-sdk","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"HTTP client","package":"requests","optional":false},{"reason":"YAML parsing","package":"pyyaml","optional":false},{"reason":"AWS interop for object store","package":"boto3","optional":true},{"reason":"Azure interop for object store","package":"azure-storage-blob","optional":true}],"imports":[{"note":"Direct import from wrong module leads to AttributeError","wrong":"from ai_core_sdk import AIAPIClient","symbol":"AIAPIClient","correct":"from ai_core_sdk.ai_core_v2_client import AIAPIClient"},{"note":"","wrong":"","symbol":"AICoreV2Client","correct":"from ai_core_sdk.ai_core_v2_client import AICoreV2Client"}],"quickstart":{"code":"import os\nfrom ai_core_sdk.ai_core_v2_client import AIAPIClient\n\n# Use environment variables for authentication\napi_key = os.environ.get('AICORE_API_KEY', '')\nauth_url = os.environ.get('AICORE_AUTH_URL', '')\nbase_url = os.environ.get('AICORE_BASE_URL', '')\n\nclient = AIAPIClient(\n    base_url=base_url,\n    auth_url=auth_url,\n    api_key=api_key\n)\n\n# List scenarios\nprint(client.scenario.query())","lang":"python","description":"Initialize the AIAPIClient and list scenarios."},"warnings":[{"fix":"Replace with 'ai-sdk' (pip install ai-sdk) and update import paths.","message":"Library is deprecated. New features and bug fixes occur only for critical security issues. Migrate to the new AI SDK (ai-sdk).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Import from ai_core_sdk.ai_core_v2_client instead.","message":"The module path changed in v2.0.0. Using 'from ai_core_sdk import AIAPIClient' fails.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Always pass auth_url when using API key authentication.","message":"Authentication requires both base_url and auth_url. Many examples online omit auth_url, causing 401 errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install ai-core-sdk' in the correct Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'ai_core_sdk'"},{"fix":"Use 'from ai_core_sdk.ai_core_v2_client import AIAPIClient'.","cause":"Direct import from top-level module, which does not export the class.","error":"AttributeError: module 'ai_core_sdk' has no attribute 'AIAPIClient'"},{"fix":"Ensure AICORE_AUTH_URL and AICORE_API_KEY environment variables are set correctly.","cause":"Missing or incorrect auth_url or api_key.","error":"ai_core_sdk.resources.clients.credential_handler.AuthenticationError: Authentication failed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}