How to call Azure OpenAI from UiPath using HTTP Request?

How can i configure Endpoint , Headers and API key to connect azure open ai with UiPath?

Thank you for Your response

Hi @Mridul_iyer,

Postman is not required. Use UiPath HTTP request
https://<resource>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-02-15-preview

Headers:
Content-Type: application/json
api-key: <your-key>

Body:{"messages":[{"role":"user","content":"Hi"}],"max_tokens":100}
1 Like

Hi @Mridul_iyer,

Use UiPath HTTP request with your Azure OpenAI Deployment endpoint, Pass the api key in headers and send the prompt as JSON. Postman is optional and not required for UiPath intergration

Hi @Mridul_iyer ,

Use the Azure OpenAI endpoint URL as the base URL in UiPath, add headers Content-Type: application/json and api-key, and store the API key in an Orchestrator Asset instead of hardcoding. Send a POST request with the deployment name in the URL and the prompt in the body.

Hi @Mridul_iyer

  • Endpoint:
    From Azure Portal → Azure OpenAI → Keys and Endpoint
https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/chat/completions?api-version=2023-07-01-preview
  • Headers:

Content-Type : application/json
api-key : Azure OpenAI key

  • API Key:
    Use Key1/Key2 from Azure Portal (store it in Orchestrator Asset)

Make sure you’re using the Azure OpenAI endpoint, correct deployment name, and matching API version.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.