Preparing to interact with the Cloudera AI Inference service API

To interact with Cloudera AI Inference service API, you need to obtain the domain name of the Cloudera AI Inference service and your Cloudera Data Platform JSON Web Token (JWT) and save it as environment variables.

  1. Obtain the domain name of the Cloudera AI Inference service and Cloudera Data Platform JSON Web Token (JWT) from the output of list-ml-serving-apps or describe-ml-serving-app Cloudera Data Platform commands.
    export DOMAIN=$(cdp ml describe-ml-serving-app --app-crn [***APP CRN***] | jq -r '.app.cluster.domainName')
  2. Store your CDP_TOKEN as an environment variable:
    export CDP_TOKEN=$(cdp iam generate-workload-auth-token --workload-name DE | jq -r '.token')