Skip to content

Results are limited to the current section: Cloud services

Product news

Create Batch

POST
/api/v1/batches
curl --request POST \
--url https://example.com/api/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "device_type": "FRESNEL", "jobs": [ { "runs": 100, "variables": { "omega": 5 } } ], "project_id": "00000000-0000-0000-0000-000000000001", "sequence_builder": "<serialized Pulser sequence (sequence.to_abstract_repr())>" }'

Create a new batch to submit quantum computing jobs.

The authenticated user must be a member of the target project. The project will be billed for all jobs in the batch.

A batch groups one or more jobs sharing the same target device. The pulse sequence can be defined once at the batch level (sequence_builder) or individually per job (jobs[].sequence). The batch-level sequence can be parametrized: each job then provides its own variable bindings via variables instead of a full sequence.

Required fields:

  • project_id — the project that will be billed.
  • At least one job in jobs, unless the batch is left open (complete=false) for jobs to be added later.

Optional fields:

  • device_type — when omitted, inferred from the device embedded in the sequence. Use GET /api/v2/devices to discover available devices (includes private devices accessible to the authenticated user).

Returns: The created batch with its ID and initial status (PENDING).

Media typeapplication/json
CreateBatchSchema

Schema to parse request for the creation of a batch.

object
priority
Any of:
number
sequence_builder
Any of:
string
emulator
Any of:
DeviceTypeName

Enumeration of allowed and legacy device type names

string
Allowed values: EMU_FREE EMU_SV EMU_TN EMU_C FRESNEL FRESNEL_CAN1 FRESNEL_SA1 FRESNEL8 EMU_FRESNEL FRESNEL_RD EMU_MPS
device_type
Any of:
DeviceTypeName

Enumeration of allowed and legacy device type names

string
Allowed values: EMU_FREE EMU_SV EMU_TN EMU_C FRESNEL FRESNEL_CAN1 FRESNEL_SA1 FRESNEL8 EMU_FRESNEL FRESNEL_RD EMU_MPS
configuration
Any of:
Configuration

Deprecated. Use backend_configuration instead.

complete
Any of:
boolean
open
Any of:
boolean
tags
Tags

Keywords used to refine the batch search.

Array<string>
unique items
project_id
required
Project Id

ID of the project to run the batch for.

string format: uuid
backend_configuration
Any of:
string
jobs
Jobs

The list of jobs to execute in the batch. Required if the batch is not open.

Array<object>
CreateJobSchema

Schema to create a job within a batch.

object
runs
Any of:
integer
variables
Any of:
object
key
additional properties
any
sequence
Any of:
string

Successful Response

Media typeapplication/json
NonPaginatedResponse[ProducedBatchWithPartialJobsResponse]
object
data
Any of:
ProducedBatchWithPartialJobsResponse

Response for a batch request which includes its jobs data but without the results.

This schema defines all the fields that can be publicly shared by the API.

object
id
required
Id

Unique identifier for the batch.

string format: uuid
parent_id
required
Any of:
string format: uuid
status
required
BatchStatus

Current batch status.

string
Allowed values: PENDING RUNNING DONE CANCELED CANCELING TIMED_OUT ERROR PAUSED
complete
required
Complete

Deprecated. Use open instead. Indicates whether the batch is still accepting additional jobs. False means the batch is open; True means it is closed.

boolean
open
required
Open

Whether the batch is open and accepting additional jobs.

boolean
priority
required
Priority

Deprecated. Priority of the batch.

integer
device_type
required
Device Type

Target device type for the batch.

string
user_id
required
User Id

ID of the user who created the batch.

string
project_id
required
Project Id

ID of the project this batch belongs to.

string format: uuid
created_at
required
Created At

Timestamp when the batch was created.

string format: date-time
updated_at
required
Updated At

Timestamp of the last batch update.

string format: date-time
sequence_builder
required
Any of:
string
jobs_count
required
Jobs Count

Total number of jobs in the batch.

integer
jobs_count_per_status
required
Jobs Count Per Status

Number of jobs grouped by status.

object
key
additional properties
any
tags
required
Tags

User-defined labels for organizing batches.

Array<string>
unique items
configuration
required
Any of:
object
key
additional properties
any
backend_configuration
required
Any of:
string
webhook
required
Any of:
string
start_datetime
required
Any of:
string format: date-time
end_datetime
required
Any of:
string format: date-time
jobs
required
Any of:
Array<object>
ProducedPartialJobResponse

Response to a request for a job.

This schema defines all the fields that can be publicly shared by the API and do not require significant computational resources. For example, 'logs_links' or 'results link'.

object
id
required
Id

Unique identifier for the job.

string format: uuid
parent_id
required
Any of:
string format: uuid
status
required
JobStatus

Current job status.

string
Allowed values: PENDING RUNNING DONE ERROR CANCELED CANCELING
runs
required
Any of:
integer
batch_id
required
Batch Id

ID of the batch this job belongs to.

string format: uuid
project_id
required
Project Id

ID of the project this job belongs to.

string format: uuid
created_at
required
Created At

Timestamp when the job was created.

string format: date-time
updated_at
required
Updated At

Timestamp of the last job update.

string format: date-time
start_timestamp
required
Any of:
string format: date-time
end_timestamp
required
Any of:
string format: date-time
variables
required
Any of:
object
key
additional properties
any
errors
required
Any of:
Array<string>
progress
required
Any of:
integer
<= 100
sequence
required
Any of:
string
creation_order
required
Creation Order

Position in the creation order within the batch.

integer
queue_priority
required
QueuePriority

Priority queue on which the batch is scheduled.

string
Allowed values: CRITICAL HIGH MEDIUM LOW FREE
Example
{
"data": {
"complete": false,
"created_at": "2025-01-15T10:30:00Z",
"device_type": "FRESNEL",
"id": "00000000-0000-0000-0000-000000000002",
"jobs": [
{
"batch_id": "00000000-0000-0000-0000-000000000002",
"created_at": "2025-01-15T10:30:00Z",
"creation_order": 0,
"id": "00000000-0000-0000-0000-000000000003",
"progress": 0,
"project_id": "00000000-0000-0000-0000-000000000001",
"runs": 100,
"status": "PENDING",
"updated_at": "2025-01-15T10:30:00Z",
"variables": {
"omega": 5
}
}
],
"jobs_count": 1,
"jobs_count_per_status": {
"PENDING": 1
},
"open": true,
"priority": 0,
"project_id": "00000000-0000-0000-0000-000000000001",
"queue_priority": "MEDIUM",
"sequence_builder": "<serialized Pulser sequence>",
"status": "PENDING",
"tags": [],
"updated_at": "2025-01-15T10:30:00Z",
"user_id": "user-123"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}