Estimate Job Cost
Estimate the cost, in qBraid credits, of running a job on a device before submitting it.
The quote is a guide, not a cap: nothing enforces it, and a job that runs longer than quoted is billed for what it used. A QPU is quoted from that device's execution history. A simulator is quoted from a fixed conservative duration, so its quote does not change with the shot count.
A device whose pricing cannot be quoted is a state, not an error: the response has pricingAvailable: false and a reason.
Args:
- deviceQrn (string): Device QRN (qBraid Resource Name)
- shots (integer, optional): Shot count to quote for. Defaults to 1000.
Returns:
- A quote with
estimatedCostwhenpricingAvailableis true, or areasonwhen it is false
Raises:
- 400:
deviceQrnis missing orshotsis outside 1 to 100000 - 403: You do not have device execution permission for this device
- 404: Device is not found
- 410: Device is retired
Authorizations
X-API-KEYstringheaderrequiredAuthenticate requests using an API key linked to your qBraid account. Obtain your key by registering or logging in at account.qbraid.com.
Query Parameters
deviceQrnstringrequiredDevice to quote
shotsintegerdefault: 1000Shot count to quote for. Defaults to 1000.
Response
successbooleanrequireddataobjectrequiredA quote for a device with usable pricing
curl --request GET \
--url https://api-v2.qbraid.com/api/v1/jobs/cost-estimate?deviceQrn=%3CdeviceQrn%3E \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.qbraid.com/api/v1/jobs/cost-estimate?deviceQrn=%3CdeviceQrn%3E"
headers = {
"X-API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.json())const url = "https://api-v2.qbraid.com/api/v1/jobs/cost-estimate?deviceQrn=%3CdeviceQrn%3E";
const options = {
method: "GET",
headers: {"X-API-KEY":"<api-key>"},
};
const response = await fetch(url, options);
console.log(await response.json());{
"success": true,
"data": {
"pricingAvailable": true,
"estimatedCost": 123,
"deviceQrn": "<string>",
"shots": 123
}
}{
"success": false,
"message": "Query validation failed: shots: shots must be at least 1"
}{
"success": false,
"message": "Missing device execution permission for: aws:aqt:qpu:ibex-q1"
}{
"success": false,
"message": "Device not found: does:not:exist:nope"
}{
"success": false,
"message": "Device is retired and no longer available: aws:aws:sim:tn1"
}Estimate Job Cost
Fill in the request and press Send to see the live response.{
"success": true,
"data": {
"pricingAvailable": true,
"estimatedCost": 2380,
"deviceQrn": "aws:aqt:qpu:ibex-q1",
"shots": 1000
}
}{
"success": true,
"data": {
"pricingAvailable": false,
"reason": "dynamic_pricing_unavailable",
"deviceQrn": "ibm:ibm:qpu:fez",
"pricingModel": "dynamic"
}
}Thanks for your feedback.

