# Calculate TikHub price

Calculate the final price based on the user's input of the number of daily requests and endpoint information. Needs endpoint.

Purpose:
- Calculate the final price based on the user's input of the number of daily requests and endpoint information.
- Price calculation formula: Price = Number of daily requests * (Original request unit price of the endpoint * (1 - discount percentage of tiered billing))
Parameters:
- endpoint: Requested endpoint, used to query the original request unit price of the endpoint
- request_per_day: Number of daily requests, used to calculate the price, the final price will be calculated automatically based on the discount percentage of the tiered billing
Calculation formula:
- Total cost = ∑ (Number of requests in the tier * Discounted unit price in the tier)
- Where, Discounted unit price in the tier = Base price * (1 - Discount)
Detailed calculation steps:
1. **Initialize the total cost**:
     Total cost = 0
2. **Traverse each tier**:
        * For each tier, calculate the number of requests in the tier.
        * Calculate the discounted unit price in the tier.
        * Calculate the total cost in the tier and add it to the total cost.
        * Update the remaining number of requests.
Mathematical representation:
Suppose there are 𝑛 tiers, and the parameters of each tier are:
* min_rpd𝑖: The minimum number of requests in the 𝑖-th tier
* max_rpd𝑖: The maximum number of requests in the 𝑖-th tier
* discount𝑖: The discount of the 𝑖-th tier (in percentage form)
* base_price: Base price
* request_per_day: Number of daily requests
> Then, the formula for calculating the total cost is as follows:
- Total cost = ∑𝑖=1𝑛(Number of requests in the tier 𝑖 * Discounted uni

- Tool ID: `tikhub/tikhub-user-calculate-price`
- Name in the catalog: Tikhub, Calculate price
- Provider: [TikHub](/providers/tikhub.md)
- Price: price pending
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No price is recorded for this tool yet.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

Pricing source: [https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info](https://api.tikhub.io/api/v1/tikhub/user/get_all_endpoints_info). Official per-success route price USD 0; daily upstream discounts may reduce provider cost. No discount invented for the customer. 1/second.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "description": "请求的端点/Requested endpoint",
      "title": "Endpoint"
    },
    "request_per_day": {
      "type": "integer",
      "description": "每日请求次数/Request per day",
      "default": 1,
      "title": "Request Per Day"
    }
  },
  "required": [
    "endpoint"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "tikhub/tikhub-user-calculate-price",
  "input": {
    "endpoint": "/api/v1/douyin/app/v1/fetch_one_video",
    "request_per_day": 100000
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://api.tikhub.io/#/TikHub-User-API/calculate_price_api_v1_tikhub_user_calculate_price_get)

[REST inspection](https://api.agentik.cc/v1/tools/tikhub/tikhub-user-calculate-price) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/tikhub/tikhub-user-calculate-price) · [Agent index](/llms.txt)
