---
title: "Get estimated credit costs for tests"
method: POST
path: "/test/estimateCredits"
tags: ["Test"]
---

# Get estimated credit costs for tests

`POST /test/estimateCredits`

Calculates the estimated credit cost for executing multiple tests based on
their accounts' current execution credit weights. For performance tests, uses
configured runtime; actual runtime may vary.

## Request body

- TestCreditEstimateRequest — Request to estimate credit costs for tests
  - `test_ids` string[], required — List of test IDs (invariant or variant)

## Response `200`

Credit estimates for requested tests

- TestCreditEstimateResponse — Credit estimates for multiple tests
  - `estimates` TestCreditEstimate[]
    - `test_id` string — The test ID
    - `estimated_centicredits` integer — Estimated centicredits (1/100th of a credit) this test will consume (may vary for performance tests based on actual runtime)
    - `has_weights` boolean — Whether execution credit weights are configured for this test's account
    - `test_type` 'api' | 'browser' | 'performance' | 'mobile' — Type of test
    - `has_advanced_ai` boolean — Whether this test uses advanced AI features that incur additional charges
    - `error` string — Error message if credit estimation failed for this test

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
