I am trying to build a custom connector for Power Apps. I need an OpenAPI definition (a json file) to create the connector. If I have an Azure AI resource, like Computer Vision, how do I generate or download the OpenAPI definition for that resource?
1 Answer
To generate or download an OpenAPI definition (JSON file) for an existing Azure AI resource like Computer Vision, follow these steps:
One way is to Download OpenAPI Specification from Azure .Go to Azure Portal and Navigate to your Azure AI resource (e.g., Computer Vision).
In the resource settings, look for API Documentation or REST API reference.
Microsoft typically provides an OpenAPI (Swagger) specification for its AI services. If available, download the OpenAPI JSON file directly from the documentation.
[...]
"servers": [
{
"url": "https://contoso.openai.azure.com/openai",
"variables": {
"endpoint": {
"default": "contoso.openai.azure.com"
}
}
}
],
[...]
Example location: Microsoft’s REST API reference pages for services like Azure OpenAI or Computer Vision.

Second option is to Generate OpenAPI Definition Using Azure API Management . If you want to expose the AI service through Azure API Management:
Create an API Management and If not already created, set up an Azure API Management instance.
In Azure API Management, go to APIs > + Add API and Choose Create from Azure resource and select your AI resource (e.g., Computer Vision API).
API Management will auto-generate an OpenAPI definition.
Once imported, navigate to the API in API Management.

Look for Export API Definition and select OpenAPI (JSON) to download.
Thrid Option 3 is to use Microsoft’s Predefined OpenAPI Specifications .Microsoft provides OpenAPI specifications for many Azure services. You can:
- Search for the service's OpenAPI spec in Microsoft's API documentation.
- Find the latest OpenAPI version from Azure REST API specifications.
- Download the JSON file directly from the repo and modify it for your use.
For Power Apps Custom Connector
- Once you have the OpenAPI JSON file, go to Power Apps > Custom Connectors > Import an OpenAPI file.
- Upload the JSON, configure authentication, and test the connector.
For more details, refer to this Microsoft Docs guide on using Azure AI Agent Service with OpenAPI-Specified Tools.
You can also check the official Azure OpenAI API documentation for further guidance.