Skip to main content
IBM Quantum Platform
This is the API reference for the Qiskit Runtime REST API on the new IBM Quantum Platform, which replaces the REST APIs for IBM Quantum Platform (Classic) Qiskit Runtime and IBM Cloud Qiskit Runtime. For more details, including how to migrate, visit the guide Migrate to the new Qiskit Runtime REST API.

Instances


Get current instance details

Returns the details of the current logged in instance, using CRN from the request header.

HTTP Response Status Codes

Status codeDescription
200OK
401Unauthorized
403Forbidden
404Not Found

Code samples

GET
/v1/instance
curl -X GET \
  /api/v1/instance \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "qctrl_enabled": true
}

Get instance configuration

Returns the configuration for the specified instance e.g. instance limit in seconds, using CRN from the request header.

HTTP Response Status Codes

Status codeDescription
200OK
401Unauthorized
403Forbidden
404Not Found

Code samples

GET
/v1/instances/configuration
curl -X GET \
  /api/v1/instances/configuration \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "instance_limit": 123456
}

Update instance configuration

Update the configuration for the specified instance e.g. instance limit in seconds, using CRN from context params of the request.

Body Parameters (application/json)

Name, TypeDescription

HTTP Response Status Codes

Status codeDescription
204OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Usage exceeds instance limit

Code samples

PUT
/v1/instances/configuration
curl -X PUT \
  /api/v1/instances/configuration \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

OK

Get instance usage (all time usage)

Returns the usage value in seconds for the specified instance, using CRN from context params of the request.

HTTP Response Status Codes

Status codeDescription
200OK
401Unauthorized
403Forbidden
404Not Found
500Internal error

Code samples

GET
/v1/instances/usage
curl -X GET \
  /api/v1/instances/usage \
  -H 'Authorization: Bearer YOUR-TOKEN' \
  -H 'Accept: application/json'

Responses

{
  "bss": {
    "seconds": 123
  },
  "usage": {
    "quantum_seconds": 123,
    "seconds": 123
  }
}
Was this page helpful?
Report a bug or request content on GitHub.