> ## Documentation Index
> Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-changelog-august-13.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoke an action

> Invoke an action.



## OpenAPI

````yaml https://api.onkernel.com/spec.json post /invocations
openapi: 3.1.0
info:
  description: Developer tools and cloud infrastructure for AI agents to use web browsers
  title: Kernel API
  version: 0.1.0
servers:
  - description: API Server
    url: https://api.onkernel.com
security:
  - bearerAuth: []
tags:
  - description: Create and manage browser sessions.
    name: Browsers
  - description: Control mouse, keyboard, and screen on the browser instance.
    name: Browser Computer Controls
  - description: Execute Playwright code against the browser instance.
    name: Browser Playwright
  - description: Read, write, and manage files on the browser instance.
    name: Browser Filesystem
  - description: Execute and manage processes on the browser instance.
    name: Browser Processes
  - description: Record and manage browser session video replays.
    name: Browser Replays
  - description: Stream logs from the browser instance.
    name: Browser Logs
  - description: Stream live telemetry events from a browser session.
    name: Browser Telemetry
  - description: Create, list, retrieve, and delete browser profiles.
    name: Profiles
  - description: Create and manage proxy configurations for routing browser traffic.
    name: Proxies
  - description: Create, list, retrieve, and delete browser extensions.
    name: Extensions
  - description: Create and manage browser pools for acquiring and releasing browsers.
    name: Browser Pools
  - description: Inspect the identity and authorization context for the current request.
    name: Authentication
  - description: >-
      Create and manage auth connections for automated credential capture and
      login.
    name: Managed Auth
  - description: Create and manage credentials for authentication.
    name: Credentials
  - description: Configure external credential providers like 1Password.
    name: Credential Providers
  - description: List applications and versions.
    name: Apps
  - description: Create and manage app deployments and stream deployment events.
    name: Deployments
  - description: Invoke actions and stream or query invocation status and events.
    name: Invocations
  - description: Read and manage organization-level limits.
    name: Organization
  - description: |
      Create and manage projects for resource isolation within an organization.
      When projects are disabled for the organization, project operations return
      `404` with code `projects_disabled`.
    name: Projects
  - description: Create and manage API keys for organization and project-scoped access.
    name: API Keys
  - description: Read audit log records for the authenticated organization.
    name: Audit Logs
  - description: Resolve browser and proxy recommendations for bot-protected sites.
    name: Site Configs
paths:
  /invocations:
    post:
      tags:
        - Invocations
      summary: Invoke an action
      description: Invoke an action.
      operationId: postInvocations
      requestBody:
        content:
          application/json:
            schema:
              properties:
                action_name:
                  description: Name of the action to invoke
                  example: analyze
                  type: string
                app_name:
                  description: Name of the application
                  example: my-app
                  type: string
                async:
                  default: false
                  description: >-
                    If true, invoke asynchronously. When set, the API responds
                    202 Accepted with status "queued".
                  example: true
                  type: boolean
                async_timeout_seconds:
                  default: 900
                  description: >-
                    Timeout in seconds for async invocations (min 10, max 3600).
                    Only applies when async is true.
                  example: 600
                  maximum: 3600
                  minimum: 10
                  type: integer
                payload:
                  description: Input data for the action, sent as a JSON string.
                  example: '{"data":"example input"}'
                  type: string
                version:
                  default: latest
                  description: Version of the application
                  example: 1.0.0
                  type: string
              required:
                - app_name
                - version
                - action_name
              type: object
        description: Invocation parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvokeResponse'
          description: Invocation created successfully
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvokeResponse'
          description: Invocation queued successfully (asynchronous invocation)
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '529':
          $ref: '#/components/responses/CapacityExhausted'
      security:
        - bearerAuth: []
components:
  schemas:
    InvokeResponse:
      properties:
        action_name:
          description: Name of the action invoked
          example: analyze
          type: string
        id:
          description: ID of the invocation
          example: rr33xuugxj9h0bkf1rdt2bet
          type: string
        output:
          description: >-
            The return value of the action that was invoked, rendered as a JSON
            string. This could be: string, number, boolean, array, object, or
            null.
          example: '{"result":"success","data":"processed input"}'
          type: string
        status:
          description: Status of the invocation
          enum:
            - queued
            - running
            - succeeded
            - failed
          example: queued
          type: string
        status_reason:
          description: Status reason
          example: Invocation queued for execution
          type: string
      required:
        - id
        - action_name
        - status
      type: object
    Error:
      properties:
        code:
          description: Application-specific error code (machine-readable)
          example: bad_request
          type: string
        details:
          description: Additional error details (for multiple errors)
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        inner_error:
          $ref: '#/components/schemas/ErrorDetail'
        message:
          description: Human-readable error description for debugging
          example: 'Missing required field: app_name'
          type: string
      required:
        - code
        - message
      type: object
    ErrorDetail:
      properties:
        code:
          description: Lower-level error code providing more specific detail
          example: invalid_input
          type: string
        message:
          description: Further detail about the error
          example: Provided version string is not semver compliant
          type: string
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request – invalid input
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden – insufficient permissions or plan
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Resource not found
    TooManyRequests:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Too Many Requests – rate limit exceeded
      headers:
        Retry-After:
          description: Seconds to wait before retrying
          schema:
            type: integer
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
    CapacityExhausted:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Capacity exhausted, unable to fulfill request at this time
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````