Parcha GetAgentCostEstimate API

The GetAgentCostEstimate API from Parcha — 2 operation(s) for getagentcostestimate.

OpenAPI Specification

parcha-getagentcostestimate-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Parcha Admin GetAgentCostEstimate 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: GetAgentCostEstimate
paths:
  /getAgentCostEstimate:
    get:
      security:
      - bearerAuth: []
      summary: Get agent cost estimate
      description: Calculate the estimated cost in credits for running all checks in an agent
      parameters:
      - name: agent_key
        in: query
        required: true
        schema:
          type: string
        description: The agent key to estimate costs for
      responses:
        '200':
          description: Cost estimate retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_key:
                    type: string
                  total_estimated_cost:
                    type: number
                  check_costs:
                    type: object
                  agent_name:
                    type: string
                  agent_description:
                    type: string
        '404':
          description: Agent not found
        '500':
          description: Cost estimation failed
      tags:
      - GetAgentCostEstimate
  /api/v1/getAgentCostEstimate:
    get:
      summary: Get Agent Cost Estimate
      description: "Get cost estimate for running an agent\n\nThis endpoint calculates the estimated cost in credits for running all checks\nin the specified agent configuration using the centralized billing service.\n\nArgs:\n    agent_key: The agent key to estimate costs for\n\nReturns:\n    AgentCostEstimateResponse: Cost breakdown and total estimate"
      operationId: get_agent_cost_estimate_api_v1_getAgentCostEstimate_get
      security:
      - HTTPBearer: []
      parameters:
      - name: agent_key
        in: query
        required: true
        schema:
          type: string
          title: Agent Key
      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'
      tags:
      - GetAgentCostEstimate
components:
  schemas:
    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.