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

# Create a run

> Invoke a published agent asynchronously. Returns a run ID that you can poll for status and results.

Pass `?dry_run=true` to preview the compiled prompt without executing.



## OpenAPI

````yaml POST /agents/{agent_id}/runs
openapi: 3.0.1
info:
  title: Push AI API
  description: >-
    Programmatic access to Push AI agents. Create API keys in the Push AI
    dashboard, then use them to list agents, invoke runs, and poll for results.
  version: 1.0.0
  contact:
    name: Push AI Support
    email: support@push.ai
servers:
  - url: https://api.push.ai/api/v1
    description: Production
security:
  - apiKey: []
paths:
  /agents/{agent_id}/runs:
    post:
      tags:
        - Runs
      summary: Create a run
      description: >-
        Invoke a published agent asynchronously. Returns a run ID that you can
        poll for status and results.


        Pass `?dry_run=true` to preview the compiled prompt without executing.
      operationId: createRun
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The ID of the agent to invoke.
          schema:
            type: integer
        - name: dry_run
          in: query
          required: false
          description: >-
            If `true`, returns the compiled prompt and parameters without
            executing the agent.
          schema:
            type: boolean
            default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRunRequest'
      responses:
        '202':
          description: Run accepted and queued for execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRunResponse'
        '400':
          description: >-
            Invalid request — unknown parameter, invalid value, or bad agent
            configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            Agent not found, not published, or does not belong to your
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateRunRequest:
      type: object
      properties:
        parameter_bindings:
          type: array
          nullable: true
          description: >-
            Optional parameter values to bind for this run. Each entry maps a
            parameter name to a value.
          items:
            $ref: '#/components/schemas/ParameterBinding'
    CreateRunResponse:
      type: object
      required:
        - run_id
        - status
      properties:
        run_id:
          type: string
          format: uuid
          description: Unique run identifier. Use this to poll for status.
        status:
          type: string
          enum:
            - pending
          description: Initial status of the queued run.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code (e.g. `invalid_api_key`,
                `agent_not_found`).
            message:
              type: string
              description: Human-readable error description.
            request_id:
              type: string
              description: >-
                Unique request identifier for debugging. Also returned in the
                `X-Request-Id` response header.
    ParameterBinding:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: >-
            The parameter name (must match a name from the agent's `parameters`
            list).
        value:
          type: string
          description: >-
            The value to bind to this parameter (e.g. a dimension value name
            like `"Acme Corp"`).
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Organization API key. Create one in the Push AI dashboard under Settings
        → API Keys.

````