Step 4

Test the Gateway

Overview

With the LLM Proxy deployed and credentials in hand, you’ll send a real request through the gateway using Postman.


Note: This step is performed in the new MuleSoft UI.

Step 1 — Find your Consumer Endpoint

  1. Go to LLM Proxies and click on your proxy
  2. Copy the Consumer Endpoint URL from the proxy detail page

The URL will look like:

https://attendee-gateway-mg19bc.q9i91k.usa-e2.cloudhub.io/<your-base-path>

Your full request URL appends /responses to that:

https://attendee-gateway-mg19bc.q9i91k.usa-e2.cloudhub.io/my-proxy/responses
                                                            ──────── ─────────
                                                            your base path  endpoint method

Important: Replace my-proxy with the base path you set when creating your proxy. The /responses suffix is the OpenAI Responses API endpoint.


Step 2 — Configure the request in Postman

  1. Open Postman and create a new HTTP Request
  2. Set the method to POST
  3. Paste your full Consumer Endpoint URL with /responses appended

Authorization tab

Click the Authorization tab and set:

Field Value
Auth Type No Auth

Headers tab

Click the Headers tab and add the following two headers:

Key Value
client_id Your Client ID (saved in the previous step)
client_secret Your Client Secret (saved in the previous step)

Body tab

Click the Body tab, select raw and JSON, then paste the following payload:

{
  "model": "gpt-5-mini",
  "input": "Tell me a three sentence bedtime story about a unicorn."
}

Note: The model field is how model-based routing works — the gateway reads this value and routes the request to the matching OpenAI route you configured. Changing the model name here would route to a different provider or model.


Step 3 — Send the request

Click Send.

You should receive a response from the LLM with a short bedtime story. The response follows the OpenAI Responses API format:

{
  "output": [
    {
      "content": [
        {
          "text": "Once upon a time, a little unicorn named Luna galloped through a meadow of silver stars...",
          "type": "output_text"
        }
      ]
    }
  ]
}

The answer is at output[0].content[0].text.


Troubleshooting

401 Unauthorized

  • Verify the client_id and client_secret header values are correct
  • Confirm the application has Approved status in Exchange → your proxy → Contracts

404 Not Found

  • Check that the base path in the URL matches exactly what you set when creating the proxy
  • Confirm the /responses suffix is present

502 Bad Gateway

  • Check the proxy Status shows Active in the LLM Proxies list
  • Verify the Destination URL and API Key were entered correctly when creating the proxy

What you’ve verified

  • Postman connects to the LLM Proxy with client_id and client_secret headers
  • The /responses endpoint returns a valid LLM-generated response
  • Model-based routing correctly routes the gpt-5-mini request to OpenAI

Continue to Monitor Token Consumption →