> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute OpenAPI Tool

> Executes a specific OpenAPI tool using provided parameters.

### Endpoint

**POST** `/v3/tools/openapi/{tool_id}/execute`

### Description

Executes a specific OpenAPI tool using the provided parameters.

### Authentication

API Key (`x-api-key`) in the header.

### Request Parameters

| Parameter | Type   | Description                               |
| --------- | ------ | ----------------------------------------- |
| `tool_id` | String | The ID of the tool to execute.            |
| `path`    | String | The API path to call.                     |
| `method`  | String | The HTTP method to use (GET, POST, etc.). |

### Curl Request

```bash theme={null}
curl -X POST "https://agent-prod.studio.lyzr.ai/v3/tools/openapi/{tool_id}/execute?path={path}&method={method}" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-REDACTED"
```

### Response

Returns the result of the API tool execution.

***


## OpenAPI

````yaml post /tools/openapi/{tool_id}/execute
openapi: 3.0.3
info:
  title: Lyzr Tool Execution API
  version: 1.0.0
servers:
  - url: https://agent-prod.studio.lyzr.ai/v3
security: []
paths:
  /tools/openapi/{tool_id}/execute:
    post:
      tags:
        - Tools
      summary: Execute OpenAPI Tool
      description: Executes a specific OpenAPI tool using provided parameters.
      operationId: executeOpenApiTool
      parameters:
        - name: tool_id
          in: path
          required: true
          description: The ID of the tool to execute.
          schema:
            type: string
        - name: path
          in: query
          required: true
          description: The API path to call.
          schema:
            type: string
        - name: method
          in: query
          required: true
          description: The HTTP method to use (GET, POST, etc.).
          schema:
            type: string
            enum:
              - GET
              - POST
              - PUT
              - DELETE
              - PATCH
              - OPTIONS
              - HEAD
      requestBody:
        description: Optional body content for the API call (depending on method)
        content:
          application/json:
            schema:
              type: object
        required: false
      responses:
        '200':
          description: API tool executed successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad Request - Invalid parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Tool not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````