Jobs
Create Job
POST
/jobsSubmit a quantum job to the specified device.
Request Body:
- program (object, required): Quantum program with format and data fields
- shots (integer, required): Number of shots to execute
- deviceQrn (string, required): Device QRN (qBraid Resource Name)
- runtimeOptions (object, optional): Runtime options
- tags (object, optional): Job tags
- name (string, optional): Job name
Headers:
- X-API-KEY (string, required): Your qBraid API key
Returns:
- Object containing the new job QRN and initial status
Raises:
- 422: Validation error if required fields are missing or invalid
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.
Body
application/jsonrequirednamestringJob name
shotsintegerrequiredNumber of shots to execute
deviceQrnstringrequiredqBraid device resource name
tagsobjectJob tags
runtimeOptionsobjectRuntime options
programobjectrequiredSchema for quantum program
Response
201Successful Response
successbooleanrequiredWhether the job was created successfully
dataobjectrequired422Validation Error
curl --request POST \
--url https://api-v2.qbraid.com/api/v1/jobs \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"shots": 123,
"deviceQrn": "<string>",
"tags": {},
"runtimeOptions": {},
"program": {
"format": "qasm2",
"data": {}
}
}'import requests
url = "https://api-v2.qbraid.com/api/v1/jobs"
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
payload = {
"name": "<string>",
"shots": 123,
"deviceQrn": "<string>",
"tags": {},
"runtimeOptions": {},
"program": {
"format": "qasm2",
"data": {}
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api-v2.qbraid.com/api/v1/jobs";
const options = {
method: "POST",
headers: {"X-API-KEY":"<api-key>","Content-Type":"application/json"},
body: JSON.stringify({
"name": "<string>",
"shots": 123,
"deviceQrn": "<string>",
"tags": {},
"runtimeOptions": {},
"program": {
"format": "qasm2",
"data": {}
}
}),
};
const response = await fetch(url, options);
console.log(await response.json());{
"success": true,
"data": {
"jobQrn": "aws:aws:sim:dm1-a1b2-qjob-1234567890abcdef",
"status": "INITIALIZING"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}POST
Create Job
Create Job
Response
Fill in the request and press Send to see the live response.201
{
"success": true,
"data": {
"jobQrn": "aws:aws:sim:dm1-a1b2-qjob-1234567890abcdef",
"status": "INITIALIZING"
}
}Was this page helpful?
Thanks for your feedback.

