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

# App Execute Action

> Triggers an interaction for a custom GPT model using the provided input and operation ID. Returns the GPT-generated response.



## OpenAPI

````yaml post /api/gpt_public/app_execute_action
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/gpt_public/app_execute_action:
    post:
      tags:
        - GPT Public
      summary: App Execute Action
      description: >-
        Triggers an interaction for a custom GPT model using the provided input
        and operation ID. Returns the GPT-generated response.
      operationId: app_execute_action
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GPTActionInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GPTActionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    GPTActionInput:
      properties:
        app_name:
          type: string
          title: App Name
          description: The identifier of the App to invoke.
        user_input:
          type: string
          title: User Input
          description: The natural language input describing the desired action.
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
          description: >-
            Contextual parameters for the action, including operationId and any
            required inputs.
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
          description: 'Response format: ''raw'' (default) or ''formatted_md''.'
          default: raw
      type: object
      required:
        - app_name
        - user_input
      title: GPTActionInput
      description: >-
        Input payload for triggering a GPT action. Contains the user's input and
        operation ID.
    GPTActionResponse:
      properties:
        message:
          title: Message
          description: The response message or result from the GPT action
      type: object
      required:
        - message
      title: GPTActionResponse
      description: >-
        Response model for a GPT action. Contains the message or result returned
        by the GPT action.
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````