Blue Guardrails

Acquire Lease

POST
/v1/optimization-runs/{run_id}/lease

Acquire the committed starting lease.

Path Parameters

run_id*Run Id
Formatuuid

Header Parameters

x-workspace-id?|

Workspace UUID for session-authenticated calls.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Lease acquisition input.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/optimization-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/lease" \  -H "Content-Type: application/json" \  -d '{    "lease_id": "2bb93227-93ec-4b58-a0aa-93b5a1121b74",    "launch_name": "string"  }'
{  "lease_id": "2bb93227-93ec-4b58-a0aa-93b5a1121b74",  "lease_expires_at": "2019-08-24T14:15:22Z",  "run": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "agent_config_tree": {      "root": {        "agent_id": "string",        "agent_model": "standard",        "description": "",        "system_prompt": "",        "skills": [          "string"        ],        "tools": [          "string"        ],        "builtin_tool_keys": [          "string"        ],        "subagents": {          "property1": {},          "property2": {}        }      }    },    "tool_grants": [      {        "selected_tool_ref": "dff2cd6c-1c33-4dc1-84a3-718a008a8abf",        "name": "string",        "description": "string",        "input_schema": {},        "output_schema": {}      }    ],    "goal": "string",    "config": {      "agent_model": "standard",      "evaluator_id": "92c2c259-25b9-47e2-bc3b-bd161a87f750",      "models_in_scope": [        "string"      ],      "max_experiments": 0    },    "experiment_scope_conversation_ids": [      "67ce11e2-5c14-47c2-b460-a8052df6d420"    ],    "skills": [      {        "name": "string",        "description": "string",        "skill_md": "string",        "skill_md_sha256": "string",        "package_sha256": "string",        "size_bytes": 0,        "builtin_tool_keys": [          "string"        ],        "references": [          {            "path": "string",            "content": "string",            "sha256": "string",            "size_bytes": 0          }        ]      }    ]  },  "usage": {    "agent_turns": 0,    "agent_input_tokens": 0,    "agent_cached_input_tokens": 0,    "agent_output_tokens": 0,    "agent_reasoning_tokens": 0,    "experiments_created": 0,    "agent_spent_usd": "string",    "experiment_spent_usd": "string"  },  "artifacts": {    "dataset": {      "download_url": "string",      "sha256": "string",      "expires_at": "2019-08-24T14:15:22Z"    },    "checkpoint": {      "download_url": "string",      "sha256": "string",      "expires_at": "2019-08-24T14:15:22Z"    },    "experiment_results": [      {        "experiment_id": "916afd89-cac5-4339-9c59-dd068abdfa69",        "build_id": "bfb1f3fa-bf7b-43a5-9e0b-26cc050e44cb",        "status": "completed",        "artifact": {          "download_url": "string",          "sha256": "string",          "expires_at": "2019-08-24T14:15:22Z"        }      }    ],    "checkpoint_upload": {      "upload_url": "string",      "expires_at": "2019-08-24T14:15:22Z"    }  }}