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

# Create Run



## OpenAPI

````yaml post /api/agent-runs
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/agent-runs:
    post:
      tags:
        - agent-runs
      summary: Create Agent Run
      operationId: create_agent_run_api_agent_runs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRunRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAgentRunResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentRunRequest:
      properties:
        agent_type:
          type: string
          title: Agent Type
          description: Agent type (automation_agent, testing_agent)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Run description
        job_payloads:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Job Payloads
          description: List of job payloads to execute sequentially
        max_duration_minutes:
          type: integer
          title: Max Duration Minutes
          description: Maximum duration in minutes
          default: 60
        priority:
          type: integer
          title: Priority
          description: Priority level
          default: 0
      type: object
      required:
        - agent_type
        - job_payloads
      title: AgentRunRequest
      description: Request to create an agent run with VM reservation
    CreateAgentRunResponse:
      properties:
        run_id:
          type: string
          title: Run Id
          description: Agent run ID
        status:
          type: string
          title: Status
          description: Initial status
        total_jobs:
          type: integer
          title: Total Jobs
          description: Total number of jobs
      type: object
      required:
        - run_id
        - status
        - total_jobs
      title: CreateAgentRunResponse
      description: Response from creating an agent run
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````