# Monitor and Optimization

## **Pricing Calculation API**

Assisfy provides an API to retrieve pricing information and calculate the cost of your actions based on current rates and session activity.

**Example Request**:

```http
GET /api/pricing?session_id=abc123
```

**Response**:

```json
[{
  "action_type": "Form Submission",
  "unit_cost": 0.0125,
  "action_count": 10,
  "total_cost": 0.125
}]
```

This API allows you to retrieve the unit cost, the total number of actions performed, and the cumulative session cost.

***

## **Action Cost Analytics**

Assisfy provides tools for analyzing action costs and optimizing the flow of your agent. By tracking the most expensive actions and optimizing their execution (e.g., reducing the number of external resource requests), you can significantly reduce your overall session cost.
