> ## 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 slug

> Trigger an execution of a specific skill using its slug with optional variables and inputs.



## OpenAPI

````yaml POST /v1/skills/{slug}/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/{slug}/run:
    post:
      tags:
        - Skills
      summary: Run a Skill by slug
      description: >-
        Execute a published Skill using its slug in the URL path. The request
        body is the parameter map directly.
      operationId: runSkillBySlug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
          description: URL-safe slug of the Skill to run.
          example: bestsellers-scraper
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              description: Key-value map of parameter values to pass to the Skill.
              additionalProperties: true
              example:
                page: /bestsellers
      responses:
        '200':
          description: Skill executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillRunResult'
        '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.

````