cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error: AI API call failed on the tutorial

DarkoB
Explorer
262

Hi everyone,

I'm currently following the tutorial Quick Start for Your First AI Project Using SAP AI Core and encountered an issue in Step 7: Check your scenario.

The error I'm seeing is:

AI API call failed. Check the error log for details. 
Error code: ERR_BAD_REQUEST
Message: Request failed with status code 403

I followed the exact steps from the tutorial, including setting up a new repository and copying the provided YAML configuration:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: first-pipeline # Executable ID (max length 64 lowercase-hyphen-separated), please modify this to any value if you are not the only user of your SAP AI Core instance. Example: `first-pipeline-1234`
annotations:
scenarios.ai.sap.com/description: "Introduction to SAP AI Core"
scenarios.ai.sap.com/name: "Tutorial"
executables.ai.sap.com/description: "Greets the user"
executables.ai.sap.com/name: "Hello Pipeline"
labels:
scenarios.ai.sap.com/id: "learning"
ai.sap.com/version: "1.0"
spec:
entrypoint: mypipeline
templates:
- name: mypipeline
steps:
- - name: greet
template: greeter

- name: greeter
container:
image: docker.io/python:latest
command:
- python3
- '-c'
args:
- |
print("Hello from SAP AI Core")

Are there any roles or permissions I might have missed on my SAP BTP subaccount? Or could the API endpoint be outdated or deprecated?

Here’s what I’ve tried so far:

  • Verified the YAML syntax and applied it without errors.
  • Checked my subaccount roles and added the recommended roles from the tutorial.

I'm pretty new to SAP and trying different tutorials to learn. I’d appreciate any pointers or advice. Let me know if I should provide more details!

Thanks in advance for your help!

SAP AI Core

Accepted Solutions (0)

Answers (1)

Answers (1)

KrishnaSharma7
Advisor
Advisor

Hey @DarkoB ,

You can refer https://sap.github.io/ai-sdk/docs/java/connecting-to-ai-core and https://github.com/SAP/ai-sdk-java/blob/main/README.md documentation provided by AI Core team,

I had a chance to go through it for one of the use cases. The shared link might be handy in setting up AI Core API and other relevant details.

DarkoB
Explorer
0 Kudos

Hey @KrishnaSharma7

Thank you for the links and the suggestion! I appreciate it.

From what I understand, these resources are focused on using the AI SDK for Java, but in my case, I’m directly using the AI Core and Launchpad without involving Java or any SDK.

I followed the tutorial and set up everything as described, but I might be missing something related to API roles, permissions, or how the Launchpad connects to the AI Core. Do you have any pointers or recommendations specific to setting up roles or permissions for accessing AI Core via the Launchpad?

Thanks again for taking the time to help!