---
title: "Estimate resource update cost"
method: POST
path: "/api/v1/credits/estimate/update"
tags: ["Credits"]
---

# Estimate resource update cost

`POST /api/v1/credits/estimate/update`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/credits/estimate/update`
- Auth: API key in header `Authorization`

Calculate cost change for updating application resources (CPU, memory, replicas)

## Request body

- ServiceUpdateCostEstimateRequest
  - `app_id` string
  - `new_cpu` string
  - `new_memory` string
  - `new_replicas` integer

## Response `200`

Resource update cost estimate calculated successfully

- ServiceCostChangeResponse
  - `calculated_at` string
  - `currency` string
  - `current_breakdown` ServiceCostBreakdown
    - `cpu_cost` number
    - `memory_cost` number
    - `regions_cost` number
    - `total_cost` number
  - `current_hourly_cost` number
  - `difference` number: Positive = increase, Negative = savings
  - `new_breakdown` ServiceCostBreakdown
    - `cpu_cost` number
    - `memory_cost` number
    - `regions_cost` number
    - `total_cost` number
  - `new_hourly_cost` number
  - `percent_change` number

## Other responses

- `400`: Invalid request body
- `500`: Internal server error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
