OpenAPI Connector
Connect Zenmako to any REST API that has an OpenAPI (Swagger) specification. This generic connector enables AI to interact with your internal APIs, third-party services, or any system that publishes an OpenAPI spec - without requiring a dedicated connector.
Overview
The OpenAPI connector is a universal adapter that reads an OpenAPI specification and automatically generates tools for each endpoint. This means you can connect virtually any modern API to Zenmako, including:
What You Need
Before connecting an API via OpenAPI, gather the following:
OpenAPI Specification
You need access to the API's OpenAPI specification in one of these formats:
https://api.example.com/openapi.json)Most modern APIs publish their OpenAPI spec at a standard location like /openapi.json, /swagger.json, /api-docs, or in their developer documentation.
Authentication Credentials
Depending on how the API authenticates requests, you will need one of:
| Auth Type | What You Need |
| API Key | The API key value and header name (e.g., X-API-Key, Authorization) |
| Bearer Token | An access token or JWT to include in the Authorization header |
| Basic Auth | Username and password |
| None | Some APIs are public and require no authentication |
The connector extracts authentication requirements from the OpenAPI spec's securitySchemes (OpenAPI 3.x) or securityDefinitions (Swagger 2.0) section.
Connecting an API
If the test succeeds, Zenmako has parsed your OpenAPI spec and the connector is ready to use.
How It Works
When you connect an API using the OpenAPI connector, Zenmako:
servers array (OpenAPI 3.x) or host/basePath fields (Swagger 2.0)/users/{userId})
- Query parameters
- Request body schemas
- Response type information
Available Actions
The actions available depend entirely on the API you connect. The connector generates tools based on the paths and operations defined in the OpenAPI spec. Common patterns include:
| Pattern | Generated Tool Description |
GET /users | List or search users |
GET /users/{id} | Get a specific user by ID |
POST /users | Create a new user |
PUT /users/{id} | Update an existing user |
DELETE /users/{id} | Delete a user |
- Each tool will have:
- A descriptive name derived from the operation
- Input parameters matching the spec's parameter definitions
- Proper type validation based on the schema
Example Use Cases
Connect Your Internal API
If your team has built an internal service with OpenAPI documentation:
https://internal-api.yourcompany.com/swagger.json)Connect a Third-Party API
For services without a dedicated Zenmako connector:
Example: Pet Store API
Using the classic Petstore demo API:
https://petstore.swagger.io/v2/swagger.jsonapi_keyOnce connected, prompts like these would work:
Common Issues
"Failed to parse OpenAPI specification"
This error occurs when the spec cannot be loaded or parsed. Solutions:
"Authentication failed" or "401 Unauthorized"
The API rejected your credentials. Solutions:
X-API-Key, others use Authorization, etc.)Bearer prefix, others don't)"Tool not found" or missing endpoints
Some endpoints from the spec aren't appearing as tools. Solutions:
operationId or descriptions may be skipped
Zenmako