qBraid APIs
Migrating from V1
This guide covers breaking changes when migrating from the qBraid V1 API to V2.
What’s changed
Authentication and response structure
Base URL
| Version | Base URL |
|---|---|
| V1 | https://api.qbraid.com/api |
| V2 | https://api-v2.qbraid.com/api/v1 |
Authentication header
| Version | Header |
|---|---|
| V1 | api-key |
| V2 | X-API-KEY |
Response envelope
The device and job REST responses use a standard envelope:
{
"success": boolean,
"data": { ... }
}V1 returned raw payloads without this wrapper.
Devices
V2 device objects include paradigm, modality, and pricingModel fields. Device identifiers use qBraid Resource Names (QRNs).
Routes
| Operation | V1 Route | V2 Route |
|---|---|---|
| List devices | GET /quantum-devices | GET /devices |
| Get device | — | GET /devices/{device_qrn} |
Identifier
| Version | Field | Example |
|---|---|---|
| V1 | qbraidDeviceId | qbraid_qir_simulator |
| V2 | qrn (QRN format) | qbraid:qbraid:sim:qir-sv |
Response fields
V2 adds:
| Field | Description |
|---|---|
qrn | QRN identifier |
paradigm | gate_model, analog, annealing, other |
modality | Device modality (e.g., sparse_simulator) |
pricingModel | fixed or dynamic |
pricing | Object with perTask, perShot, perMinute |
directAccess | Boolean for direct device access |
runInputTypes | Array of supported input formats |
V2 renames:
type→deviceType(values:SIMULATOR,QPU)
Jobs
V2 job responses use QRNs as identifiers. Job submissions specify the program format instead of using the openQasm or bitcode fields.
Routes
| Operation | V1 Route | V2 Route |
|---|---|---|
| Create job | POST /quantum-jobs | POST /jobs |
| Get job | GET /quantum-jobs | GET /jobs/{job_qrn} |
| Get result | GET /quantum-jobs/result/:id | GET /jobs/{job_qrn}/result |
| Get program | — | GET /jobs/{job_qrn}/program |
| Cancel job | PUT /quantum-jobs/cancel/:id | POST /jobs/{job_qrn}/cancel |
| Delete job | — | DELETE /jobs/{job_qrn} |
| Delete multiple jobs | DELETE /quantum-jobs/:ids | DELETE /jobs?qrns=[...] |
Request body
V1:
{
"qbraidDeviceId": "qbraid_qir_simulator",
"openQasm": "OPENQASM 3; ...",
"shots": 1000,
"tags": {}
}V2:
{
"deviceQrn": "qbraid:qbraid:sim:qir-sv",
"program": {
"format": "qasm3",
"data": "OPENQASM 3; ..."
},
"shots": 1000,
"tags": {}
}Key differences:
qbraidDeviceId→deviceQrn(QRN format)openQasm/bitcode→program.datawith explicitprogram.formatcircuitNumQubitsremoved (inferred from program)
Response fields
V2 adds these fields to job responses:
| Field | Description |
|---|---|
jobQrn | QRN identifier (replaces V1’s _id) |
batchJobQrn | Batch job reference |
experimentType | gate_model, analog, annealing, other |
estimatedCost | Pre-execution cost estimate |
timeStamps | Object with createdAt, endedAt, executionDuration |
metadata | Extensible metadata object |
What’s the same
- API key authentication model (header-based)
- Core job lifecycle: create → poll status → get result
shots,tags,statusfields- Job statuses:
INITIALIZING,QUEUED,RUNNING,COMPLETED,FAILED,CANCELLED - Device statuses:
ONLINE,OFFLINE,UNAVAILABLE
Deprecated endpoints
The following V1 endpoints are not available in V2:
| Endpoint | Notes |
|---|---|
POST /chat | Deprecated chat completions |
GET /chat/models | Deprecated chat model listing |
Quick migration checklist
- Update base URL to
https://api-v2.qbraid.com/api/v1 - Change auth header from
api-keytoX-API-KEY - Replace
qbraidDeviceIdwithdeviceQrnusing QRN format - Wrap program in
{ "format": "...", "data": "..." }object - Update route paths (
/quantum-jobs→/jobs,/quantum-devices→/devices) - Handle new response envelope (
response.datainstead of raw payload) - Replace legacy chat integrations with the AI Gateway. Its OpenAI-compatible and Anthropic-compatible responses use their own formats.
Was this page helpful?
Thanks for your feedback.

