curl -X POST "$ATAI_API_URL/api/agents/blueprints/red/copy" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection"
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/agents/blueprints/red/copy",
headers={"Authorization": f"Bearer {api_key}"},
json={
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
},
)
if response.status_code == 201:
copy = response.json()
print(f"Copied {copy['source']['blueprint_key']} to {copy['blueprint_key']} ({copy['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/agents/blueprints/red/copy`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
project_id: 'prj_01jcd4m8t2vq6xn3r7k5hbzw9e',
blueprint_key: 'line3-red',
name: 'Line 3 rare event detection'
})
}
);
const body = await response.json();
if (response.status === 201) {
console.log(`Copied ${body.source.blueprint_key} to ${body.blueprint_key} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
"description": "Detects rare events in sensor streams.",
"document": {
"blueprint_id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"name": "Line 3 rare event detection",
"graph": {"edges": []},
"values": {},
"artifacts": {}
},
"is_canonical": false,
"is_active": true,
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"source": {
"kind": "copy",
"blueprint_id": "blp_01jc9p4r8t2vx6mk3n5hqdzw7a",
"blueprint_key": "red"
},
"created_at": "2026-10-28T09:20:31Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid reference, key or name.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Read-only access to the project.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Blueprint or project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The key is already in use.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Blueprints
Copy Blueprint
Copy any blueprint you can see into a project, under a new key
POST
/
api
/
agents
/
blueprints
/
{reference}
/
copy
curl -X POST "$ATAI_API_URL/api/agents/blueprints/red/copy" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection"
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/agents/blueprints/red/copy",
headers={"Authorization": f"Bearer {api_key}"},
json={
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
},
)
if response.status_code == 201:
copy = response.json()
print(f"Copied {copy['source']['blueprint_key']} to {copy['blueprint_key']} ({copy['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/agents/blueprints/red/copy`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
project_id: 'prj_01jcd4m8t2vq6xn3r7k5hbzw9e',
blueprint_key: 'line3-red',
name: 'Line 3 rare event detection'
})
}
);
const body = await response.json();
if (response.status === 201) {
console.log(`Copied ${body.source.blueprint_key} to ${body.blueprint_key} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
"description": "Detects rare events in sensor streams.",
"document": {
"blueprint_id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"name": "Line 3 rare event detection",
"graph": {"edges": []},
"values": {},
"artifacts": {}
},
"is_canonical": false,
"is_active": true,
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"source": {
"kind": "copy",
"blueprint_id": "blp_01jc9p4r8t2vx6mk3n5hqdzw7a",
"blueprint_key": "red"
},
"created_at": "2026-10-28T09:20:31Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid reference, key or name.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Read-only access to the project.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Blueprint or project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The key is already in use.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 2.0.0 or later of the Archetype platform.
Overview
This endpoint copies a blueprint into a project. The copy is a new blueprint with its ownblp_ id, registered in the project under blueprint_key. It has the
same document as the original, apart from name and description when you give them, and a
source of kind copy that names the original.
Any blueprint you can see can be copied: a platform one, one of your organization’s, or one in a
project, including the target project itself. Copying is how you reuse a blueprint in a project,
since a blueprint’s project is fixed when it is created.
The original is named as in Get Blueprint: a
blp_ id copies that exact version, and a key copies its active version. A key registered in a
project resolves only when source_project_id names that project. Either way, the copy’s source
records the exact version copied.
Request
string
required
The blueprint to copy: a
blp_ id or a key (e.g. osm).string
required
The
prj_ id of the project to copy the blueprint into, which you must be able to modify.string
required
The copy’s key. Must not be in use in the project, by the organization’s blueprints outside
projects, or by a platform blueprint.
string
The copy’s display name. Defaults to the original’s.
string
The copy’s description. Defaults to the original’s.
string
The
prj_ id of the project to resolve the blueprint’s key in, as well as outside projects.
Needed to copy a blueprint registered in a project by its key, even into that same project;
ignored for a blp_ id.Response
Returns201 Created with the copy, in the same shape as Get
Blueprint.
string
required
TypeID-encoded identifier of the copy (
blp_ prefix).string
required
The key the copy was registered under.
string
required
Display name of the copy.
string
required
Description of the copy. Empty when it has none.
object
required
The blueprint document, copied from the original and carrying the copy’s
blueprint_id.boolean
required
Always
false: a copy belongs to your organization.boolean
required
true for the current version of a key.string
required
The project the copy lives in; this is the
project_id you specified when calling this endpoint.object
required
The origin of the copy:
kind is copy, blueprint_id is the exact version copied, and
blueprint_key is that blueprint’s key when it was copied.string
required
Creation timestamp (date-time).
curl -X POST "$ATAI_API_URL/api/agents/blueprints/red/copy" \
-H "Authorization: Bearer $ATAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection"
}'
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
response = requests.post(
f"{base_url}/api/agents/blueprints/red/copy",
headers={"Authorization": f"Bearer {api_key}"},
json={
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
},
)
if response.status_code == 201:
copy = response.json()
print(f"Copied {copy['source']['blueprint_key']} to {copy['blueprint_key']} ({copy['id']})")
else:
print(f"Error: {response.json()['errors']}")
const response = await fetch(
`${process.env.ATAI_API_URL}/api/agents/blueprints/red/copy`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
project_id: 'prj_01jcd4m8t2vq6xn3r7k5hbzw9e',
blueprint_key: 'line3-red',
name: 'Line 3 rare event detection'
})
}
);
const body = await response.json();
if (response.status === 201) {
console.log(`Copied ${body.source.blueprint_key} to ${body.blueprint_key} (${body.id})`);
} else {
console.error('Error:', body.errors);
}
{
"id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"blueprint_key": "line3-red",
"name": "Line 3 rare event detection",
"description": "Detects rare events in sensor streams.",
"document": {
"blueprint_id": "blp_01jcd5q2w7k9vt4mx6n3rhzy8b",
"name": "Line 3 rare event detection",
"graph": {"edges": []},
"values": {},
"artifacts": {}
},
"is_canonical": false,
"is_active": true,
"project_id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"source": {
"kind": "copy",
"blueprint_id": "blp_01jc9p4r8t2vx6mk3n5hqdzw7a",
"blueprint_key": "red"
},
"created_at": "2026-10-28T09:20:31Z"
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid reference, key or name.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Read-only access to the project.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "Blueprint or project not found.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "<error_code>",
"message": "The key is already in use.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Important Notes
- Copying is open to every role that can modify the target project, not only admins. Registering a blueprint into a project with Create Blueprint requires the admin role.
- In the free trial, only the platform blueprints the trial includes can be copied. Any other returns
403with codecapability_locked. - A
403without that code means you have read-only access to the target project. - A
404means the blueprint, the project, or the source project does not exist or is not visible to you. - A
409meansblueprint_keyis already in use in the project, by your organization’s blueprints outside projects, or by a platform blueprint.
Was this page helpful?