Project Lifecycle
Use these API calls before you create workloads, scenarios, benchmark runs, or reports. This page also covers the project editor RPCs: read a saved project, save every workload in one transaction, check a run before it starts, and copy a project.
Set these environment variables for the examples:
export METRUM_API_URL="https://<control-plane-host>/api/postgrest"
export METRUM_JWT_TOKEN="<personal-access-token>"
export METRUM_ACCOUNT_ID="<account-uuid>"
export METRUM_ORG_ID="<org-uuid>"
METRUM_ACCOUNT_ID is the account_id claim in your token. METRUM_ORG_ID
is a workspace that get_current_user_context lists for you. For a
self-hosted stack that exposes PostgREST directly, set METRUM_API_URL to the
PostgREST URL instead.
Rules That Apply To Every Project RPC
A project that has run cannot be changed
A project counts as run once it starts any execution: a run, a job, a queued distributed KV workload, a cloud benchmark execution, or a cloud provisioning request. The platform records the first execution once and keeps the record after you delete the runs. A start that the server refuses and rolls back does not count.
Every RPC that changes a project's configuration refuses a project that has
run. To change such a project, copy it with copy_project and change the copy.
| RPC | How it refuses |
|---|---|
update_project, update_workload, delete_workload, update_scenario_by_code, delete_scenario_by_code | Raises project_executed |
create_workload, create_workload_v2, attach_workload_to_project, create_scenario, update_scenario | Raises project_executed |
create_kyai_workload, create_kyai_scenario | Raises project_executed |
update_project_config | Raises project_executed |
save_project_config with p_save_as_new false | Raises project_executed |
The refusal is an HTTP 400 response with this body:
{
"code": "P0001",
"details": null,
"hint": "This project has run, so it cannot be changed. Copy it with \"benchctl project copy\" or Save as New in the project editor, then change the copy.",
"message": "project_executed"
}
save_project_config uses the same message and code with a shorter hint:
This project has run, so it cannot be changed. Save your changes as a new project.
The MCP tools create_workload, create_scenario, create_kyai_workload, and
create_kyai_scenario call these RPCs, so they fail in the same way. Use the MCP tool copy_project
to make a copy you can change.
Execution RPCs, such as execute_project_run and execute_scenario, do not
change the configuration and still run a project that has run before.
Project names resolve to the exact name first
Project names are unique per owner exactly as stored, but name lookups ignore leading and trailing spaces. When two of your projects differ only by those spaces, a name lookup picks the exact name first, then the oldest project. A lookup across every project you can access picks the exact name, then a project you own, then the newest project.
To avoid any name match, pass the project UUID (p_project_uuid) to the RPCs
that accept it: execute_project_run, create_kyai_generation_run,
create_agentic_bench_multinode_run, and every project editor RPC on this
page. list_projects and get_project_by_name return project_uuid.
Errors
Most project RPCs report errors in one of two ways:
| Form | What you receive |
|---|---|
| Raised error | A non-2xx response with a PostgREST error body: code (SQLSTATE), message, details, hint. |
| Error object | A JSON object with an error key. Older RPCs such as create_project, get_project_by_name, and execute_project_run use this form for most validation failures. |
The status of an error object depends on the base URL:
| Base URL | Response |
|---|---|
Hosted /api/postgrest | HTTP 400 with {"message": "<the error text>", "code": "RPC_ERROR"}. The proxy keeps only the error text. |
| Self-hosted PostgREST | HTTP 200 with the whole object. |
PostgREST maps the SQLSTATE of a raised error to the HTTP status:
code | Meaning | HTTP status |
|---|---|---|
P0001 | Raised with no specific code, such as project_executed | 400 |
22023 | Invalid parameter value | 400 |
42501 | Insufficient privilege, including a Casbin denial | 403 |
23505 | Unique violation, such as project_name_taken | 409 |
PT404 | Not found, such as Project not found from the project editor RPCs | 404 |
P0002 | No data found, raised by older RPCs | 500 |
PGRST202 | PostgREST found no function with this name and these parameter names | 404 |
The project editor RPCs answer a missing project with PT404 and HTTP 404.
PostgREST returns HTTP 500 for P0002, which some older RPCs still raise, so
read the code field, not only the status.
Current User Context
Returns the account and organization context used by later runbook calls.
curl -fsS -X POST "$METRUM_API_URL/rpc/get_current_user_context" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"p_account_id\":\"$METRUM_ACCOUNT_ID\"}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | Account UUID for the caller. |
List Projects
Lists projects visible to the caller.
curl -fsS -X POST "$METRUM_API_URL/rpc/list_projects" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"p_account_id\":\"$METRUM_ACCOUNT_ID\",\"p_include_shared\":true}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | Account UUID for the caller. |
p_include_shared | boolean | No | Include projects shared with the caller. Default true. |
Returns a JSON array, newest first. Each element has project_id,
project_uuid, owner_account_id, project_name, visibility_code,
visibility_name, created_at, is_owner, and is_shared.
Permission: project:read. The owner, admin, member, and viewer roles hold it.
Get Project By Name
Returns one project by owner and exact name, including the UUID that
copy_project and the other project-by-id RPCs take.
curl -fsS -X POST "$METRUM_API_URL/rpc/get_project_by_name" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_owner_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_project_name\":\"deepseek-qwen15b-rtxpro6000-smoke\"
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | The caller. The caller must be able to access the project. |
p_owner_account_id | uuid | Yes | The project owner. |
p_project_name | text | Yes | The project name, matched exactly. |
Returns a JSON object:
| Field | Type | Description |
|---|---|---|
project_id | integer | Internal project id. |
project_uuid | uuid | Project UUID. Pass it to copy_project and the project editor RPCs. |
owner_account_id | uuid | Project owner. |
created_by_account_id | uuid | Account that created the project. |
project_name | text | Project name. |
visibility_code | text | private or org. |
visibility_name | text | Display name of the visibility. |
created_at | timestamptz | Creation time. |
Errors, as an error object:
error | Cause |
|---|---|
Project not found | The owner has no project with this exact name. |
Forbidden | The caller cannot access the project. |
Permission: project:read.
Create Project
Creates a benchmark project.
curl -fsS -X POST "$METRUM_API_URL/rpc/create_project" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_owner_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_project_name\":\"deepseek-qwen15b-rtxpro6000-smoke\",
\"p_visibility_code\":\"private\",
\"p_created_by_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\"
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_owner_account_id | uuid | Yes | Account UUID that owns the project. |
p_project_name | text | Yes | Human-readable project name. Use a stable, unique name for the benchmark campaign. |
p_visibility_code | text | Yes | private or org. A Team project uses org. |
p_created_by_account_id | uuid | No | Account UUID creating the project. Defaults to the owner. |
p_org_id | uuid | No | Workspace that holds the project. A run checks the plan of this workspace, so set it. |
Permission: project:write. The owner, admin, and member roles hold it.
Query Project Runs
Lists run status for a project from the run status view.
curl -fsS "$METRUM_API_URL/v_project_runs_with_status?project_name=eq.deepseek-qwen15b-rtxpro6000-smoke&limit=50" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" | jq
Query parameters:
| Name | Required | Description |
|---|---|---|
project_name | No | Use eq.<name> to filter by project name. |
current_status | No | Use eq.<status> to filter by current run status. |
limit | No | Maximum rows to return. |
Read A Saved Project
The project editor reads a saved project with three RPCs. Each one takes the same three parameters.
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | The caller. It must match the account in your token. |
p_org_id | uuid | No | Workspace of the project. When you pass it, the project must belong to it. |
p_project_uuid | uuid | Yes | The project. |
All three raise the same errors:
| SQLSTATE | message | Cause |
|---|---|---|
22023 | p_account_id and p_project_uuid are required | A required parameter is missing. |
42501 | Caller ... is not authorized to act on behalf of account ... | p_account_id is not the account in your token. |
PT404 | Project not found | No such project in p_org_id, or you cannot access it. HTTP 404. |
Permission: project:read.
get_project_edit_state
Returns whether a project has run, its configuration revision, whether you can update it in place, and the project it was copied from.
curl -fsS -X POST "$METRUM_API_URL/rpc/get_project_edit_state" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_project_uuid\":\"<project-uuid>\"
}" | jq
Returns one row:
| Column | Type | Description |
|---|---|---|
project_uuid | uuid | The project. |
project_name | varchar | Name as stored. |
visibility_code | varchar | private or org. |
owner_account_id | uuid | Project owner. |
has_executed | boolean | true once the project has started any execution. It stays true after the runs are deleted. |
first_executed_at | timestamptz | When the first execution committed. null for a project that never ran. |
config_revision | integer | Count of in-place saves. Send it back as p_expected_revision to save_project_config. |
can_write | boolean | Whether you can update the project in place. |
copied_from_project_uuid | uuid | The project this one was saved from. null when there is none, or when you cannot open the source. |
copied_from_project_name | varchar | Name of that source, under the same condition. |
list_project_edit_workloads
Returns one row per workload, with the saved values that the generic workload views do not carry.
curl -fsS -X POST "$METRUM_API_URL/rpc/list_project_edit_workloads" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_project_uuid\":\"<project-uuid>\"
}" | jq
| Column | Type | Description |
|---|---|---|
workload_id | integer | Internal workload id. |
workload_code | varchar | Workload code. |
tool_code | varchar | Benchmark tool, for example metrumbench-llm or multiroundqa. |
tool_args_set_code | varchar | Tool settings preset. |
lmcache_framework_version | varchar | Cache server version of the KV cache settings set. |
deployment_mode_code | varchar | Deployment mode, for example k8s_multinode_llm_d. |
node_group_cluster_group_ids | integer[] | Cluster groups of an llm-d workload. |
node_group_selection_names | varchar[] | Names of those selections, in the same order. |
target_server_ids | integer[] | Saved machines. |
target_gpu_counts | integer[] | GPU count per saved machine, in the same order. |
byoe_endpoint_code | varchar | Endpoint code of a BYOE (your own endpoint) workload. |
byoe_endpoint_name | varchar | Endpoint name. |
byoe_endpoint_owner_account_id | uuid | Endpoint owner. |
byoe_api_base_url | varchar | Endpoint base URL. |
byoe_model_identifier | varchar | Model name the endpoint serves. |
byoe_provider_code | varchar | Endpoint provider. |
byoe_transport_code | varchar | Endpoint transport. |
byoe_healthcheck_path | varchar | Health check path. |
byoe_max_concurrent_requests | integer | Request limit of the endpoint. |
byoe_has_api_key | boolean | Whether an API key is stored. The key itself is never returned. |
list_project_edit_scenarios
Returns every saved scenario of the project exactly as stored, with every tool setting.
curl -fsS -X POST "$METRUM_API_URL/rpc/list_project_edit_scenarios" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_project_uuid\":\"<project-uuid>\"
}" | jq
| Column | Type | Description |
|---|---|---|
workload_id | integer | Workload the scenario belongs to. |
scenario_code | varchar | Scenario code. |
scenario_name | varchar | Scenario name. |
concurrency | integer | Concurrent requests. |
input_sequence_length | integer | Input tokens. |
output_sequence_length | integer | Output tokens. |
max_tokens | integer | Maximum tokens per response. |
num_images_batch | integer | Images per request. |
image_detail | varchar | Image detail level. |
num_requests | integer | Requests to send. |
num_prompts | integer | Prompts to use. |
dataset_name | varchar | Dataset name. |
streaming | boolean | Whether responses stream. |
snapshot_code | varchar | KYAI dataset. |
kyai_builtin_set_code | varchar | KYAI built-in question set. |
generation_system_prompt_code | varchar | KYAI generation prompt saved with this workload. |
judge_system_prompt_code | varchar | KYAI judge prompt saved with this workload. |
param_keys | varchar[] | Names of every saved tool setting. |
param_values | text[] | Values of those settings, in the same order. |
save_project_config
Saves a whole project in one transaction. The call creates a project, updates a project that never ran in place, or saves a new project from an existing one. Any failure rolls back the whole save.
curl -fsS -X POST "$METRUM_API_URL/rpc/save_project_config" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_project_uuid\":null,
\"p_save_as_new\":false,
\"p_expected_revision\":null,
\"p_payload\":{
\"project_name\":\"qwen3-8b-l40s-sweep\",
\"visibility_code\":\"org\",
\"workloads\":[{
\"type\":\"benchmark\",
\"workload_code\":\"qwen3-8b-vllm\",
\"workload_name\":\"Qwen3 8B on vLLM\",
\"tool_code\":\"metrumbench-llm\",
\"model_codes\":[\"<model-code>\"],
\"framework_code\":\"vllm\",
\"version\":\"<framework-version>\",
\"target_selections\":[{\"server_id\":<server-id>,\"gpu_count\":1}],
\"scenarios\":[{
\"scenario_code\":\"c8-isl512-osl256\",
\"concurrency\":8,
\"input_sequence_length\":512,
\"output_sequence_length\":256,
\"num_requests\":100
}]
}]
}
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | The caller. It must match the account in your token. |
p_org_id | uuid | No | Workspace. A created project goes into it. A copy goes into the source project's workspace. For an existing project, the project must belong to it. |
p_project_uuid | uuid | No | null creates a project. A UUID names the project to update or to copy from. |
p_save_as_new | boolean | No | With a p_project_uuid: false updates that project in place, true saves a new project. |
p_expected_revision | integer | For an in-place update | The config_revision from get_project_edit_state. A different value raises project_changed. |
p_payload | json | Yes | The project and its workloads. See the payload reference below. |
What each combination does:
p_project_uuid | p_save_as_new | Result | saved_as |
|---|---|---|---|
null | any | Creates a project owned by you. | created |
| A project that never ran | false | Updates the project in place and adds 1 to config_revision. | updated |
| Any project you can open | true | Saves a new project owned by you, linked to the source. An unchanged name becomes <name> (copy), then <name> (copy 2), and so on. | copied |
Returns one row:
| Column | Type | Description |
|---|---|---|
project_id | integer | Internal project id. |
project_uuid | uuid | The saved project. |
project_name | varchar | Its name. |
saved_as | varchar | created, updated, or copied. |
config_revision | integer | Revision after the save. |
requested_workload_codes | varchar[] | Workload codes you sent, in order. |
saved_workload_codes | varchar[] | Codes the workloads were saved under, in the same order. A code differs only when you already use it for a different workload definition in another project. |
Errors:
| SQLSTATE | message | Cause |
|---|---|---|
22023 | p_account_id is required, project_name is required, workload_code is required | A required value is missing. |
22023 | Visibility not found: ..., Unknown workload type: ... | An unknown code. |
22023 | Machine ... is not in this organization | A target machine belongs to another workspace. |
22023 | The build profile "..." is no longer offered. ... | The workload names a retired build profile. |
42501 | Caller ... is not authorized ... | p_account_id is not the account in your token. |
42501 | Access denied | You cannot write the project in place. |
PT404 | Project not found | No such project, or you cannot open it. HTTP 404. |
P0001 | project_executed | The in-place update targets a project that has run. Set p_save_as_new to true. |
P0001 | project_changed | Someone saved the project after you read it. The hint says to reload. |
23505 | project_name_taken | The owner already has a project with this name. |
P0001 | Workload "...": ... | A workload failed to build. The message names the workload and the reason. |
Permission: project:write. The owner, admin, and member roles hold it.
Payload reference
p_payload is a JSON object:
| Field | Type | Required | Description |
|---|---|---|---|
project_name | text | Yes | Project name. Leading and trailing spaces are removed. |
visibility_code | text | No | private (default) or org. |
workloads | array | Yes | One object per workload. type selects the shape. |
Every workload has type, workload_code (required), workload_name, and
target_selections. target_selections is an array of
{"server_id": <integer>, "gpu_count": <integer or null>}. Each machine must
belong to the project's workspace.
type: "benchmark" covers every managed benchmark tool: MetrumBench LLM, VLM,
ASR and ImageGen, GenAI-Perf, InferenceX, KV Cache Offload (multiroundqa),
distributed KV cache, and llm-d.
| Field | Type | Description |
|---|---|---|
tool_code | text | Benchmark tool. Default metrumbench-llm. |
model_codes | text[] | One or more models. Required. |
framework_code, version | text | Engine and engine version. |
engine_args_set_code | text | Engine arguments set. |
tool_args_set_code | text | Tool settings preset. |
framework_profile_code | text | Build profile. |
prompt_source_id | integer | Prompt source. |
imagegen_snapshot_code | text | ImageGen prompt set. Defaults to metrumbench-imagegen-smoke-prompts-v1 for metrumbench-imagegen. |
asr_snapshot_code | text | ASR audio set. |
kv_cache_tier_code | text | KV Cache Offload tier, for example gpu, cpu, or nvme. list_kv_cache_tiers_for_recipe lists the tiers for a tool and engine. |
lmcache_engine_args_set_code, lmcache_framework_version | text | Cache server settings for the cpu and nvme tiers. |
node_group_selections | array | llm-d cluster groups: {"cluster_group_id": <integer>, "selection_name": "<name>"}. Setting any makes the workload an llm-d workload. |
distributed_kv | object | Distributed KV cache settings. See Distributed KV Cache. |
scenarios | array | Scenarios, saved exactly as sent. |
Each scenario object takes scenario_code (required), scenario_name,
concurrency, input_sequence_length, output_sequence_length,
max_tokens, num_images_batch, image_detail, num_requests,
num_prompts, dataset_name, streaming, and job_params. job_params is
an object of tool setting names to values, for example {"num_rounds": "3"}
for KV Cache Offload or {"size": "1024x1024"} for ImageGen.
type: "byoe" runs MetrumBench LLM against your own endpoint:
| Field | Type | Description |
|---|---|---|
endpoint_code | text | An active endpoint that the project owner owns. The web app creates endpoints, because it encrypts the API key outside the database. |
target_selections | array | The machine that sends the load. |
scenarios | array | Same shape as a benchmark scenario. |
type: "kyai" builds one KYAI workload for one candidate endpoint:
| Field | Type | Description |
|---|---|---|
candidate_endpoint_code | text | Candidate endpoint. |
judge_config_code | text | Judge configuration. |
judge_max_concurrent_requests_override | integer | Judge concurrency for this workload. |
scenarios | array | One per dataset: scenario_code, scenario_name, snapshot_code or kyai_builtin_set_code, generation_system_prompt_code, judge_system_prompt_code, and job_params (num_samples, batch_size, max_concurrent_requests, max_tokens, candidate_system_prompt). |
A KYAI run reads the generation and judge prompts saved here before the prompts on the shared dataset template.
type: "agentic_bench" builds one Agentic Bench workload. p_org_id or the
source project must name a workspace.
| Field | Type | Description |
|---|---|---|
model_code, version | text | Model and engine version. Required. |
framework_code | text | Engine. Default vllm. |
framework_profile_code | text | Build profile. |
tensor_parallel_size, pipeline_parallel_size | integer | Parallelism. Pipeline parallel size defaults to 1. |
extra_arg_keys, extra_arg_values | text[] | Extra engine arguments, in matching order. |
settings | object | Saved run settings: dataset_ref, task_codes, cluster_group_code, concurrency_levels, trials_per_task, agent_timeout_multiplier, min_pass_rate_threshold, min_gpu_busy_ratio_threshold, agent_deadline_seconds, sandbox_cpu_mode (default unpinned), and cpu_lists ({"server_id": <integer>, "cpu_list": "<list>"}). |
preflight_project_run
Checks a project payload before a run, without writing anything. It takes the
same payload as save_project_config. Call it before you save and run, so a
run that cannot start saves nothing.
curl -fsS -X POST "$METRUM_API_URL/rpc/preflight_project_run" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_payload\":{\"project_name\":\"qwen3-8b-l40s-sweep\",\"workloads\":[]}
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | The caller. It must match the account in your token. |
p_org_id | uuid | Yes | Workspace whose plan, machines, and endpoints the checks read. You must belong to it. |
p_payload | json | Yes | The save_project_config payload. Only workloads is read. |
Returns one row per problem. No rows means every check passed.
| Column | Type | Description |
|---|---|---|
workload_code | varchar | Workload with the problem. |
check_code | varchar | Which check failed. See the next table. |
severity | varchar | block stops the run. note informs only. |
step_code | varchar | Editor step to fix: model, engine, hardware, or judge. |
message | text | A sentence to show a person. |
check_code | Severity | Meaning |
|---|---|---|
not_in_plan | block | The workspace plan does not include the tool or distributed KV cache. Skipped in dev mode. |
retired_option | block | The workload names a retired build profile. |
no_hardware | block | No machine, or no cluster group in this workspace, for a workload that needs one. |
endpoint_unavailable | block | The KYAI candidate endpoint is inactive or not available to you. |
judge_unavailable | block | The KYAI judge is inactive or not available to you. |
machine_not_in_org | block | A machine is not in the workspace. |
machine_not_ready | block | A machine fails a readiness check. |
gpu_count_too_high | block | The GPU count is larger than the machine has. |
gpu_vendor_unsupported | block | The engine version does not run on the machine's GPU vendor. |
cluster_busy | note | Another run uses the distributed KV cluster group. This run waits in its queue. |
Errors:
| SQLSTATE | message | Cause |
|---|---|---|
22023 | p_account_id and p_org_id are required | A required parameter is missing. |
42501 | Access denied | You do not belong to the workspace. |
42501 | Caller ... is not authorized ... | p_account_id is not the account in your token. |
Permission: project:read.
copy_project
Saves a new project from an existing one with every workload, scenario, and saved setting. The copy is the same as Save as New in the editor with no edits. Use it to change a project that has run.
curl -fsS -X POST "$METRUM_API_URL/rpc/copy_project" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_org_id\":\"$METRUM_ORG_ID\",
\"p_project_uuid\":\"<project-uuid>\",
\"p_project_name\":\"qwen3-8b-l40s-sweep v2\"
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_account_id | uuid | Yes | The caller. You own the copy. |
p_org_id | uuid | No | Workspace of the source project. When you pass it, the source must belong to it. |
p_project_uuid | uuid | Yes | The project to copy. You must be able to open it. |
p_project_name | varchar | No | Name of the copy. Without it, the copy is named <name> (copy), then <name> (copy 2), and so on. |
Returns the same row as save_project_config, with saved_as set to
copied. The copy records its source, which get_project_edit_state returns
as copied_from_project_uuid.
Errors: the errors of the read RPCs above, plus the save_project_config
errors for building workloads. A BYOE workload fails with
Endpoint "..." was not found for the project owner when you do not own the
source endpoint. The hint asks you to enter the endpoint details again.
Permission: project:write.
The MCP tool copy_project calls this RPC. Its arguments are project_uuid
(required), new_name, account_id, and org_id. Without org_id, the tool
sends your default workspace, so pass org_id to copy a project from another
workspace. The CLI command is benchctl project copy.
execute_project_run
Starts a run of a whole project, or of one workload. Pass p_project_uuid, so
the run goes to the project you named and never to a project of the same name.
curl -fsS -X POST "$METRUM_API_URL/rpc/execute_project_run" \
-H "Authorization: Bearer $METRUM_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"p_owner_account_id\":\"$METRUM_ACCOUNT_ID\",
\"p_project_name\":\"qwen3-8b-l40s-sweep\",
\"p_project_uuid\":\"<project-uuid>\",
\"p_run_name\":\"qwen3-8b-l40s-sweep-run-1\",
\"p_server_config_instance_id\":<server-id>
}" | jq
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
p_owner_account_id | uuid | Yes | The caller. It must match the account in your token. |
p_project_name | varchar | Yes | Project name. Used only when p_project_uuid is absent. |
p_run_name | varchar | Yes | Run name. |
p_project_uuid | uuid | No | The project. A UUID that does not resolve returns Project not found; the call never falls back to the name. |
p_server_config_instance_id | integer | No | Target machine. Omit it for an llm-d or distributed KV workload, which runs on its cluster group. |
p_server_id | integer | No | Older alias of p_server_config_instance_id. |
p_workload_code | varchar | No | Run one workload only. |
p_run_description | text | No | Run description. |
p_manage_model_server | boolean | No | Whether the agent starts and stops the model server. Default true. |
p_hf_token_id | integer | No | Hugging Face token to use. Defaults to your default active token. |
p_execution_group_id | uuid | No | Groups several runs under one monitoring row. |
p_gpu_count | integer | No | GPU limit for the run. |
Returns a JSON object with run_id, project_id, project_name,
run_name, server_config_instance_id, status, jobs_created, job_ids,
scenarios_found, execution_group_id, and execution_label. A project
with a distributed KV workload returns more fields. See
Distributed KV Cache.
Errors, as an error object: Project not found,
Server does not belong to this organization,
Server config instance not found, No runnable scenarios found for project,
Mixed-workload run setting conflict, Failed to prepare model server contract,
No jobs were created for project run, and
Failed to execute scenario for project run. When the workspace plan does
not include a tool, the job insert raises P0002 (HTTP 500) with
... is not included in your current plan, so this run was not started.
Permission: project:execute. The owner, admin, and member roles hold it.