Parcha GetAgentConfigCostEstimate API

The GetAgentConfigCostEstimate API from Parcha — 2 operation(s) for getagentconfigcostestimate.

OpenAPI Specification

parcha-getagentconfigcostestimate-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Parcha Admin GetAgentConfigCostEstimate API
  version: 1.0.0
  description: API for managing Parcha jobs and checks
servers:
- url: https://api.parcha.ai/api/v1
  description: Agent Hub API server
- url: https://demo.parcha.ai/api/v1
  description: Sandbox API server
- url: https://us1.parcha.ai/api/v1
  description: Legacy API server
- url: http://{your-company-domain}.parcha.ai/api/v1
  description: Custom Enterpris server (your company's API server)
security:
- bearerAuth: []
tags:
- name: GetAgentConfigCostEstimate
paths:
  /getAgentConfigCostEstimate:
    post:
      security:
      - bearerAuth: []
      summary: Get agent configuration cost estimate
      description: Calculate estimated cost for an agent configuration object (useful for unsaved drafts)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_key:
                  type: string
                agent_name:
                  type: string
                agent_description:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
      responses:
        '200':
          description: Cost estimate retrieved successfully
        '500':
          description: Cost estimation failed
      tags:
      - GetAgentConfigCostEstimate
  /api/v1/getAgentConfigCostEstimate:
    post:
      summary: Get Agent Config Cost Estimate
      description: "Get cost estimate for an agent configuration object\n\nThis endpoint calculates the estimated cost in credits for running all checks\nin the provided agent configuration without requiring the agent to be saved.\nPerfect for template copies and unsaved drafts.\n\nArgs:\n    request: The agent configuration with steps to estimate costs for\n\nReturns:\n    AgentCostEstimateResponse: Cost breakdown and total estimate"
      operationId: get_agent_config_cost_estimate_api_v1_getAgentConfigCostEstimate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentConfigCostEstimateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCostEstimateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
      tags:
      - GetAgentConfigCostEstimate
components:
  schemas:
    AgentConfigCostEstimateRequest:
      properties:
        agent_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Key
          description: Optional agent key for the configuration
        agent_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Name
          description: Name of the agent configuration
        agent_description:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Description
          description: Description of the agent configuration
        steps:
          items:
            type: object
          type: array
          title: Steps
          description: List of steps in the agent configuration
      type: object
      required:
      - steps
      title: AgentConfigCostEstimateRequest
    AgentCostEstimateResponse:
      properties:
        agent_key:
          type: string
          title: Agent Key
          description: The agent key for which the cost was estimated
        total_estimated_cost:
          type: integer
          title: Total Estimated Cost
          description: Total estimated cost in credits for running the agent
        check_costs:
          additionalProperties:
            type: integer
          type: object
          title: Check Costs
          description: Individual cost breakdown by check ID
        data_loader_costs:
          additionalProperties:
            type: integer
          type: object
          title: Data Loader Costs
          description: Individual cost breakdown by data loader ID
        agent_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Name
          description: Human-readable name of the agent
        agent_description:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Description
          description: Description of the agent
      type: object
      required:
      - agent_key
      - total_estimated_cost
      - check_costs
      title: AgentCostEstimateResponse
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key obtained from your Parcha account settings. Include as Bearer token in the Authorization header.