Tutorial - Accessing LLM provider APIs

You can view all available LLM provider APIs from the Asset gallery page.

  1. Expand the menu options and click Asset gallery.

    The Asset gallery page lists all published assets in the Developer Portal.

  2. In the Add slicer filter, choose Type, and select LLM.

    The Asset gallery page lists only LLM provider assets.

  3. Select the OpenAI LLM provider asset that you published.
  4. Subscribe to the API product.
    1. Click API products from the left navigation pane and select the product.
    2. In the Plans section, click Subscribe.
    3. Specify the Subscription name for the application and click Save.

      The application is created and a confirmation message indicates that the subscription request is created successfully.

  5. Retrieve application credentials.
    1. Expand the menu options, click Manage > Applications.
    2. Select the application you created.
    3. Copy the Client ID, Client secret values.

      These credentials authenticate requests sent to the IBM DataPower Interact Gateway.

  6. Test the OpenAI API operation.
    1. Expand the menu options and click Asset gallery.
    2. Click API resources.
    3. Expand the API and select an operation.
    4. Click Try to test the API operation.
    5. Select the Headers tab.
    6. Add the following HTTP headers and click Send.
      Table 1. HTTP headers
      KEY VALUE
      X-IBM-Client-Id <your_client_id>
      X-IBM-Client-Secret <your_client_secret>
      If the credentials are valid, IBM DataPower Interact Gateway returns a successful response.