Generating an API key for AI assistant builder
To consume methods of the AI assistant builder API, you must generate an API key.
To generate an API key for AI assistant builder on watsonx Orchestrate, complete the following steps:
- Open AI assistant builder in watsonx Orchestrate.
- Select an AI assistant.
- Click Assistant settings.
- In the Assistant IDs and API details, click Generate API Key to generate the API key for the service instance URL.
Use the API key to authenticate your requests to the API by using apikey
for the username and the value of the API key for the password. For example, if the API key is f128743asfdSF8bv
, your API call by using the curl
tool would have the following syntax:
curl -X {request_method} -u "apikey:f128743asfdSF8bv" "{endpointUrl}/v2/{method}
Where:
-
{request_method}
The HTTP method for the request.
-
{endpointUrl}
The URL of the service instance. This should include the
/instances/{instance_id}
part of the path. For example:https://api.us-south.assistant.watson.cloud.ibm.com/instances/{instance_id}
To view the service instance URL for AI assistant builder on watsonx Orchestrate, complete the following steps:
- Open AI assistant builder in watsonx Orchestrate.
- Select the Assistant.
- Click Assistant settings.
- In the Assistant IDs and API details, click View details to view the service instance URL.
-
{method}
The method of the AI assistant builder API that you want to run. For details, see AI assistant builder API. The method for AI assistant builder and IBM watsonx Assistant are the same.
Parent topic: