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

# Exécuter un outil

> Démarre de manière asynchrone l'exécution d'un outil et renvoie un ID pour suivre les résultats. Note : Les outils MCP ne peuvent pas être utilisés via cette API pour le moment. Seuls les outils du point de terminaison /tools peuvent être exécutés.



## OpenAPI

````yaml /api-reference/openapi.fr.json post /tools/{tool_id}/execute
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /tools/{tool_id}/execute:
    post:
      tags:
        - Public API
        - Public API - Tool Executions
      summary: Exécuter un outil
      description: >-
        Démarre de manière asynchrone l'exécution d'un outil et renvoie un ID
        pour suivre les résultats. Note : Les outils MCP ne peuvent pas être
        utilisés via cette API pour le moment. Seuls les outils du point de
        terminaison /tools peuvent être exécutés.
      operationId: execute_public_tool_tools__tool_id__execute_post
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier or name of the tool to execute.
            title: Tool Id
          description: L'identifiant unique ou le nom de l'outil à exécuter.
        - name: X-End-User-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-End-User-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicToolExecutionRequest'
            example:
              inputs:
                stock_symbol: ACME
                report_year: 2023
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicToolExecutionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - body
                      - inputs
                    msg: field required
                    type: value_error.missing
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicToolExecutionRequest:
      properties:
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
          description: >-
            Un dictionnaire d'entrées pour l'outil, correspondant à son
            input_schema.
      type: object
      required:
        - inputs
      title: PublicToolExecutionRequest
    PublicToolExecutionResponse:
      properties:
        execution_id:
          type: string
          title: Execution Id
          description: L'identifiant unique de cette instance d'exécution d'outil.
        status:
          type: string
          title: Status
          description: Le statut actuel de l'exécution.
        tool_id:
          type: string
          format: uuid
          title: Tool Id
          description: L'ID de l'outil en cours d'exécution.
        details_url:
          type: string
          title: Details Url
          description: L'URL pour interroger le résultat final de l'exécution.
        stream_url:
          type: string
          title: Stream Url
          description: L'URL pour diffuser en temps réel les événements de cette exécution.
      type: object
      required:
        - execution_id
        - status
        - tool_id
        - details_url
        - stream_url
      title: PublicToolExecutionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````