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

# Run a skill by ID

> Trigger an execution of a specific skill by its ID with optional variables and inputs.



## OpenAPI

````yaml POST /v1/skills/run
openapi: 3.0.3
info:
  title: Valendata REST API
  version: 1.0.0
  description: >-
    Trigger Skills, manage Workflows, retrieve Runs, and stream structured
    results from any language using JSON over HTTPS.
servers:
  - url: https://api.valendata.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Skills
    description: Execute and inspect published Skills.
  - name: Workflows
    description: Trigger multi-step Workflows and list them.
  - name: Runs
    description: Read past Workflow run history.
paths:
  /v1/skills/run:
    post:
      tags:
        - Skills
      summary: Run a Skill by ID
      description: >-
        Execute a published Skill by ID and receive strict JSON output enforced
        against the Skill's defined output schema.
      operationId: runSkill
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - skill_id
              properties:
                skill_id:
                  type: string
                  description: >-
                    The unique identifier of the published Skill to execute.
                    Skill IDs follow the format skl_...
                  example: skl_b281b8165a23
                parameters:
                  type: object
                  description: >-
                    Key-value map of parameter values to pass to the Skill.
                    Parameter names must match those defined in the Skill's
                    configuration.
                  additionalProperties: true
                  example:
                    page: /bestsellers
                    max_results: 50
      responses:
        '200':
          description: Skill executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillRunResult'
              example:
                status: completed
                data:
                  - name: Widget Pro
                    price: 129
                    in_stock: true
                  - name: Widget Lite
                    price: 49
                    in_stock: false
                count: 2
                execution_time_ms: 18400
                error: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SkillRunResult:
      type: object
      properties:
        status:
          type: string
          enum:
            - completed
            - failed
          description: Terminal state of the run.
        data:
          type: array
          nullable: true
          items:
            type: object
            additionalProperties: true
          description: >-
            Structured JSON output produced by the Skill, validated against the
            Skill's output schema. Null if the run failed.
        count:
          type: integer
          description: Number of items in `data`.
        execution_time_ms:
          type: integer
          description: Total wall-clock execution time in milliseconds.
        error:
          type: string
          nullable: true
          description: Error message if the run failed, otherwise null.
    Error:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            Error message. Usually a plain string; may be a structured object
            for some errors.
      example:
        detail: Invalid or expired API key
  responses:
    BadRequest:
      description: >-
        Bad request. The request body is malformed, missing required fields, or
        invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Unauthorized. The Authorization header is missing, malformed, or the
        credential is invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found in your Workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests, or insufficient credits to start this run.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal server error on Valendata's side.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: vd_sk_...
      description: >-
        API key with the `vd_sk_` prefix. Create keys from Settings, API Keys in
        the dashboard.

````