Create Batch
const url = 'https://example.com/api/v1/batches';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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())>"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Schema to parse request for the creation of a batch.
object
Enumeration of allowed and legacy device type names
Enumeration of allowed and legacy device type names
Deprecated. Use backend_configuration instead.
Keywords used to refine the batch search.
ID of the project to run the batch for.
Responses
Section titled “Responses”Successful Response
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}