The official API documentation provides code samples but lacks a direct `curl` command format for token acquisition.
https://developer.broadcom.com/xapis/vmware-private-ai-service-api/latest/
Here demonstrate how to complete the client authorization to PAIF API via curl
VMware Private AI Service 2.1
1. Retrieve `client_id`, `username`, and `scope` from `https://<pais fqdn>/env.json`.
2. Generate an "App password" token in Authentik after admin logini:
a. Navigate to **Admin Portal** > **Directory** > **Tokens and App passwords**.
b. Create a new token for API client user with **Intent: App password** and **Expiring: Off**.
c. Copy the generated token string.
3. Execute the following `curl` command to obtain the Bearer token:
curl --ik 'https://<OIDC issuer>/application/o/token' \
--location --post301 --post302 --post303 \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=<client_id from step 1>' \
--data-urlencode 'username=<username from step1>' \
--data-urlencode 'password=<token from step 2>' \
--data-urlencode 'scope=<scope from step 1>'
4.Copy the access_token from response and verify the authorization is succeed:
curl 'https://<pais fqdn>/api/v1/compatibility/openai/v1/models' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer <access-token>'