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

# Execute Skill by ID

> Execute a skill by its MongoDB _id. Always dispatched via a Celery task; pass `agent-config.delay: false` to block and wait up to 300s for the result instead of getting a scheduled task id back immediately.



## OpenAPI

````yaml POST /skill/executor/id/{item_id}
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /skill/executor/id/{item_id}:
    post:
      tags:
        - skills
      summary: Execute Skill by ID
      description: >-
        Execute a skill by its MongoDB _id. Always dispatched via a Celery task;
        pass `agent-config.delay: false` to block and wait up to 300s for the
        result instead of getting a scheduled task id back immediately.
      operationId: executeSkillById
      parameters:
        - name: item_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent-config:
                  type: object
                  properties:
                    delay:
                      type: boolean
                      default: true
                      description: false = wait synchronously (up to 300s) for the result
                messages:
                  type: array
                  items:
                    type: object
                context-skill:
                  type: object
      responses:
        '200':
          description: >-
            Scheduled (default) returns a skill_run_id + task_id; delay:false
            returns the actual result with skill_run_id attached
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Whether the operation succeeded
                    example: true
                  data:
                    type: object
                    properties:
                      skill_run_id:
                        type: string
                      task_id:
                        type: string
                  message:
                    type: string
                    example: Skill scheduled
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````