Skip to main content
POST
/
jobs
/
{UUID}
/
clone
cURL
curl --request POST \
  --url https://api.ionq.co/v0.4/jobs/{UUID}/clone \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parent": "<string>",
  "name": "<string>",
  "metadata": {},
  "shots": 100,
  "backend": "<string>",
  "session_id": "<string>",
  "settings": {
    "error_mitigation": {
      "symmetry_verification": true,
      "debiasing": true
    },
    "compilation": {
      "service_version": "<string>",
      "gate_basis": "<string>",
      "precision": "<string>",
      "opt": 123
    }
  },
  "dry_run": true
}
'
import requests

url = "https://api.ionq.co/v0.4/jobs/{UUID}/clone"

payload = {
    "parent": "<string>",
    "name": "<string>",
    "metadata": {},
    "shots": 100,
    "backend": "<string>",
    "session_id": "<string>",
    "settings": {
        "error_mitigation": {
            "symmetry_verification": True,
            "debiasing": True
        },
        "compilation": {
            "service_version": "<string>",
            "gate_basis": "<string>",
            "precision": "<string>",
            "opt": 123
        }
    },
    "dry_run": True
}
headers = {
    "Authorization": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    parent: '<string>',
    name: '<string>',
    metadata: {},
    shots: 100,
    backend: '<string>',
    session_id: '<string>',
    settings: {
      error_mitigation: {symmetry_verification: true, debiasing: true},
      compilation: {
        service_version: '<string>',
        gate_basis: '<string>',
        precision: '<string>',
        opt: 123
      }
    },
    dry_run: true
  })
};

fetch('https://api.ionq.co/v0.4/jobs/{UUID}/clone', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.ionq.co/v0.4/jobs/{UUID}/clone",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'parent' => '<string>',
    'name' => '<string>',
    'metadata' => [
        
    ],
    'shots' => 100,
    'backend' => '<string>',
    'session_id' => '<string>',
    'settings' => [
        'error_mitigation' => [
                'symmetry_verification' => true,
                'debiasing' => true
        ],
        'compilation' => [
                'service_version' => '<string>',
                'gate_basis' => '<string>',
                'precision' => '<string>',
                'opt' => 123
        ]
    ],
    'dry_run' => true
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: <api-key>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ionq.co/v0.4/jobs/{UUID}/clone"

	payload := strings.NewReader("{\n  \"parent\": \"<string>\",\n  \"name\": \"<string>\",\n  \"metadata\": {},\n  \"shots\": 100,\n  \"backend\": \"<string>\",\n  \"session_id\": \"<string>\",\n  \"settings\": {\n    \"error_mitigation\": {\n      \"symmetry_verification\": true,\n      \"debiasing\": true\n    },\n    \"compilation\": {\n      \"service_version\": \"<string>\",\n      \"gate_basis\": \"<string>\",\n      \"precision\": \"<string>\",\n      \"opt\": 123\n    }\n  },\n  \"dry_run\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.ionq.co/v0.4/jobs/{UUID}/clone")
  .header("Authorization", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"parent\": \"<string>\",\n  \"name\": \"<string>\",\n  \"metadata\": {},\n  \"shots\": 100,\n  \"backend\": \"<string>\",\n  \"session_id\": \"<string>\",\n  \"settings\": {\n    \"error_mitigation\": {\n      \"symmetry_verification\": true,\n      \"debiasing\": true\n    },\n    \"compilation\": {\n      \"service_version\": \"<string>\",\n      \"gate_basis\": \"<string>\",\n      \"precision\": \"<string>\",\n      \"opt\": 123\n    }\n  },\n  \"dry_run\": true\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.ionq.co/v0.4/jobs/{UUID}/clone")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"parent\": \"<string>\",\n  \"name\": \"<string>\",\n  \"metadata\": {},\n  \"shots\": 100,\n  \"backend\": \"<string>\",\n  \"session_id\": \"<string>\",\n  \"settings\": {\n    \"error_mitigation\": {\n      \"symmetry_verification\": true,\n      \"debiasing\": true\n    },\n    \"compilation\": {\n      \"service_version\": \"<string>\",\n      \"gate_basis\": \"<string>\",\n      \"precision\": \"<string>\",\n      \"opt\": 123\n    }\n  },\n  \"dry_run\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": "617a1f8b-59d4-435d-aa33-695433d7155e",
  "session_id": null
}
Create a new job that reuses the circuit and workload of an existing job. You can override fields such as name, shots, backend, settings, and metadata in the request body — any field you omit is inherited from the source job. The cloned job is queued as a brand new job, and the original is left unchanged. This is useful for re-running a job with a different number of shots, targeting another backend, or adjusting error mitigation settings without rebuilding the circuit.

Authorizations

Authorization
string
header
required

API keys are associated with a user and can be created on the IonQ Quantum Cloud application. To authenticate, prefix your API Key with apiKey and place it in the Authorization request header. Ex: Authorization: apiKey your-api-key

Path Parameters

UUID
string
required

The UUID of the job to clone.

Body

application/json

Make all properties in T optional

parent
string
name
string
metadata
object

User defined metadata

shots
integer<int32>
default:100

shots is ignored by ideal simulator backend.

Required range: 1 <= x <= 1000000
backend
string
session_id
string
settings
object
dry_run
boolean
noise
object

Response

Created

id
string
required
Example:

"617a1f8b-59d4-435d-aa33-695433d7155e"

status
enum<string>
required
Available options:
submitted,
ready,
started,
canceled,
failed,
completed
session_id
string | null
required
Example:

null