curl --request POST \
--url https://compute.x402layer.cc/pods/v1/pods/{id}/clone \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"passphrase": "<string>",
"backup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"term_hours": 25,
"region": "<string>",
"max_total_usd": 123,
"channels": {},
"ai": {},
"external_ref": "<string>"
}
'import requests
url = "https://compute.x402layer.cc/pods/v1/pods/{id}/clone"
payload = {
"passphrase": "<string>",
"backup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"term_hours": 25,
"region": "<string>",
"max_total_usd": 123,
"channels": {},
"ai": {},
"external_ref": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
passphrase: '<string>',
backup_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
term_hours: 25,
region: '<string>',
max_total_usd: 123,
channels: {},
ai: {},
external_ref: '<string>'
})
};
fetch('https://compute.x402layer.cc/pods/v1/pods/{id}/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://compute.x402layer.cc/pods/v1/pods/{id}/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([
'passphrase' => '<string>',
'backup_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'term_hours' => 25,
'region' => '<string>',
'max_total_usd' => 123,
'channels' => [
],
'ai' => [
],
'external_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-API-Key: <api-key>"
],
]);
$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://compute.x402layer.cc/pods/v1/pods/{id}/clone"
payload := strings.NewReader("{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<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://compute.x402layer.cc/pods/v1/pods/{id}/clone")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.x402layer.cc/pods/v1/pods/{id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"pod": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"external_ref": "<string>",
"status": "provisioning",
"tier": "starter",
"model": "<string>",
"ai": {
"mode": "managed"
},
"capabilities": {
"endpoint": true,
"wallet": true,
"platform_tools": true,
"connectors": true,
"channels": true,
"scheduler": true,
"backups": true
},
"endpoint": {
"base_url": "https://compute.x402layer.cc/pods/{id}/v1"
},
"billing": {
"expires_at": "2023-11-07T05:31:56Z",
"auto_renew": true,
"is_trial": true
},
"customization": {
"agent_identity": "<string>",
"agent_instructions": "<string>",
"heartbeat_prompt": "<string>"
},
"agent_heartbeat_minutes": 720,
"created_at": "2023-11-07T05:31:56Z"
},
"clone": {
"source_pod_id": "<string>",
"backup_id": "<string>",
"restore": {
"status": "pending",
"message": "<string>"
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Clone a pod
Base URL https://compute.x402layer.cc/pods/v1. See the Sandbox API guide.
Creates a NEW pod, billed exactly like POST /pods (same payment, caps and Idempotency-Key ledger), and restores the source pod’s latest completed Agent Vault backup (or backup_id) once it is online, usually 5 to 10 minutes. Copies engine, tier, managed model, template, custom instructions and identity, heartbeat settings and capabilities. Does NOT copy channel tokens, a BYOK key, the slug, wallet, keys, webhooks or ports. The passphrase is never logged and is not part of the idempotency hash. Needs only an ordinary write key (a pod’s own key is refused). Rate limit: the create bucket, 60 per hour.
curl --request POST \
--url https://compute.x402layer.cc/pods/v1/pods/{id}/clone \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"passphrase": "<string>",
"backup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"term_hours": 25,
"region": "<string>",
"max_total_usd": 123,
"channels": {},
"ai": {},
"external_ref": "<string>"
}
'import requests
url = "https://compute.x402layer.cc/pods/v1/pods/{id}/clone"
payload = {
"passphrase": "<string>",
"backup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"term_hours": 25,
"region": "<string>",
"max_total_usd": 123,
"channels": {},
"ai": {},
"external_ref": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
passphrase: '<string>',
backup_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
term_hours: 25,
region: '<string>',
max_total_usd: 123,
channels: {},
ai: {},
external_ref: '<string>'
})
};
fetch('https://compute.x402layer.cc/pods/v1/pods/{id}/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://compute.x402layer.cc/pods/v1/pods/{id}/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([
'passphrase' => '<string>',
'backup_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'term_hours' => 25,
'region' => '<string>',
'max_total_usd' => 123,
'channels' => [
],
'ai' => [
],
'external_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-API-Key: <api-key>"
],
]);
$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://compute.x402layer.cc/pods/v1/pods/{id}/clone"
payload := strings.NewReader("{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<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://compute.x402layer.cc/pods/v1/pods/{id}/clone")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.x402layer.cc/pods/v1/pods/{id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"passphrase\": \"<string>\",\n \"backup_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"term_hours\": 25,\n \"region\": \"<string>\",\n \"max_total_usd\": 123,\n \"channels\": {},\n \"ai\": {},\n \"external_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"pod": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"external_ref": "<string>",
"status": "provisioning",
"tier": "starter",
"model": "<string>",
"ai": {
"mode": "managed"
},
"capabilities": {
"endpoint": true,
"wallet": true,
"platform_tools": true,
"connectors": true,
"channels": true,
"scheduler": true,
"backups": true
},
"endpoint": {
"base_url": "https://compute.x402layer.cc/pods/{id}/v1"
},
"billing": {
"expires_at": "2023-11-07T05:31:56Z",
"auto_renew": true,
"is_trial": true
},
"customization": {
"agent_identity": "<string>",
"agent_instructions": "<string>",
"heartbeat_prompt": "<string>"
},
"agent_heartbeat_minutes": 720,
"created_at": "2023-11-07T05:31:56Z"
},
"clone": {
"source_pod_id": "<string>",
"backup_id": "<string>",
"restore": {
"status": "pending",
"message": "<string>"
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
A compute API key (x402c_...). Mint one in the dashboard under Settings -> API Keys. A signed-in compute session also works. Wallet signatures do not: they are bound to method+path+body and do not survive the internal hop, so signature callers must use the dashboard routes instead. Two extra scopes gate the dangerous powers: pods:wallet:write (pod wallet money, backup passphrase) and pods:control:write (connectors, full-power control socket).
Body
Response
Pod created (replay: 200). Same body as create, plus clone: {source_pod_id, backup_id, restore: {status, message}}.
Was this page helpful?
