{
    "info": {
        "description": "REST API for management of Baseten resources",
        "title": "Baseten management API",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.baseten.co"
        }
    ],
    "security": [
        {
            "ApiKeyAuth": []
        }
    ],
    "paths": {
        "/v1/secrets": {
            "get": {
                "summary": "Gets all secrets (metadata only, no plain text keys)",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/secrets \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/secrets\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SecretsV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Upserts a secret",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/secrets \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"my_secret\",\n  \"value\": \"my_secret_value\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/secrets\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'my_secret', 'value': 'my_secret_value'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates or updates a secret by name. Scoped to the caller's primary team \u2014 use the team-scoped variant to target a specific team.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertSecretRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SecretV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/{team_id}/secrets": {
            "get": {
                "summary": "Gets all secrets for a team (metadata only, no plain text keys)",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/teams/{team_id}/secrets \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/secrets\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SecretsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/team_id"
                }
            ],
            "post": {
                "summary": "Upserts a secret in a team",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/secrets \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"my_secret\",\n  \"value\": \"my_secret_value\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/secrets\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'my_secret', 'value': 'my_secret_value'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a new secret or updates an existing secret if one with the provided name already exists. The name and creation date of the created or updated secret is returned. This secret belongs to the specified team",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertSecretRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SecretV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams": {
            "get": {
                "summary": "Lists all teams",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/teams \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns a list of all teams the authenticated user has access to.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TeamsV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/instance_types": {
            "get": {
                "summary": "Gets all available instance types",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/instance_types \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/instance_types\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InstanceTypesV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/instance_type_prices": {
            "get": {
                "summary": "Gets prices for available instance types.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/instance_type_prices \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/instance_type_prices\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InstanceTypePricesV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/models": {
            "get": {
                "summary": "Gets all models",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelsV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/{team_id}/models": {
            "get": {
                "summary": "Gets all models",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/teams/{team_id}/models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/team_id"
                }
            ]
        },
        "/v1/models/{model_id}": {
            "delete": {
                "summary": "Deletes a model by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/models/{model_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ],
            "get": {
                "summary": "Gets a model by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/models/{model_id}/deployments": {
            "get": {
                "summary": "Gets all deployments of a model",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/development": {
            "get": {
                "summary": "Gets a model's development deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets a model's development deployment and returns the deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/production": {
            "get": {
                "summary": "Gets a model's production deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/production \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/production\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets a model's production deployment and returns the deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}": {
            "delete": {
                "summary": "Deletes a model's deployment by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes a model's deployment by ID and returns the tombstone of the deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ],
            "get": {
                "summary": "Gets a model's deployment by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets a model's deployment by ID and returns the deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/models/{model_id}/deployments/development/autoscaling_settings": {
            "patch": {
                "summary": "Updates a development deployment's autoscaling settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development/autoscaling_settings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"min_replica\": 0,\n  \"max_replica\": 7,\n  \"autoscaling_window\": 600,\n  \"scale_down_delay\": 120,\n  \"concurrency_target\": 2,\n  \"target_utilization_percentage\": 70,\n  \"target_in_flight_tokens\": 40000\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development/autoscaling_settings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'min_replica': 0, 'max_replica': 7, 'autoscaling_window': 600, 'scale_down_delay': 120, 'concurrency_target': 2, 'target_utilization_percentage': 70, 'target_in_flight_tokens': 40000}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a development deployment's autoscaling settings and returns the update status.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateAutoscalingSettingsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/production/autoscaling_settings": {
            "patch": {
                "summary": "Updates a production deployment's autoscaling settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/production/autoscaling_settings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"min_replica\": 0,\n  \"max_replica\": 7,\n  \"autoscaling_window\": 600,\n  \"scale_down_delay\": 120,\n  \"concurrency_target\": 2,\n  \"target_utilization_percentage\": 70,\n  \"target_in_flight_tokens\": 40000\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/production/autoscaling_settings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'min_replica': 0, 'max_replica': 7, 'autoscaling_window': 600, 'scale_down_delay': 120, 'concurrency_target': 2, 'target_utilization_percentage': 70, 'target_in_flight_tokens': 40000}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a production deployment's autoscaling settings and returns the update status.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateAutoscalingSettingsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/autoscaling_settings": {
            "patch": {
                "summary": "Updates a deployment's autoscaling settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/autoscaling_settings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"min_replica\": 0,\n  \"max_replica\": 7,\n  \"autoscaling_window\": 600,\n  \"scale_down_delay\": 120,\n  \"concurrency_target\": 2,\n  \"target_utilization_percentage\": 70,\n  \"target_in_flight_tokens\": 40000\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/autoscaling_settings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'min_replica': 0, 'max_replica': 7, 'autoscaling_window': 600, 'scale_down_delay': 120, 'concurrency_target': 2, 'target_utilization_percentage': 70, 'target_in_flight_tokens': 40000}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a deployment's autoscaling settings and returns the update status.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateAutoscalingSettingsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/development/promote": {
            "post": {
                "summary": "Promotes a development deployment to production",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development/promote \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"scale_down_previous_production\": true,\n  \"preserve_env_instance_type\": true\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development/promote\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'scale_down_previous_production': True, 'preserve_env_instance_type': True}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a new production deployment from the development deployment, the currently building deployment is returned.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PromoteRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/promote": {
            "post": {
                "summary": "Promotes a deployment to production",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/promote \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"scale_down_previous_production\": true,\n  \"preserve_env_instance_type\": true\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/promote\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'scale_down_previous_production': True, 'preserve_env_instance_type': True}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Promotes an existing deployment to production and returns the same deployment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PromoteRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/development/activate": {
            "post": {
                "summary": "Activates a development deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development/activate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development/activate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Activates an inactive development deployment and returns the activation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ActivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/production/activate": {
            "post": {
                "summary": "Activates a production deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/production/activate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/production/activate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Activates an inactive production deployment and returns the activation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ActivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/activate": {
            "post": {
                "summary": "Activates a deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/activate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/activate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Activates an inactive deployment and returns the activation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ActivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/development/deactivate": {
            "post": {
                "summary": "Deactivates a development deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deactivates a development deployment and returns the deactivation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/production/deactivate": {
            "post": {
                "summary": "Deactivates a production deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/production/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/production/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deactivates a production deployment and returns the deactivation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/deactivate": {
            "post": {
                "summary": "Deactivates a deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deactivates a deployment and returns the deactivation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/development/retry": {
            "post": {
                "summary": "Retries a failed development deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/development/retry \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/development/retry\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Retries a failed development deployment and returns the retry status and updated deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RetryDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/production/retry": {
            "post": {
                "summary": "Retries a failed production deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/production/retry \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/production/retry\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Retries a failed production deployment and returns the retry status and updated deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RetryDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/retry": {
            "post": {
                "summary": "Retries a failed deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/retry \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/retry\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Retries a failed deployment and returns the retry status and updated deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RetryDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/download": {
            "get": {
                "summary": "Gets a presigned download URL for a deployment's truss",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/download \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/download\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets a presigned URL to download the truss tar file for a deployment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DownloadDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/config": {
            "get": {
                "summary": "Gets a deployment's config",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/config \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/config\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns the deployment's config. `output_format` query param picks the shape: 'raw' (config.yaml text), 'parsed' (dict with defaults), or 'both' (default).",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentConfigResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/logs": {
            "post": {
                "summary": "Gets the logs for a model deployment.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/logs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"start_epoch_millis\": null,\n  \"end_epoch_millis\": null,\n  \"direction\": null,\n  \"limit\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/logs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'start_epoch_millis': None, 'end_epoch_millis': None, 'direction': None, 'limit': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets all the logs for a model deployment in the given time range.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetDeploymentLogsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLogsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/replicas/{replica_id}": {
            "delete": {
                "summary": "Terminates a replica in a deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/replicas/{replica_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/replicas/{replica_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Terminates a deployment replica and returns the termination status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TerminateReplicaResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                },
                {
                    "$ref": "#/components/parameters/replica_id"
                }
            ]
        },
        "/v1/models/{model_id}/deployments/{deployment_id}/ssh/sign": {
            "post": {
                "summary": "Sign an SSH certificate for an inference model.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/ssh/sign \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"public_key\": null,\n  \"replica_id\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/ssh/sign\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'public_key': None, 'replica_id': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Signs a short-lived SSH certificate granting access to a running inference model pod. Returns the signed SSH certificate, a JWT token for SSH proxy authentication, the proxy address to connect through, and the certificate expiry time.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SignSSHCertificateRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignSSHCertificateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/models/{model_id}/environments": {
            "get": {
                "summary": "Get all environments",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/environments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets all environments for a given model",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EnvironmentsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ],
            "post": {
                "summary": "Create an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"staging\",\n  \"autoscaling_settings\": {\n    \"autoscaling_window\": 800,\n    \"concurrency_target\": 3,\n    \"max_replica\": 2,\n    \"min_replica\": 1,\n    \"scale_down_delay\": 60,\n    \"target_in_flight_tokens\": null,\n    \"target_utilization_percentage\": null\n  },\n  \"promotion_settings\": {\n    \"promotion_cleanup_strategy\": null,\n    \"ramp_up_duration_seconds\": 600,\n    \"ramp_up_while_promoting\": true,\n    \"redeploy_on_promotion\": true,\n    \"rolling_deploy\": true,\n    \"rolling_deploy_config\": null\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'staging', 'autoscaling_settings': {'autoscaling_window': 800, 'concurrency_target': 3, 'max_replica': 2, 'min_replica': 1, 'scale_down_delay': 60, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'promotion_settings': {'promotion_cleanup_strategy': None, 'ramp_up_duration_seconds': 600, 'ramp_up_while_promoting': True, 'redeploy_on_promotion': True, 'rolling_deploy': True, 'rolling_deploy_config': None}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates an environment for the specified model and returns the environment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EnvironmentV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/models/{model_id}/environments/{env_name}": {
            "get": {
                "summary": "Get an environment's details",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets an environment's details and returns the environment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EnvironmentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ],
            "patch": {
                "summary": "Update an environment's settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"autoscaling_settings\": {\n    \"autoscaling_window\": 800,\n    \"concurrency_target\": 3,\n    \"max_replica\": 2,\n    \"min_replica\": 1,\n    \"scale_down_delay\": 60,\n    \"target_in_flight_tokens\": null,\n    \"target_utilization_percentage\": null\n  },\n  \"promotion_settings\": {\n    \"promotion_cleanup_strategy\": null,\n    \"ramp_up_duration_seconds\": 600,\n    \"ramp_up_while_promoting\": true,\n    \"redeploy_on_promotion\": true,\n    \"rolling_deploy\": null,\n    \"rolling_deploy_config\": null\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'autoscaling_settings': {'autoscaling_window': 800, 'concurrency_target': 3, 'max_replica': 2, 'min_replica': 1, 'scale_down_delay': 60, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'promotion_settings': {'promotion_cleanup_strategy': None, 'ramp_up_duration_seconds': 600, 'ramp_up_while_promoting': True, 'redeploy_on_promotion': True, 'rolling_deploy': None, 'rolling_deploy_config': None}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Asynchronously updates an environment's settings. Poll the GET endpoint for the applied state.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateAutoscalingSettingsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/models/{model_id}/environments/{env_name}/activate": {
            "post": {
                "summary": "Activates a deployment associated with an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/activate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/activate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Activates an inactive deployment associated with an environment and returns the activation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ActivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/deactivate": {
            "post": {
                "summary": "Deactivates a deployment associated with an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deactivates a deployment associated with an environment and returns the deactivation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/promote": {
            "post": {
                "summary": "Promotes a deployment to an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/promote \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"scale_down_previous_deployment\": true,\n  \"deployment_id\": null,\n  \"preserve_env_instance_type\": true\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/promote\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'scale_down_previous_deployment': True, 'deployment_id': None, 'preserve_env_instance_type': True}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Promotes an existing deployment to an environment and returns the promoted deployment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PromoteToEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/cancel_promotion": {
            "post": {
                "summary": "Cancels a promotion to an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/cancel_promotion \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/cancel_promotion\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Cancels an ongoing promotion to an environment and returns the cancellation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CancelPromotionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/pause_promotion": {
            "post": {
                "summary": "Pauses a rolling promotion",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/pause_promotion \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/pause_promotion\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Pauses an in-progress rolling promotion after the current step completes. No further scaling changes are made until resumed.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignalPromotionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/resume_promotion": {
            "post": {
                "summary": "Resumes a paused rolling promotion",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/resume_promotion \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/resume_promotion\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Resumes a paused rolling promotion, continuing from where it was paused.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignalPromotionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/force_cancel_promotion": {
            "post": {
                "summary": "Force cancels a rolling promotion",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/force_cancel_promotion \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/force_cancel_promotion\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Immediately cancels an in-progress rolling promotion and triggers rollback to the previous version.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignalPromotionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/models/{model_id}/environments/{env_name}/force_roll_forward_promotion": {
            "post": {
                "summary": "Force rolls forward a rolling promotion",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/force_roll_forward_promotion \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/environments/{env_name}/force_roll_forward_promotion\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Immediately completes the rolling promotion, shifting all traffic to the new version. This works even if the promotion is in the process of rolling back.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignalPromotionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/chains": {
            "get": {
                "summary": "Gets all chains",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainsV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/chains/{chain_id}": {
            "delete": {
                "summary": "Deletes a chain by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/chains/{chain_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                }
            ],
            "get": {
                "summary": "Gets a chain by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains/{chain_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/chains/{chain_id}/deployments": {
            "get": {
                "summary": "Gets all chain deployments",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains/{chain_id}/deployments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainDeploymentsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                }
            ]
        },
        "/v1/chains/{chain_id}/deployments/{chain_deployment_id}": {
            "delete": {
                "summary": "Deletes a chain deployment by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainDeploymentTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/chain_deployment_id"
                }
            ],
            "get": {
                "summary": "Gets a chain deployment by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainDeploymentV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/chains/{chain_id}/deployments/{chain_deployment_id}/deactivate": {
            "post": {
                "summary": "Deactivates a chain deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deactivates a chain deployment and returns the deactivation status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/chain_deployment_id"
                }
            ]
        },
        "/v1/chains/{chain_id}/deployments/{chain_deployment_id}/chainlets/{chainlet_id}/logs": {
            "post": {
                "summary": "Gets the logs for a chainlet within a chain deployment.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}/chainlets/{chainlet_id}/logs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"start_epoch_millis\": null,\n  \"end_epoch_millis\": null,\n  \"direction\": null,\n  \"limit\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/deployments/{chain_deployment_id}/chainlets/{chainlet_id}/logs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'start_epoch_millis': None, 'end_epoch_millis': None, 'direction': None, 'limit': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Resolves the chainlet (by ID, scoped to the given chain deployment) to its underlying model deployment and returns its logs in the given time range.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetDeploymentLogsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLogsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/chain_deployment_id"
                },
                {
                    "$ref": "#/components/parameters/chainlet_id"
                }
            ]
        },
        "/v1/chains/{chain_id}/environments": {
            "get": {
                "summary": "Get all chain environments",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets all chain environments for a given chain",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EnvironmentsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                }
            ],
            "post": {
                "summary": "Create a chain environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"staging\",\n  \"promotion_settings\": {\n    \"promotion_cleanup_strategy\": null,\n    \"ramp_up_duration_seconds\": 600,\n    \"ramp_up_while_promoting\": true,\n    \"redeploy_on_promotion\": true,\n    \"rolling_deploy\": null,\n    \"rolling_deploy_config\": null\n  },\n  \"chainlet_settings\": [\n    {\n      \"autoscaling_settings\": {\n        \"autoscaling_window\": 800,\n        \"concurrency_target\": 4,\n        \"max_replica\": 3,\n        \"min_replica\": 2,\n        \"scale_down_delay\": 63,\n        \"target_in_flight_tokens\": null,\n        \"target_utilization_percentage\": null\n      },\n      \"chainlet_name\": \"HelloWorld\",\n      \"instance_type_id\": \"2x8\"\n    },\n    {\n      \"autoscaling_settings\": {\n        \"autoscaling_window\": null,\n        \"concurrency_target\": null,\n        \"max_replica\": 3,\n        \"min_replica\": 3,\n        \"scale_down_delay\": null,\n        \"target_in_flight_tokens\": null,\n        \"target_utilization_percentage\": null\n      },\n      \"chainlet_name\": \"RandInt\",\n      \"instance_type_id\": \"A10Gx8x32\"\n    }\n  ]\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'staging', 'promotion_settings': {'promotion_cleanup_strategy': None, 'ramp_up_duration_seconds': 600, 'ramp_up_while_promoting': True, 'redeploy_on_promotion': True, 'rolling_deploy': None, 'rolling_deploy_config': None}, 'chainlet_settings': [{'autoscaling_settings': {'autoscaling_window': 800, 'concurrency_target': 4, 'max_replica': 3, 'min_replica': 2, 'scale_down_delay': 63, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'chainlet_name': 'HelloWorld', 'instance_type_id': '2x8'}, {'autoscaling_settings': {'autoscaling_window': None, 'concurrency_target': None, 'max_replica': 3, 'min_replica': 3, 'scale_down_delay': None, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'chainlet_name': 'RandInt', 'instance_type_id': 'A10Gx8x32'}]}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Create a chain environment. Returns the resulting environment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateChainEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainEnvironmentV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/chains/{chain_id}/environments/{env_name}": {
            "get": {
                "summary": "Get a chain environment's details",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets a chain environment's details and returns the chain environment.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainEnvironmentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ],
            "patch": {
                "summary": "Update a chain environment's settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"promotion_settings\": {\n    \"promotion_cleanup_strategy\": null,\n    \"ramp_up_duration_seconds\": 600,\n    \"ramp_up_while_promoting\": true,\n    \"redeploy_on_promotion\": null,\n    \"rolling_deploy\": null,\n    \"rolling_deploy_config\": null\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'promotion_settings': {'promotion_cleanup_strategy': None, 'ramp_up_duration_seconds': 600, 'ramp_up_while_promoting': True, 'redeploy_on_promotion': None, 'rolling_deploy': None, 'rolling_deploy_config': None}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Update a chain environment's settings and returns the chain environment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateChainEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateChainEnvironmentResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/chains/{chain_id}/environments/{env_name}/promote": {
            "post": {
                "summary": "Promotes a chain deployment to an environment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/promote \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"scale_down_previous_deployment\": true,\n  \"deployment_id\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/promote\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'scale_down_previous_deployment': True, 'deployment_id': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Promotes an existing chain deployment to an environment and returns the promoted chain deployment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PromoteToChainEnvironmentRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ChainDeploymentV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/autoscaling_settings": {
            "patch": {
                "summary": "Update a chainlet environment's autoscaling settings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/autoscaling_settings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"updates\": [\n    {\n      \"autoscaling_settings\": {\n        \"autoscaling_window\": 800,\n        \"concurrency_target\": 4,\n        \"max_replica\": 3,\n        \"min_replica\": 2,\n        \"scale_down_delay\": 63,\n        \"target_in_flight_tokens\": null,\n        \"target_utilization_percentage\": null\n      },\n      \"chainlet_name\": \"HelloWorld\"\n    }\n  ]\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/autoscaling_settings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'updates': [{'autoscaling_settings': {'autoscaling_window': 800, 'concurrency_target': 4, 'max_replica': 3, 'min_replica': 2, 'scale_down_delay': 63, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'chainlet_name': 'HelloWorld'}]}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a chainlet environment's autoscaling settings and returns the updated chainlet environment settings.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateChainletEnvironmentAutoscalingSettingsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateAutoscalingSettingsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/instance_types/update": {
            "post": {
                "summary": "Update a chainlet environment's instance type settings.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/instance_types/update \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"updates\": [\n    {\n      \"chainlet_name\": \"HelloWorld\",\n      \"instance_type_id\": \"1x4\"\n    },\n    {\n      \"chainlet_name\": \"RandInt\",\n      \"instance_type_id\": \"A10G:2x24x96\"\n    }\n  ]\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/chainlet_settings/instance_types/update\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'updates': [{'chainlet_name': 'HelloWorld', 'instance_type_id': '1x4'}, {'chainlet_name': 'RandInt', 'instance_type_id': 'A10G:2x24x96'}]}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a chainlet environment's instance type settings. The chainlet environment setting must exist. When updated, a new chain deployment is created and deployed. It is promoted to the chain environment according to promotion settings on the environment.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateChainletEnvironmentInstanceTypeRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpdateChainletEnvironmentInstanceTypeResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/chain_id"
                },
                {
                    "$ref": "#/components/parameters/env_name"
                }
            ]
        },
        "/v1/teams/{team_id}/training_projects": {
            "post": {
                "summary": "Upsert a training project in a specific team.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/training_projects \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"training_project\": {\n    \"name\": \"My Training Project\"\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/training_projects\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'training_project': {'name': 'My Training Project'}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Upserts a training project with the specified metadata for a team.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertTrainingProjectRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpsertTrainingProjectResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/team_id"
                }
            ]
        },
        "/v1/training_projects": {
            "get": {
                "summary": "List training projects.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List all training projects for the organization.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListTrainingProjectsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Upsert a training project.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"training_project\": {\n    \"name\": \"My Training Project\"\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'training_project': {'name': 'My Training Project'}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Upserts a training project with the specified metadata.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertTrainingProjectRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UpsertTrainingProjectResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/training_projects/{training_project_id}/jobs": {
            "get": {
                "summary": "List training jobs.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List all training jobs for the training project.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListTrainingJobsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                }
            ],
            "post": {
                "summary": "Create a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"training_job\": {\n    \"image\": {\n      \"base_image\": \"hello-world\",\n      \"docker_auth\": null\n    },\n    \"compute\": {\n      \"node_count\": 1,\n      \"cpu_count\": 1,\n      \"memory\": \"2Gi\",\n      \"accelerator\": {\n        \"accelerator\": \"H100\",\n        \"count\": 2\n      }\n    },\n    \"runtime\": {\n      \"start_commands\": [\n        \"python main.py\"\n      ],\n      \"environment_variables\": {\n        \"API_KEY\": \"your_api_key_here\",\n        \"PATH\": \"/usr/bin\"\n      },\n      \"artifacts\": null,\n      \"enable_cache\": true,\n      \"cache_config\": {\n        \"enable_legacy_hf_mount\": true,\n        \"enabled\": true,\n        \"mount_base_path\": \"/root/.cache\",\n        \"require_cache_affinity\": true\n      },\n      \"checkpointing_config\": {\n        \"enabled\": true,\n        \"checkpoint_path\": \"/mnt/ckpts\",\n        \"volume_size_gib\": 10\n      },\n      \"load_checkpoint_config\": null\n    },\n    \"name\": \"gpt-oss-job\",\n    \"truss_user_env\": null,\n    \"interactive_session\": null,\n    \"weights\": [\n      {\n        \"allow_patterns\": null,\n        \"auth\": null,\n        \"auth_secret_name\": null,\n        \"ignore_patterns\": null,\n        \"mount_location\": \"/app/models/base\",\n        \"source\": \"hf://meta-llama/Llama-3-8B@main\"\n      }\n    ],\n    \"enable_baseten_workdir\": false,\n    \"priority\": 0\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'training_job': {'image': {'base_image': 'hello-world', 'docker_auth': None}, 'compute': {'node_count': 1, 'cpu_count': 1, 'memory': '2Gi', 'accelerator': {'accelerator': 'H100', 'count': 2}}, 'runtime': {'start_commands': ['python main.py'], 'environment_variables': {'API_KEY': 'your_api_key_here', 'PATH': '/usr/bin'}, 'artifacts': None, 'enable_cache': True, 'cache_config': {'enable_legacy_hf_mount': True, 'enabled': True, 'mount_base_path': '/root/.cache', 'require_cache_affinity': True}, 'checkpointing_config': {'enabled': True, 'checkpoint_path': '/mnt/ckpts', 'volume_size_gib': 10}, 'load_checkpoint_config': None}, 'name': 'gpt-oss-job', 'truss_user_env': None, 'interactive_session': None, 'weights': [{'allow_patterns': None, 'auth': None, 'auth_secret_name': None, 'ignore_patterns': None, 'mount_location': '/app/models/base', 'source': 'hf://meta-llama/Llama-3-8B@main'}], 'enable_baseten_workdir': False, 'priority': 0}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a training job with the specified configuration.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTrainingJobRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateTrainingJobResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}": {
            "delete": {
                "summary": "Delete a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes a training job. Stops it first if still running.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TrainingJobTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ],
            "get": {
                "summary": "Get a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the details of an existing training job.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingJobResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/download": {
            "get": {
                "summary": "Get the uploaded training job as a S3 Artifact",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/download \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/download\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the uploaded training job as a S3 Artifact",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DownloadTrainingJobResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/recreate": {
            "post": {
                "summary": "Recreate a training job",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/recreate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/recreate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Create a new training job with the same configuration as an existing training job.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RecreateTrainingJobResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/logs": {
            "post": {
                "summary": "Get the logs for a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/logs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"start_epoch_millis\": null,\n  \"end_epoch_millis\": null,\n  \"direction\": null,\n  \"limit\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/logs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'start_epoch_millis': None, 'end_epoch_millis': None, 'direction': None, 'limit': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the logs for a training job with the provided filters.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetTrainingJobLogsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLogsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/metrics": {
            "post": {
                "summary": "Get the metrics for a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/metrics \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"end_epoch_millis\": null,\n  \"start_epoch_millis\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/metrics\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'end_epoch_millis': None, 'start_epoch_millis': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the metrics for a training job.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/GetTrainingJobMetricsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingJobMetricsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/stop": {
            "post": {
                "summary": "Stop a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/stop \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/stop\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Stops a training job.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StopTrainingJobRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StopTrainingJobResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoints": {
            "get": {
                "summary": "Get training job checkpoints.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoints \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoints\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the checkpoints for a training job.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingJobCheckpointsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoint_files": {
            "get": {
                "summary": "Get training job checkpoint files.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoint_files \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/checkpoint_files\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get presigned URLs for all checkpoint files for a training job.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingJobCheckpointFilesResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/auth_codes": {
            "get": {
                "summary": "Get auth codes for a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/auth_codes \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/auth_codes\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get authentication codes for all nodes of a training job's interactive sessions.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetAuthCodesResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/interactive_sessions/{session_id}": {
            "patch": {
                "summary": "Patch an interactive session.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/interactive_sessions/{session_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"timeout_minutes\": null,\n  \"trigger\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/interactive_sessions/{session_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'timeout_minutes': None, 'trigger': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Update specific fields on a training job's interactive session. Only provided (non-null) fields are updated.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchInteractiveSessionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PatchInteractiveSessionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                },
                {
                    "$ref": "#/components/parameters/session_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/jobs/{training_job_id}/ssh/sign": {
            "post": {
                "summary": "Sign an SSH certificate for a training job.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/ssh/sign \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"public_key\": null,\n  \"replica_id\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/jobs/{training_job_id}/ssh/sign\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'public_key': None, 'replica_id': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Signs a short-lived SSH certificate granting access to a specific training job pod. Returns the signed SSH certificate, a JWT token for SSH proxy authentication, the proxy address to connect through, and the certificate expiry time.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SignSSHCertificateRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SignSSHCertificateResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                },
                {
                    "$ref": "#/components/parameters/training_job_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}/cache/summary": {
            "get": {
                "summary": "Get training project cache summary.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id}/cache/summary \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}/cache/summary\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the cache summary for the most recent training job in the project.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetCacheSummaryResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                }
            ]
        },
        "/v1/training_projects/{training_project_id}": {
            "delete": {
                "summary": "Delete a training project.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes a training project and all associated training jobs.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TrainingProjectTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/training_project_id"
                }
            ],
            "get": {
                "summary": "Get a training project.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training_projects/{training_project_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_projects/{training_project_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get the details of an existing training project.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingProjectResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/training_jobs/search": {
            "post": {
                "summary": "Search training jobs.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/training_jobs/search \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"project_id\": \"n4q95w5\",\n  \"job_id\": \"p7qr9qv\",\n  \"statuses\": [\n    \"TRAINING_JOB_RUNNING\",\n    \"TRAINING_JOB_COMPLETED\"\n  ],\n  \"order_by\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training_jobs/search\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'project_id': 'n4q95w5', 'job_id': 'p7qr9qv', 'statuses': ['TRAINING_JOB_RUNNING', 'TRAINING_JOB_COMPLETED'], 'order_by': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Search training jobs for the organization.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SearchTrainingJobsRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SearchTrainingJobsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/trainers/search": {
            "post": {
                "summary": "Search trainers.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/trainers/search \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"trainer_id\": \"k4q95w5\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainers/search\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'trainer_id': 'k4q95w5'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Search trainers visible to the requesting user.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SearchTrainersRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SearchTrainersResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/trainers/checkpoints/search": {
            "post": {
                "summary": "Look up trainer checkpoint info by bt:// URI.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/trainers/checkpoints/search \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"checkpoint_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainers/checkpoints/search\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'checkpoint_path': 'bt://loops:k4q95w5/sampler_weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Look up the metadata for a trainer checkpoint by its bt://loops:<trainer_id>/(weights|sampler_weights)/<name> URI.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckpointSearchRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckpointSearchResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/trainer_sessions": {
            "post": {
                "summary": "Create a trainer session.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/trainer_sessions \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"training_project_id\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainer_sessions\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'training_project_id': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a TrainerSession for the given training project.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTrainerSessionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateTrainerSessionResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/trainer_sessions/{session_id}/trainers": {
            "post": {
                "summary": "Create a trainer server.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"model\": null,\n  \"max_seq_len\": null,\n  \"lora_rank\": null,\n  \"seed\": null,\n  \"scale_down_delay_seconds\": null,\n  \"checkpoint_path\": \"bt://loops:k4q95w5/weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'model': None, 'max_seq_len': None, 'lora_rank': None, 'seed': None, 'scale_down_delay_seconds': None, 'checkpoint_path': 'bt://loops:k4q95w5/weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a TrainerServer and an associated SamplingServer for the given trainer session.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTrainerServerRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateTrainerServerResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/session_id"
                }
            ]
        },
        "/v1/trainer_sessions/{session_id}/samplers": {
            "post": {
                "summary": "Create a sampling server.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/trainer_sessions/{session_id}/samplers \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"model\": null,\n  \"max_seq_length\": null,\n  \"checkpoint_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainer_sessions/{session_id}/samplers\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'model': None, 'max_seq_length': None, 'checkpoint_path': 'bt://loops:k4q95w5/sampler_weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a standalone SamplingServer (not linked to a TrainerServer).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateSamplingServerRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateSamplingServerResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/session_id"
                }
            ]
        },
        "/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints": {
            "get": {
                "summary": "List trainer server checkpoints.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List the checkpoints saved by a trainer server.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainerServerCheckpointsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/session_id"
                },
                {
                    "$ref": "#/components/parameters/trainer_id"
                }
            ]
        },
        "/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints/{checkpoint_id}/files": {
            "get": {
                "summary": "Get trainer server checkpoint files.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints/{checkpoint_id}/files \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/trainer_sessions/{session_id}/trainers/{trainer_id}/checkpoints/{checkpoint_id}/files\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get presigned URLs for the files under a trainer server checkpoint. Returns a paginated list; deviates from Tinker's single-archive-URL shape because trainer weight sync writes an unzipped folder.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainerServerCheckpointFilesResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/session_id"
                },
                {
                    "$ref": "#/components/parameters/trainer_id"
                },
                {
                    "$ref": "#/components/parameters/checkpoint_id"
                }
            ]
        },
        "/v1/loops/capabilities": {
            "get": {
                "summary": "Get Loops server capabilities.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/capabilities \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/capabilities\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns the list of models supported by the Loops server, including each model's maximum context length.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLoopsCapabilitiesResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/sessions": {
            "post": {
                "summary": "Create a Loops session.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/sessions \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"training_project_id\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/sessions\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'training_project_id': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a Loops session for the given training project.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLoopsSessionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateLoopsSessionResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/sessions/{session_id}": {
            "get": {
                "summary": "Get a Loops session.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/sessions/{session_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/sessions/{session_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Fetch a Loops session by ID.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLoopsSessionResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/session_id"
                }
            ]
        },
        "/v1/loops/runs": {
            "get": {
                "summary": "List Loops runs.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/runs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/runs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List Loops runs visible to the requesting user, optionally filtered by run id and/or base model.",
                "parameters": [
                    {
                        "name": "run_id",
                        "in": "query",
                        "required": false,
                        "description": "Filter by run ID.",
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "default": null,
                            "examples": [
                                "k4q95w5"
                            ],
                            "title": "Run Id"
                        }
                    },
                    {
                        "name": "base_model",
                        "in": "query",
                        "required": false,
                        "description": "Filter runs by base model name.",
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "default": null,
                            "examples": [
                                "Qwen/Qwen3-8B"
                            ],
                            "title": "Base Model"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListLoopsRunsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a Loops run.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/runs \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"session_id\": null,\n  \"base_model\": null,\n  \"max_seq_len\": null,\n  \"lora_rank\": null,\n  \"seed\": null,\n  \"scale_down_delay_seconds\": null,\n  \"path\": \"bt://loops:k4q95w5/weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/runs\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'session_id': None, 'base_model': None, 'max_seq_len': None, 'lora_rank': None, 'seed': None, 'scale_down_delay_seconds': None, 'path': 'bt://loops:k4q95w5/weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a Loops run with an associated sampler in the given session.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLoopsRunRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateLoopsRunResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/runs/{run_id}": {
            "get": {
                "summary": "Get a Loops run.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/runs/{run_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/runs/{run_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Fetch a Loops run by ID.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLoopsRunResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/run_id"
                }
            ]
        },
        "/v1/loops/samplers": {
            "get": {
                "summary": "List Loops samplers.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/samplers \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List Loops samplers visible to the requesting user.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListLoopsSamplersResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a Loops sampler.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/samplers \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"session_id\": null,\n  \"base_model\": null,\n  \"max_seq_length\": null,\n  \"model_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'session_id': None, 'base_model': None, 'max_seq_length': None, 'model_path': 'bt://loops:k4q95w5/sampler_weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a standalone Loops sampler not linked to a run.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLoopsSamplerRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateLoopsSamplerResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/samplers/{sampler_id}": {
            "get": {
                "summary": "Get a Loops sampler.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/samplers/{sampler_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/samplers/{sampler_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Fetch a Loops sampler by ID.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLoopsSamplerResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/sampler_id"
                }
            ]
        },
        "/v1/loops/checkpoints": {
            "get": {
                "summary": "List Loops checkpoints.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/checkpoints \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/checkpoints\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List Loops checkpoints filtered by run id, base model, or bt:// URI. Provide exactly one filter.",
                "parameters": [
                    {
                        "name": "run_id",
                        "in": "query",
                        "required": false,
                        "description": "Filter by run ID. Returns all checkpoints saved by the run.",
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "default": null,
                            "examples": [
                                "k4q95w5"
                            ],
                            "title": "Run Id"
                        }
                    },
                    {
                        "name": "base_model",
                        "in": "query",
                        "required": false,
                        "description": "Filter by base model. Returns checkpoints across the caller's runs of this base model.",
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "default": null,
                            "examples": [
                                "Qwen/Qwen3-8B"
                            ],
                            "title": "Base Model"
                        }
                    },
                    {
                        "name": "checkpoint_path",
                        "in": "query",
                        "required": false,
                        "description": "bt:// URI of a Loops checkpoint. Form: bt://loops:<run_id>/(weights|sampler_weights)/<checkpoint_name>.",
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "default": null,
                            "examples": [
                                "bt://loops:k4q95w5/sampler_weights/step-100"
                            ],
                            "title": "Checkpoint Path"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListLoopsCheckpointsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/checkpoints/validate": {
            "post": {
                "summary": "Validate a Loops checkpoint bt:// URI.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/checkpoints/validate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"checkpoint_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/checkpoints/validate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'checkpoint_path': 'bt://loops:k4q95w5/sampler_weights/step-100'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Whether the caller can manage and use this checkpoint.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ValidateLoopsCheckpointRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidateLoopsCheckpointResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/checkpoints/{checkpoint_id}/files": {
            "get": {
                "summary": "Get Loops checkpoint files.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/checkpoints/{checkpoint_id}/files \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/checkpoints/{checkpoint_id}/files\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Get presigned URLs for the files under a Loops checkpoint. Returns a paginated list.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LoopsCheckpointFilesResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/checkpoint_id"
                }
            ]
        },
        "/v1/loops/deployments": {
            "get": {
                "summary": "List Loops deployments.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/deployments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/deployments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "List the caller's active Loops deployments. Excludes deployments whose latest status is stopped.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListLoopsDeploymentsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/loops/deployments/{deployment_id}/deactivate": {
            "post": {
                "summary": "Deactivate a Loops deployment.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/deployments/{deployment_id}/deactivate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/deployments/{deployment_id}/deactivate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Shut down a Loops deployment by ID. Saved checkpoints remain accessible. Resolving base_model -> deployment_id is the caller's responsibility \u2014 list deployments and pick the active one.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeactivateLoopsDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/loops/deployments/{deployment_id}": {
            "get": {
                "summary": "Get a Loops deployment.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/deployments/{deployment_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/loops/deployments/{deployment_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Fetch a Loops deployment by ID, including its latest status.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetLoopsDeploymentResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/deployment_id"
                }
            ]
        },
        "/v1/training/capacity": {
            "get": {
                "summary": "Get training GPU capacity.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/training/capacity \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/training/capacity\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns GPU capacity limits (baseline and peak) and current usage for the organization.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetTrainingGpuCapacityResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/blobs/credentials/model": {
            "get": {
                "summary": "Get blob credentials for models.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/blobs/credentials/model \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/blobs/credentials/model\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetBlobCredentialsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/blobs/credentials/train": {
            "get": {
                "summary": "Get blob credentials for training.",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/blobs/credentials/train \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/blobs/credentials/train\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetBlobCredentialsResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/{team_id}/api_keys": {
            "post": {
                "summary": "Creates a team API key",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"my-api-key\",\n  \"type\": \"PERSONAL\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'my-api-key', 'type': 'PERSONAL'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a team API key with the provided name and type. The API key is returned in the response.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAPIKeyRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/APIKeyV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/team_id"
                }
            ]
        },
        "/v1/api_keys": {
            "get": {
                "summary": "Lists the user's API keys (metadata only, no plain text keys)",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/APIKeysV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Creates an API key",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"my-api-key\",\n  \"type\": \"PERSONAL\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'my-api-key', 'type': 'PERSONAL'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates an API key with the provided name and type. The API key is returned in the response.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAPIKeyRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/APIKeyV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/api_keys/{api_key_prefix}": {
            "delete": {
                "summary": "Deletes an API key by prefix",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/api_keys/{api_key_prefix} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/api_keys/{api_key_prefix}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes an API key by prefix and returns info about the API key.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/APIKeyTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/api_key_prefix"
                }
            ]
        },
        "/v1/model_apis/snapshots": {
            "get": {
                "summary": "Get the latest model weight snapshot",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/model_apis/snapshots \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/model_apis/snapshots\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets the most recent model weight snapshot for the specified model.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelWeightSnapshotV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a model weight snapshot",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/model_apis/snapshots \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"model\": null,\n  \"snapshot_uri\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/model_apis/snapshots\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'model': None, 'snapshot_uri': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a model weight snapshot for the specified model and returns the snapshot.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateModelWeightSnapshotRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelWeightSnapshotV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/model_apis/snapshots/{model_id}": {
            "get": {
                "summary": "Get the latest model weight snapshot",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/model_apis/snapshots/{model_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/model_apis/snapshots/{model_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Gets the most recent model weight snapshot for the specified model.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelWeightSnapshotV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ],
            "post": {
                "summary": "Create a model weight snapshot",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/model_apis/snapshots/{model_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"model\": null,\n  \"snapshot_uri\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/model_apis/snapshots/{model_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'model': None, 'snapshot_uri': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a model weight snapshot for the specified model and returns the snapshot.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateModelWeightSnapshotRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModelWeightSnapshotV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/llm_models": {
            "post": {
                "summary": "Creates a new BIS LLM deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"resources\": null,\n  \"llm_version\": null,\n  \"llm_config\": null,\n  \"environment_variables\": null,\n  \"model_metadata\": null,\n  \"autoscaling_settings\": {\n    \"autoscaling_window\": 600,\n    \"concurrency_target\": null,\n    \"max_replica\": 5,\n    \"min_replica\": 1,\n    \"scale_down_delay\": 300,\n    \"target_in_flight_tokens\": null,\n    \"target_utilization_percentage\": null\n  },\n  \"additional_autoscaling_config\": {\n    \"metrics\": [\n      {\n        \"name\": \"in_flight_tokens\",\n        \"target\": 40000\n      }\n    ]\n  },\n  \"metadata\": {\n    \"environment\": \"production\",\n    \"git_sha\": \"abc123\"\n  },\n  \"weights\": [\n    {\n      \"mount_location\": \"/models/base\",\n      \"source\": \"hf://meta-llama/Llama-3-8B\"\n    }\n  ],\n  \"name\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/llm_models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'resources': None, 'llm_version': None, 'llm_config': None, 'environment_variables': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'name': None}\n)\n\nprint(response.text)"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLLMModelRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LLMModelHandleV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/{team_id}/llm_models": {
            "post": {
                "summary": "Creates a new BIS LLM deployment",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/llm_models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"resources\": null,\n  \"llm_version\": null,\n  \"llm_config\": null,\n  \"environment_variables\": null,\n  \"model_metadata\": null,\n  \"autoscaling_settings\": {\n    \"autoscaling_window\": 600,\n    \"concurrency_target\": null,\n    \"max_replica\": 5,\n    \"min_replica\": 1,\n    \"scale_down_delay\": 300,\n    \"target_in_flight_tokens\": null,\n    \"target_utilization_percentage\": null\n  },\n  \"additional_autoscaling_config\": {\n    \"metrics\": [\n      {\n        \"name\": \"in_flight_tokens\",\n        \"target\": 40000\n      }\n    ]\n  },\n  \"metadata\": {\n    \"environment\": \"production\",\n    \"git_sha\": \"abc123\"\n  },\n  \"weights\": [\n    {\n      \"mount_location\": \"/models/base\",\n      \"source\": \"hf://meta-llama/Llama-3-8B\"\n    }\n  ],\n  \"name\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/llm_models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'resources': None, 'llm_version': None, 'llm_config': None, 'environment_variables': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'name': None}\n)\n\nprint(response.text)"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLLMModelRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LLMModelHandleV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/team_id"
                }
            ]
        },
        "/v1/llm_models/{model_id}/deployments": {
            "post": {
                "summary": "Creates a new BIS LLM deployment version",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models/{model_id}/deployments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"resources\": null,\n  \"llm_version\": null,\n  \"llm_config\": null,\n  \"environment_variables\": null,\n  \"model_metadata\": null,\n  \"autoscaling_settings\": {\n    \"autoscaling_window\": 600,\n    \"concurrency_target\": null,\n    \"max_replica\": 5,\n    \"min_replica\": 1,\n    \"scale_down_delay\": 300,\n    \"target_in_flight_tokens\": null,\n    \"target_utilization_percentage\": null\n  },\n  \"additional_autoscaling_config\": {\n    \"metrics\": [\n      {\n        \"name\": \"in_flight_tokens\",\n        \"target\": 40000\n      }\n    ]\n  },\n  \"metadata\": {\n    \"environment\": \"production\",\n    \"git_sha\": \"abc123\"\n  },\n  \"weights\": [\n    {\n      \"mount_location\": \"/models/base\",\n      \"source\": \"hf://meta-llama/Llama-3-8B\"\n    }\n  ]\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/llm_models/{model_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'resources': None, 'llm_version': None, 'llm_config': None, 'environment_variables': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}]}\n)\n\nprint(response.text)"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLLMModelVersionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LLMModelHandleV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/model_id"
                }
            ]
        },
        "/v1/library_listings": {
            "get": {
                "summary": "Gets all library listings",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/library_listings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns all library listings for the authenticated user's organization.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingsV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Creates a new library listing",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/library_listings \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"display_name\": null,\n  \"user_defined_id\": null,\n  \"is_public\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'display_name': None, 'user_defined_id': None, 'is_public': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a new library listing for the authenticated user's organization.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLibraryListingRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/library_listings/{user_defined_listing_id}": {
            "delete": {
                "summary": "Deletes a library listing",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes a library listing and all of its associated versions. Any versions that are currently live will also be removed.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/user_defined_listing_id"
                }
            ],
            "get": {
                "summary": "Gets a library listing",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns a specific library listing by its user-defined identifier.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingV1"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "summary": "Updates a library listing",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"display_name\": null,\n  \"is_public\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'display_name': None, 'is_public': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates the display name of a library listing.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateLibraryListingRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/library_listings/{user_defined_listing_id}/versions": {
            "get": {
                "summary": "Gets all versions for a library listing",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns all versions for a specific library listing.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingVersionsV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/user_defined_listing_id"
                }
            ],
            "post": {
                "summary": "Creates a new library listing version",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"display_name\": null,\n  \"is_public\": null,\n  \"oracle_version_id\": null,\n  \"allow_truss_download\": null,\n  \"version_tag\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'display_name': None, 'is_public': None, 'oracle_version_id': None, 'allow_truss_download': None, 'version_tag': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a new library listing version from an existing model version. The model version must be fully built (have an image_uri). If a listing with the given id already exists for the org, a new version is added. Otherwise, a new listing is created.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLibraryListingVersionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingVersionV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}": {
            "delete": {
                "summary": "Deletes a library listing version",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"DELETE\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Deletes a specific version of a library listing. Deleting a live version will fail with a 400 error \u2014 demote the version first by setting another version as live.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingVersionTombstoneV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/user_defined_listing_id"
                },
                {
                    "$ref": "#/components/parameters/version_tag"
                }
            ],
            "get": {
                "summary": "Gets a library listing version",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns a specific version of a library listing.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingVersionV1"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "summary": "Updates a library listing version",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"is_live\": null,\n  \"allow_truss_download\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'is_live': None, 'allow_truss_download': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates a library listing version. Setting is_live to true will demote the current live version.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateLibraryListingVersionRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LibraryListingVersionV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/billing/usage_summary": {
            "get": {
                "summary": "Gets billing usage summary for a date range",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/billing/usage_summary \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/billing/usage_summary\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns billing usage data within the specified date range. Includes dedicated model serving, training, and model APIs usage. The date range must not exceed 31 days.",
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": true,
                        "description": "Start date (ISO 8601, UTC). Earliest queryable: 2026-01-01.",
                        "schema": {
                            "format": "date-time",
                            "title": "Start Date",
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": true,
                        "description": "End date in ISO 8601 format (UTC). Date range cannot exceed 31 days.",
                        "schema": {
                            "format": "date-time",
                            "title": "End Date",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UsageSummaryV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/users/{user_id}": {
            "get": {
                "summary": "Gets a user by ID",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/users/{user_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/users/{user_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Returns user info. Currently only 'me' is accepted as user_id.",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UserInfoV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/user_id"
                }
            ]
        },
        "/v1/gateway/groups": {
            "get": {
                "summary": "List groups",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GroupsResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Create a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"metadata\": {\n    \"name\": \"Acme prod\",\n    \"external_entity_id\": \"cust_42\"\n  },\n  \"models\": null,\n  \"hierarchy\": {\n    \"limit_enforcement\": \"INDEPENDENT\",\n    \"parent_group_id\": \"abc123\"\n  }\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'metadata': {'name': 'Acme prod', 'external_entity_id': 'cust_42'}, 'models': None, 'hierarchy': {'limit_enforcement': 'INDEPENDENT', 'parent_group_id': 'abc123'}}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a group and its endpoint configuration",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateGroupRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GroupV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/gateway/groups/{group_id}": {
            "get": {
                "summary": "Get a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GroupV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/group_id"
                }
            ],
            "patch": {
                "summary": "Update a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"metadata\": {\n    \"name\": \"Acme Prod\"\n  },\n  \"models\": null\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"PATCH\",\n    url,\n    headers=headers,\n    json={'metadata': {'name': 'Acme Prod'}, 'models': None}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Updates the group's mutable fields",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateGroupRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GroupV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/gateway/groups/{group_id}/api_keys": {
            "get": {
                "summary": "List API keys for a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/KeysForGroupResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/group_id"
                }
            ],
            "post": {
                "summary": "Create an API key for a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"prod-key-1\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'prod-key-1'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Creates a new API key for the given group",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateApiKeyForGroupRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateApiKeyForGroupResponseV1"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/gateway/groups/{group_id}/api_keys/register": {
            "post": {
                "summary": "Register an API key for a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n  \"name\": \"my-model-api-key\",\n  \"key\": \"my-secure-api-key-value\"\n}'"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"POST\",\n    url,\n    headers=headers,\n    json={'name': 'my-model-api-key', 'key': 'my-secure-api-key-value'}\n)\n\nprint(response.text)"
                    }
                ],
                "description": "Registers a Gateway API key with provided value, name.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegisterAPIKeyRequestV1"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RegisterAPIKeyResponseV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/group_id"
                }
            ]
        },
        "/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}": {
            "get": {
                "summary": "Get an API key for a group",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n"
                    },
                    {
                        "lang": "python",
                        "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"<YOUR_API_KEY>\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n    \"GET\",\n    url,\n    headers=headers,\n    json={}\n)\n\nprint(response.text)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GatewayKeyInfoV1"
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/group_id"
                },
                {
                    "$ref": "#/components/parameters/api_key_prefix"
                }
            ]
        }
    },
    "openapi": "3.1.0",
    "components": {
        "schemas": {
            "SecretV1": {
                "description": "A Baseten secret. Note that we do not support retrieving secret values.",
                "properties": {
                    "created_at": {
                        "description": "Time the secret was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the secret",
                        "title": "Name",
                        "type": "string"
                    },
                    "team_name": {
                        "description": "Name of the team the secret belongs to",
                        "title": "Team Name",
                        "type": "string"
                    }
                },
                "required": [
                    "created_at",
                    "name",
                    "team_name"
                ],
                "title": "SecretV1",
                "type": "object"
            },
            "SecretsV1": {
                "description": "A list of Baseten secrets.",
                "properties": {
                    "secrets": {
                        "items": {
                            "$ref": "#/components/schemas/SecretV1"
                        },
                        "title": "Secrets",
                        "type": "array"
                    }
                },
                "required": [
                    "secrets"
                ],
                "title": "SecretsV1",
                "type": "object"
            },
            "UpsertSecretRequestV1": {
                "description": "A request to create or update a Baseten secret by name.",
                "properties": {
                    "name": {
                        "description": "Name of the new or existing secret",
                        "examples": [
                            "my_secret"
                        ],
                        "title": "Name",
                        "type": "string"
                    },
                    "value": {
                        "description": "Value of the secret",
                        "examples": [
                            "my_secret_value"
                        ],
                        "title": "Value",
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "value"
                ],
                "title": "UpsertSecretRequestV1",
                "type": "object"
            },
            "TeamV1": {
                "description": "A team.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the team",
                        "title": "Id",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the team",
                        "title": "Name",
                        "type": "string"
                    },
                    "default": {
                        "type": "boolean",
                        "description": "Whether this is the default team for the organization",
                        "title": "Default"
                    },
                    "created_at": {
                        "description": "Time the team was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "default",
                    "created_at"
                ],
                "title": "TeamV1",
                "type": "object"
            },
            "TeamsV1": {
                "description": "A list of teams.",
                "properties": {
                    "teams": {
                        "description": "A list of teams",
                        "items": {
                            "$ref": "#/components/schemas/TeamV1"
                        },
                        "title": "Teams",
                        "type": "array"
                    }
                },
                "required": [
                    "teams"
                ],
                "title": "TeamsV1",
                "type": "object"
            },
            "InstanceTypeV1": {
                "description": "An instance type.",
                "properties": {
                    "id": {
                        "description": "Identifier string for the instance type",
                        "title": "Id",
                        "type": "string"
                    },
                    "name": {
                        "description": "Display name of the instance type",
                        "title": "Name",
                        "type": "string"
                    },
                    "memory_limit_mib": {
                        "description": "Memory limit of the instance type in Mebibytes",
                        "title": "Memory Limit Mib",
                        "type": "integer"
                    },
                    "millicpu_limit": {
                        "description": "CPU limit of the instance type in millicpu",
                        "title": "Millicpu Limit",
                        "type": "integer"
                    },
                    "gpu_count": {
                        "description": "Number of GPUs on the instance type",
                        "title": "Gpu Count",
                        "type": "integer"
                    },
                    "gpu_type": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Type of GPU on the instance type",
                        "title": "Gpu Type"
                    },
                    "gpu_memory_limit_mib": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Memory limit of the GPU on the instance type in Mebibytes",
                        "title": "Gpu Memory Limit Mib"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "memory_limit_mib",
                    "millicpu_limit",
                    "gpu_count",
                    "gpu_type",
                    "gpu_memory_limit_mib"
                ],
                "title": "InstanceTypeV1",
                "type": "object"
            },
            "InstanceTypesV1": {
                "description": "A list of instance types.",
                "properties": {
                    "instance_types": {
                        "items": {
                            "$ref": "#/components/schemas/InstanceTypeV1"
                        },
                        "title": "Instance Types",
                        "type": "array"
                    }
                },
                "required": [
                    "instance_types"
                ],
                "title": "InstanceTypesV1",
                "type": "object"
            },
            "InstanceTypeWithPriceV1": {
                "properties": {
                    "instance_type": {
                        "$ref": "#/components/schemas/InstanceTypeV1",
                        "description": "Instance type properties."
                    },
                    "price": {
                        "description": "Usage price in USD / minute.",
                        "title": "Price",
                        "type": "number"
                    }
                },
                "required": [
                    "instance_type",
                    "price"
                ],
                "title": "InstanceTypeWithPriceV1",
                "type": "object"
            },
            "InstanceTypePricesV1": {
                "description": "A list of instance types.",
                "properties": {
                    "instance_types": {
                        "items": {
                            "$ref": "#/components/schemas/InstanceTypeWithPriceV1"
                        },
                        "title": "Instance Types",
                        "type": "array"
                    }
                },
                "required": [
                    "instance_types"
                ],
                "title": "InstanceTypePricesV1",
                "type": "object"
            },
            "ModelV1": {
                "description": "A model.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the model",
                        "title": "Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the model was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the model",
                        "title": "Name",
                        "type": "string"
                    },
                    "deployments_count": {
                        "description": "Number of deployments of the model",
                        "title": "Deployments Count",
                        "type": "integer"
                    },
                    "production_deployment_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Unique identifier of the production deployment of the model",
                        "title": "Production Deployment Id"
                    },
                    "development_deployment_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Unique identifier of the development deployment of the model",
                        "title": "Development Deployment Id"
                    },
                    "instance_type_name": {
                        "description": "Name of the instance type for the production deployment of the model",
                        "title": "Instance Type Name",
                        "type": "string"
                    },
                    "team_name": {
                        "description": "Name of the team associated with the model.",
                        "title": "Team Name",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "created_at",
                    "name",
                    "deployments_count",
                    "production_deployment_id",
                    "development_deployment_id",
                    "instance_type_name",
                    "team_name"
                ],
                "title": "ModelV1",
                "type": "object"
            },
            "ModelsV1": {
                "description": "A list of models.",
                "properties": {
                    "models": {
                        "items": {
                            "$ref": "#/components/schemas/ModelV1"
                        },
                        "title": "Models",
                        "type": "array"
                    }
                },
                "required": [
                    "models"
                ],
                "title": "ModelsV1",
                "type": "object"
            },
            "ModelTombstoneV1": {
                "description": "A model tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the model",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the model was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "deleted"
                ],
                "title": "ModelTombstoneV1",
                "type": "object"
            },
            "AutoscalingSettingsV1": {
                "description": "Autoscaling settings for a deployment.",
                "properties": {
                    "min_replica": {
                        "description": "Minimum number of replicas",
                        "title": "Min Replica",
                        "type": "integer"
                    },
                    "max_replica": {
                        "description": "Maximum number of replicas",
                        "title": "Max Replica",
                        "type": "integer"
                    },
                    "autoscaling_window": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Timeframe of traffic considered for autoscaling decisions",
                        "title": "Autoscaling Window"
                    },
                    "scale_down_delay": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Waiting period before scaling down any active replica",
                        "title": "Scale Down Delay"
                    },
                    "concurrency_target": {
                        "description": "Number of requests per replica before scaling up",
                        "title": "Concurrency Target",
                        "type": "integer"
                    },
                    "target_utilization_percentage": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Target utilization percentage for scaling up/down.",
                        "title": "Target Utilization Percentage"
                    },
                    "target_in_flight_tokens": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Target number of in-flight tokens for autoscaling decisions. Early access only.",
                        "title": "Target In Flight Tokens"
                    }
                },
                "required": [
                    "min_replica",
                    "max_replica",
                    "autoscaling_window",
                    "scale_down_delay",
                    "concurrency_target",
                    "target_utilization_percentage"
                ],
                "title": "AutoscalingSettingsV1",
                "type": "object"
            },
            "DeploymentStatusV1": {
                "description": "The status of a deployment.",
                "enum": [
                    "BUILDING",
                    "DEPLOYING",
                    "DEPLOY_FAILED",
                    "LOADING_MODEL",
                    "ACTIVE",
                    "UNHEALTHY",
                    "BUILD_FAILED",
                    "BUILD_STOPPED",
                    "DEACTIVATING",
                    "INACTIVE",
                    "FAILED",
                    "UPDATING",
                    "SCALED_TO_ZERO",
                    "WAKING_UP"
                ],
                "title": "DeploymentStatusV1",
                "type": "string"
            },
            "DeploymentV1": {
                "description": "A deployment of a model.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the deployment",
                        "title": "Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the deployment was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the deployment",
                        "title": "Name",
                        "type": "string"
                    },
                    "model_id": {
                        "description": "Unique identifier of the model",
                        "title": "Model Id",
                        "type": "string"
                    },
                    "is_production": {
                        "description": "Whether the deployment is the production deployment of the model",
                        "title": "Is Production",
                        "type": "boolean"
                    },
                    "is_development": {
                        "description": "Whether the deployment is the development deployment of the model",
                        "title": "Is Development",
                        "type": "boolean"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DeploymentStatusV1",
                        "description": "Status of the deployment"
                    },
                    "active_replica_count": {
                        "description": "Number of active replicas",
                        "title": "Active Replica Count",
                        "type": "integer"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Autoscaling settings for the deployment. If null, the model has not finished deploying"
                    },
                    "instance_type_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Name of the instance type the model deployment is running on",
                        "title": "Instance Type Name"
                    },
                    "environment": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The environment associated with the deployment",
                        "title": "Environment"
                    },
                    "labels": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "User-provided key-value labels for the deployment",
                        "title": "Labels"
                    }
                },
                "required": [
                    "id",
                    "created_at",
                    "name",
                    "model_id",
                    "is_production",
                    "is_development",
                    "status",
                    "active_replica_count",
                    "autoscaling_settings",
                    "instance_type_name",
                    "environment"
                ],
                "title": "DeploymentV1",
                "type": "object"
            },
            "DeploymentsV1": {
                "description": "A list of deployments of a model.",
                "properties": {
                    "deployments": {
                        "description": "A list of deployments of a model",
                        "items": {
                            "$ref": "#/components/schemas/DeploymentV1"
                        },
                        "title": "Deployments",
                        "type": "array"
                    }
                },
                "required": [
                    "deployments"
                ],
                "title": "DeploymentsV1",
                "type": "object"
            },
            "DeploymentTombstoneV1": {
                "description": "A model deployment tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the deployment",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the deployment was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    },
                    "model_id": {
                        "description": "Unique identifier of the model",
                        "title": "Model Id",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "deleted",
                    "model_id"
                ],
                "title": "DeploymentTombstoneV1",
                "type": "object"
            },
            "UpdateAutoscalingSettingsV1": {
                "additionalProperties": false,
                "description": "A request to update autoscaling settings for a deployment. All fields are optional, and we only update ones passed in.",
                "properties": {
                    "min_replica": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Minimum number of replicas",
                        "examples": [
                            0
                        ],
                        "title": "Min Replica"
                    },
                    "max_replica": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Maximum number of replicas",
                        "examples": [
                            7
                        ],
                        "title": "Max Replica"
                    },
                    "autoscaling_window": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Timeframe of traffic considered for autoscaling decisions",
                        "examples": [
                            600
                        ],
                        "title": "Autoscaling Window"
                    },
                    "scale_down_delay": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Waiting period before scaling down any active replica",
                        "examples": [
                            120
                        ],
                        "title": "Scale Down Delay"
                    },
                    "concurrency_target": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Number of requests per replica before scaling up",
                        "examples": [
                            2
                        ],
                        "title": "Concurrency Target"
                    },
                    "target_utilization_percentage": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Target utilization percentage for scaling up/down.",
                        "examples": [
                            70
                        ],
                        "title": "Target Utilization Percentage"
                    },
                    "target_in_flight_tokens": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Target number of in-flight tokens for autoscaling decisions. Early access only.",
                        "examples": [
                            40000
                        ],
                        "title": "Target In Flight Tokens"
                    }
                },
                "title": "UpdateAutoscalingSettingsV1",
                "type": "object"
            },
            "UpdateAutoscalingSettingsStatusV1": {
                "description": "The status of a request to update autoscaling settings.",
                "enum": [
                    "ACCEPTED",
                    "QUEUED",
                    "UNCHANGED"
                ],
                "title": "UpdateAutoscalingSettingsStatusV1",
                "type": "string"
            },
            "UpdateAutoscalingSettingsResponseV1": {
                "description": "The response to a request to update autoscaling settings.",
                "properties": {
                    "status": {
                        "$ref": "#/components/schemas/UpdateAutoscalingSettingsStatusV1",
                        "description": "Status of the request to update autoscaling settings"
                    },
                    "message": {
                        "description": "A message describing the status of the request to update autoscaling settings",
                        "title": "Message",
                        "type": "string"
                    }
                },
                "required": [
                    "status",
                    "message"
                ],
                "title": "UpdateAutoscalingSettingsResponseV1",
                "type": "object"
            },
            "PromoteRequestV1": {
                "description": "A request to promote a deployment to production.",
                "properties": {
                    "scale_down_previous_production": {
                        "default": true,
                        "description": "Whether to scale down the previous production deployment after promoting",
                        "examples": [
                            true
                        ],
                        "title": "Scale Down Previous Production",
                        "type": "boolean"
                    },
                    "preserve_env_instance_type": {
                        "default": true,
                        "description": "Whether to use the promoting deployment's instance type or preserve target environment's instance type",
                        "examples": [
                            true
                        ],
                        "title": "Preserve Env Instance Type",
                        "type": "boolean"
                    }
                },
                "title": "PromoteRequestV1",
                "type": "object"
            },
            "ActivateResponseV1": {
                "description": "The response to a request to activate a deployment.",
                "properties": {
                    "success": {
                        "default": true,
                        "description": "Whether the deployment was successfully activated",
                        "title": "Success",
                        "type": "boolean"
                    }
                },
                "title": "ActivateResponseV1",
                "type": "object"
            },
            "DeactivateResponseV1": {
                "description": "The response to a request to deactivate a deployment.",
                "properties": {
                    "success": {
                        "default": true,
                        "description": "Whether the deployment was successfully deactivated",
                        "title": "Success",
                        "type": "boolean"
                    }
                },
                "title": "DeactivateResponseV1",
                "type": "object"
            },
            "RetryDeploymentResponseV1": {
                "description": "The response to a request to retry a deployment.",
                "properties": {
                    "retried": {
                        "description": "Whether the retry was successfully initiated",
                        "title": "Retried",
                        "type": "boolean"
                    },
                    "reason": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Explanation of the result. Provided when retried is false to explain why retry was not possible.",
                        "title": "Reason"
                    },
                    "deployment": {
                        "$ref": "#/components/schemas/DeploymentV1",
                        "description": "The deployment that was retried"
                    }
                },
                "required": [
                    "retried",
                    "deployment"
                ],
                "title": "RetryDeploymentResponseV1",
                "type": "object"
            },
            "DownloadDeploymentResponseV1": {
                "description": "The response to a request to download a deployment's truss.",
                "properties": {
                    "download_url": {
                        "description": "Presigned URL to download the truss tar file",
                        "title": "Download Url",
                        "type": "string"
                    }
                },
                "required": [
                    "download_url"
                ],
                "title": "DownloadDeploymentResponseV1",
                "type": "object"
            },
            "DeploymentConfigResponseV1": {
                "description": "The config of a deployment. Fields are populated per `output_format`.",
                "properties": {
                    "config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The parsed config of the deployment.",
                        "title": "Config"
                    },
                    "raw_config": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The original config.yaml text \u2014 preserves comments, ordering, formatting.",
                        "title": "Raw Config"
                    }
                },
                "title": "DeploymentConfigResponseV1",
                "type": "object"
            },
            "SortOrderV1": {
                "enum": [
                    "asc",
                    "desc"
                ],
                "title": "SortOrderV1",
                "type": "string"
            },
            "GetDeploymentLogsRequestV1": {
                "description": "A request to fetch deployment logs.",
                "properties": {
                    "start_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to start fetching logs",
                        "title": "Start Epoch Millis"
                    },
                    "end_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to end fetching logs",
                        "title": "End Epoch Millis"
                    },
                    "direction": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SortOrderV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Sort order for logs"
                    },
                    "limit": {
                        "anyOf": [
                            {
                                "maximum": 1000,
                                "minimum": 1,
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": 500,
                        "description": "Limit of logs to fetch in a single request",
                        "title": "Limit"
                    }
                },
                "title": "GetDeploymentLogsRequestV1",
                "type": "object"
            },
            "LogV1": {
                "properties": {
                    "timestamp": {
                        "description": "Epoch nanosecond timestamp of the log message.",
                        "title": "Timestamp",
                        "type": "string"
                    },
                    "message": {
                        "description": "The contents of the log message.",
                        "title": "Message",
                        "type": "string"
                    },
                    "replica": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The replica the log line was emitted from.",
                        "title": "Replica"
                    },
                    "request_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The request ID associated with an inference request.",
                        "title": "Request Id"
                    }
                },
                "required": [
                    "timestamp",
                    "message",
                    "replica"
                ],
                "title": "LogV1",
                "type": "object"
            },
            "GetLogsResponseV1": {
                "description": "A response to querying logs.",
                "properties": {
                    "logs": {
                        "description": "Logs for a specific entity.",
                        "items": {
                            "$ref": "#/components/schemas/LogV1"
                        },
                        "title": "Logs",
                        "type": "array"
                    }
                },
                "required": [
                    "logs"
                ],
                "title": "GetLogsResponseV1",
                "type": "object"
            },
            "TerminateReplicaResponseV1": {
                "description": "The response to a request to terminate a replica in a deployment.",
                "properties": {
                    "success": {
                        "default": true,
                        "description": "Whether the replica was successfully terminated",
                        "title": "Success",
                        "type": "boolean"
                    }
                },
                "title": "TerminateReplicaResponseV1",
                "type": "object"
            },
            "SignSSHCertificateRequestV1": {
                "description": "Request to sign an SSH certificate for accessing a workload pod.",
                "properties": {
                    "public_key": {
                        "description": "The user's SSH public key (e.g., 'ssh-ed25519 AAAA... user@host').",
                        "title": "Public Key",
                        "type": "string"
                    },
                    "replica_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The replica to connect to. Required for training jobs (e.g. '0'). Optional for inference (server picks a running replica if omitted).",
                        "title": "Replica Id"
                    }
                },
                "required": [
                    "public_key"
                ],
                "title": "SignSSHCertificateRequestV1",
                "type": "object"
            },
            "SignSSHCertificateResponseV1": {
                "description": "Response containing a signed SSH certificate for proxy authentication.",
                "properties": {
                    "ssh_certificate": {
                        "description": "The signed SSH certificate in OpenSSH format.",
                        "title": "Ssh Certificate",
                        "type": "string"
                    },
                    "jwt": {
                        "description": "Signed JWT (ES256) for SSH proxy authorization.",
                        "title": "Jwt",
                        "type": "string"
                    },
                    "proxy_address": {
                        "description": "Address of the SSH proxy to connect to (host:port).",
                        "title": "Proxy Address",
                        "type": "string"
                    },
                    "ssh_cert_expires_at": {
                        "description": "When the certificate expires, in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Ssh Cert Expires At",
                        "type": "string"
                    }
                },
                "required": [
                    "ssh_certificate",
                    "jwt",
                    "proxy_address",
                    "ssh_cert_expires_at"
                ],
                "title": "SignSSHCertificateResponseV1",
                "type": "object"
            },
            "EnvironmentV1": {
                "description": "Environment for oracles.",
                "properties": {
                    "name": {
                        "description": "Name of the environment",
                        "title": "Name",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the environment was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "model_id": {
                        "description": "Unique identifier of the model",
                        "title": "Model Id",
                        "type": "string"
                    },
                    "current_deployment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/DeploymentV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Current deployment of the environment"
                    },
                    "candidate_deployment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/DeploymentV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Candidate deployment being promoted to the environment, if a promotion is in progress"
                    },
                    "in_progress_promotion": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/InProgressPromotionV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Details of the in-progress promotion, if any"
                    },
                    "autoscaling_settings": {
                        "$ref": "#/components/schemas/AutoscalingSettingsV1",
                        "description": "Autoscaling settings for the environment"
                    },
                    "promotion_settings": {
                        "$ref": "#/components/schemas/PromotionSettingsV1",
                        "description": "Promotion settings for the environment"
                    },
                    "instance_type": {
                        "$ref": "#/components/schemas/InstanceTypeV1",
                        "description": "Instance type for the environment"
                    }
                },
                "required": [
                    "name",
                    "created_at",
                    "model_id",
                    "current_deployment",
                    "autoscaling_settings",
                    "promotion_settings",
                    "instance_type"
                ],
                "title": "EnvironmentV1",
                "type": "object"
            },
            "InProgressPromotionStatusV1": {
                "enum": [
                    "RELEASING",
                    "RAMPING_UP",
                    "RAMPING_DOWN",
                    "PAUSED",
                    "SUCCEEDED",
                    "FAILED",
                    "CANCELED"
                ],
                "title": "InProgressPromotionStatusV1",
                "type": "string"
            },
            "InProgressPromotionV1": {
                "description": "Details of an in-progress promotion.",
                "properties": {
                    "status": {
                        "$ref": "#/components/schemas/InProgressPromotionStatusV1",
                        "description": "Status of the promotion"
                    },
                    "percent_traffic_to_new_version": {
                        "description": "Percentage of traffic routed to the candidate deployment",
                        "title": "Percent Traffic To New Version",
                        "type": "integer"
                    },
                    "error_message": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Error message if promotion failed",
                        "title": "Error Message"
                    },
                    "rolling_deploy": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether this is a rolling deploy",
                        "title": "Rolling Deploy"
                    }
                },
                "required": [
                    "status",
                    "percent_traffic_to_new_version"
                ],
                "title": "InProgressPromotionV1",
                "type": "object"
            },
            "PromotionCleanupStrategyV1": {
                "description": "The promotion cleanup strategy.",
                "enum": [
                    "KEEP",
                    "SCALE_TO_ZERO",
                    "DEACTIVATE"
                ],
                "title": "PromotionCleanupStrategyV1",
                "type": "string"
            },
            "PromotionSettingsV1": {
                "description": "Promotion settings for promoting chains and oracles",
                "properties": {
                    "redeploy_on_promotion": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": false,
                        "description": "Whether to deploy on all promotions. Enabling this flag allows model code to safely handle environment-specific logic. When a deployment is promoted, a new deployment will be created with a copy of the image.",
                        "examples": [
                            true
                        ],
                        "title": "Redeploy On Promotion"
                    },
                    "rolling_deploy": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": false,
                        "description": "Whether the environment should rely on rolling deploy orchestration.",
                        "examples": [
                            true
                        ],
                        "title": "Rolling Deploy"
                    },
                    "promotion_cleanup_strategy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/PromotionCleanupStrategyV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": "SCALE_TO_ZERO",
                        "description": "The cleanup strategy to use after a promotion completes.",
                        "examples": [
                            "SCALE_TO_ZERO"
                        ]
                    },
                    "rolling_deploy_config": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/RollingDeployConfigV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Rolling deploy configuration for promotions"
                    },
                    "ramp_up_while_promoting": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": false,
                        "description": "Whether to ramp up traffic while promoting",
                        "examples": [
                            true
                        ],
                        "title": "Ramp Up While Promoting"
                    },
                    "ramp_up_duration_seconds": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": 600,
                        "description": "Duration of the ramp up in seconds",
                        "examples": [
                            600
                        ],
                        "title": "Ramp Up Duration Seconds"
                    }
                },
                "title": "PromotionSettingsV1",
                "type": "object"
            },
            "RollingDeployConfigV1": {
                "description": "Rolling deploy config for promoting chains and oracles",
                "properties": {
                    "rolling_deploy_strategy": {
                        "$ref": "#/components/schemas/RollingDeployStrategyV1",
                        "default": "REPLICA",
                        "description": "The rolling deploy strategy to use for promotions.",
                        "examples": [
                            "REPLICA"
                        ]
                    },
                    "max_surge_percent": {
                        "default": 10,
                        "description": "The maximum surge percentage for rolling deploys.",
                        "examples": [
                            10
                        ],
                        "title": "Max Surge Percent",
                        "type": "integer"
                    },
                    "max_unavailable_percent": {
                        "default": 0,
                        "description": "The maximum unavailable percentage for rolling deploys.",
                        "examples": [
                            10
                        ],
                        "title": "Max Unavailable Percent",
                        "type": "integer"
                    },
                    "stabilization_time_seconds": {
                        "default": 0,
                        "description": "The stabilization time in seconds for rolling deploys.",
                        "examples": [
                            300
                        ],
                        "title": "Stabilization Time Seconds",
                        "type": "integer"
                    },
                    "replica_overhead_percent": {
                        "default": 0,
                        "description": "The replica overhead percentage for rolling deploys.",
                        "examples": [
                            0
                        ],
                        "title": "Replica Overhead Percent",
                        "type": "integer"
                    }
                },
                "title": "RollingDeployConfigV1",
                "type": "object"
            },
            "RollingDeployStrategyV1": {
                "description": "The rolling deploy strategy.",
                "enum": [
                    "REPLICA"
                ],
                "title": "RollingDeployStrategyV1",
                "type": "string"
            },
            "EnvironmentsV1": {
                "description": "list of environments",
                "properties": {
                    "environments": {
                        "items": {
                            "$ref": "#/components/schemas/EnvironmentV1"
                        },
                        "title": "Environments",
                        "type": "array"
                    }
                },
                "required": [
                    "environments"
                ],
                "title": "EnvironmentsV1",
                "type": "object"
            },
            "UpdatePromotionSettingsV1": {
                "description": "Promotion settings for model promotion",
                "properties": {
                    "redeploy_on_promotion": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether to deploy on all promotions. Enabling this flag allows model code to safely handle environment-specific logic. When a deployment is promoted, a new deployment will be created with a copy of the image.",
                        "examples": [
                            true
                        ],
                        "title": "Redeploy On Promotion"
                    },
                    "rolling_deploy": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether the environment should rely on rolling deploy orchestration.",
                        "examples": [
                            true
                        ],
                        "title": "Rolling Deploy"
                    },
                    "promotion_cleanup_strategy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/PromotionCleanupStrategyV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The cleanup strategy to use after a promotion completes.",
                        "examples": [
                            "SCALE_TO_ZERO"
                        ]
                    },
                    "rolling_deploy_config": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateRollingDeployConfigV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Rolling deploy configuration for promotions"
                    },
                    "ramp_up_while_promoting": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether to ramp up traffic while promoting",
                        "examples": [
                            true
                        ],
                        "title": "Ramp Up While Promoting"
                    },
                    "ramp_up_duration_seconds": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Duration of the ramp up in seconds",
                        "examples": [
                            600
                        ],
                        "title": "Ramp Up Duration Seconds"
                    }
                },
                "title": "UpdatePromotionSettingsV1",
                "type": "object"
            },
            "UpdateRollingDeployConfigV1": {
                "description": "Rolling deploy config for promoting chains and oracles",
                "properties": {
                    "rolling_deploy_strategy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/RollingDeployStrategyV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The rolling deploy strategy to use for promotions.",
                        "examples": [
                            "REPLICA"
                        ]
                    },
                    "max_surge_percent": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": 10,
                        "description": "The maximum surge percentage for rolling deploys.",
                        "examples": [
                            10
                        ],
                        "title": "Max Surge Percent"
                    },
                    "max_unavailable_percent": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The maximum unavailable percentage for rolling deploys.",
                        "examples": [
                            10
                        ],
                        "title": "Max Unavailable Percent"
                    },
                    "stabilization_time_seconds": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The stabilization time in seconds for rolling deploys.",
                        "examples": [
                            300
                        ],
                        "title": "Stabilization Time Seconds"
                    },
                    "replica_overhead_percent": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The replica overhead percentage for rolling deploys.",
                        "examples": [
                            0
                        ],
                        "title": "Replica Overhead Percent"
                    }
                },
                "title": "UpdateRollingDeployConfigV1",
                "type": "object"
            },
            "CreateEnvironmentRequestV1": {
                "description": "A request to create an environment.",
                "properties": {
                    "name": {
                        "description": "Name of the environment",
                        "examples": [
                            "staging"
                        ],
                        "title": "Name",
                        "type": "string"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Autoscaling settings for the environment",
                        "examples": [
                            {
                                "autoscaling_window": 800,
                                "concurrency_target": 3,
                                "max_replica": 2,
                                "min_replica": 1,
                                "scale_down_delay": 60,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": null
                            }
                        ]
                    },
                    "promotion_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdatePromotionSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Promotion settings for the environment",
                        "examples": [
                            {
                                "promotion_cleanup_strategy": null,
                                "ramp_up_duration_seconds": 600,
                                "ramp_up_while_promoting": true,
                                "redeploy_on_promotion": true,
                                "rolling_deploy": true,
                                "rolling_deploy_config": null
                            }
                        ]
                    }
                },
                "required": [
                    "name"
                ],
                "title": "CreateEnvironmentRequestV1",
                "type": "object"
            },
            "UpdateEnvironmentRequestV1": {
                "additionalProperties": false,
                "description": "A request to update an environment.",
                "properties": {
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Autoscaling settings for the environment",
                        "examples": [
                            {
                                "autoscaling_window": 800,
                                "concurrency_target": 3,
                                "max_replica": 2,
                                "min_replica": 1,
                                "scale_down_delay": 60,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": null
                            }
                        ]
                    },
                    "promotion_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdatePromotionSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Promotion settings for the environment",
                        "examples": [
                            {
                                "promotion_cleanup_strategy": null,
                                "ramp_up_duration_seconds": 600,
                                "ramp_up_while_promoting": true,
                                "redeploy_on_promotion": true,
                                "rolling_deploy": null,
                                "rolling_deploy_config": null
                            }
                        ]
                    }
                },
                "title": "UpdateEnvironmentRequestV1",
                "type": "object"
            },
            "PromoteToEnvironmentRequestV1": {
                "description": "A request to promote a deployment to a environment.",
                "properties": {
                    "scale_down_previous_deployment": {
                        "default": true,
                        "description": "Whether to scale down the previous deployment after promoting",
                        "examples": [
                            true
                        ],
                        "title": "Scale Down Previous Deployment",
                        "type": "boolean"
                    },
                    "deployment_id": {
                        "description": "The id of the deployment to promote",
                        "title": "Deployment Id",
                        "type": "string"
                    },
                    "preserve_env_instance_type": {
                        "default": true,
                        "description": "Whether to use the promoting deployment's instance type or preserve target environment's instance type",
                        "examples": [
                            true
                        ],
                        "title": "Preserve Env Instance Type",
                        "type": "boolean"
                    }
                },
                "required": [
                    "deployment_id"
                ],
                "title": "PromoteToEnvironmentRequestV1",
                "type": "object"
            },
            "CancelPromotionStatusV1": {
                "description": "The status of a request to cancel a promotion.",
                "enum": [
                    "CANCELED",
                    "RAMPING_DOWN"
                ],
                "title": "CancelPromotionStatusV1",
                "type": "string"
            },
            "CancelPromotionResponseV1": {
                "description": "The response to a request to cancel a promotion.",
                "properties": {
                    "status": {
                        "$ref": "#/components/schemas/CancelPromotionStatusV1",
                        "description": "Status of the request to cancel a promotion. Can be CANCELED or RAMPING_DOWN."
                    },
                    "message": {
                        "description": "A message describing the status of the request to cancel a promotion",
                        "title": "Message",
                        "type": "string"
                    }
                },
                "required": [
                    "status",
                    "message"
                ],
                "title": "CancelPromotionResponseV1",
                "type": "object"
            },
            "SignalPromotionResponseV1": {
                "description": "The response to a request to signal a rolling promotion.",
                "properties": {
                    "success": {
                        "description": "Whether the signal was successfully sent",
                        "title": "Success",
                        "type": "boolean"
                    }
                },
                "required": [
                    "success"
                ],
                "title": "SignalPromotionResponseV1",
                "type": "object"
            },
            "ChainV1": {
                "description": "A chain.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the chain",
                        "title": "Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the chain was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the chain",
                        "title": "Name",
                        "type": "string"
                    },
                    "deployments_count": {
                        "description": "Number of deployments of the chain",
                        "title": "Deployments Count",
                        "type": "integer"
                    },
                    "team_name": {
                        "description": "Name of the team associated with the chain",
                        "title": "Team Name",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "created_at",
                    "name",
                    "deployments_count",
                    "team_name"
                ],
                "title": "ChainV1",
                "type": "object"
            },
            "ChainsV1": {
                "description": "A list of chains.",
                "properties": {
                    "chains": {
                        "items": {
                            "$ref": "#/components/schemas/ChainV1"
                        },
                        "title": "Chains",
                        "type": "array"
                    }
                },
                "required": [
                    "chains"
                ],
                "title": "ChainsV1",
                "type": "object"
            },
            "ChainTombstoneV1": {
                "description": "A chain tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the chain",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the chain was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "deleted"
                ],
                "title": "ChainTombstoneV1",
                "type": "object"
            },
            "ChainDeploymentV1": {
                "description": "A deployment of a chain.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the chain deployment",
                        "title": "Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the chain deployment was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "chain_id": {
                        "description": "Unique identifier of the chain",
                        "title": "Chain Id",
                        "type": "string"
                    },
                    "environment": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Environment the chain deployment is deployed in",
                        "title": "Environment"
                    },
                    "chainlets": {
                        "description": "Chainlets in the chain deployment",
                        "items": {
                            "$ref": "#/components/schemas/ChainletV1"
                        },
                        "title": "Chainlets",
                        "type": "array"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DeploymentStatusV1",
                        "description": "Status of the chain deployment"
                    }
                },
                "required": [
                    "id",
                    "created_at",
                    "chain_id",
                    "environment",
                    "chainlets",
                    "status"
                ],
                "title": "ChainDeploymentV1",
                "type": "object"
            },
            "ChainletV1": {
                "description": "A chainlet in a chain deployment.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the chainlet",
                        "title": "Id",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the chainlet",
                        "title": "Name",
                        "type": "string"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Autoscaling settings for the chainlet. If null, it has not finished deploying"
                    },
                    "instance_type_name": {
                        "description": "Name of the instance type the chainlet is deployed on",
                        "title": "Instance Type Name",
                        "type": "string"
                    },
                    "active_replica_count": {
                        "description": "Number of active replicas",
                        "title": "Active Replica Count",
                        "type": "integer"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DeploymentStatusV1",
                        "description": "Status of the chainlet"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "autoscaling_settings",
                    "instance_type_name",
                    "active_replica_count",
                    "status"
                ],
                "title": "ChainletV1",
                "type": "object"
            },
            "ChainDeploymentsV1": {
                "description": "A list of chain deployments.",
                "properties": {
                    "deployments": {
                        "description": "A list of chain deployments",
                        "items": {
                            "$ref": "#/components/schemas/ChainDeploymentV1"
                        },
                        "title": "Deployments",
                        "type": "array"
                    }
                },
                "required": [
                    "deployments"
                ],
                "title": "ChainDeploymentsV1",
                "type": "object"
            },
            "ChainDeploymentTombstoneV1": {
                "description": "A chain deployment tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the chain deployment",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the chain deployment was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    },
                    "chain_id": {
                        "description": "Unique identifier of the chain",
                        "title": "Chain Id",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "deleted",
                    "chain_id"
                ],
                "title": "ChainDeploymentTombstoneV1",
                "type": "object"
            },
            "ChainletEnvironmentSettingsRequestV1": {
                "description": "Request to create environment settings for a chainlet.",
                "properties": {
                    "chainlet_name": {
                        "description": "Name of the chainlet",
                        "examples": [
                            "HelloWorld"
                        ],
                        "title": "Chainlet Name",
                        "type": "string"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Autoscaling settings for the chainlet",
                        "examples": [
                            {
                                "autoscaling_window": 60,
                                "concurrency_target": 1,
                                "max_replica": 1,
                                "min_replica": 0,
                                "scale_down_delay": 900,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": 70
                            }
                        ]
                    },
                    "instance_type_id": {
                        "default": "1x2",
                        "description": "ID of the instance type to use for the chainlet",
                        "examples": [
                            "1x4",
                            "2x8",
                            "A10G:2x24x96",
                            "H100:2x52x468"
                        ],
                        "title": "Instance Type Id",
                        "type": "string"
                    }
                },
                "required": [
                    "chainlet_name"
                ],
                "title": "ChainletEnvironmentSettingsRequestV1",
                "type": "object"
            },
            "CreateChainEnvironmentRequestV1": {
                "description": "A request to create a custom environment for a chain.",
                "properties": {
                    "name": {
                        "description": "Name of the environment",
                        "examples": [
                            "staging"
                        ],
                        "title": "Name",
                        "type": "string"
                    },
                    "promotion_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdatePromotionSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Promotion settings for the environment",
                        "examples": [
                            {
                                "promotion_cleanup_strategy": null,
                                "ramp_up_duration_seconds": 600,
                                "ramp_up_while_promoting": true,
                                "redeploy_on_promotion": true,
                                "rolling_deploy": null,
                                "rolling_deploy_config": null
                            }
                        ]
                    },
                    "chainlet_settings": {
                        "anyOf": [
                            {
                                "items": {
                                    "$ref": "#/components/schemas/ChainletEnvironmentSettingsRequestV1"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Mapping of chainlet name to the desired chainlet environment settings",
                        "examples": [
                            [
                                {
                                    "autoscaling_settings": {
                                        "autoscaling_window": 800,
                                        "concurrency_target": 4,
                                        "max_replica": 3,
                                        "min_replica": 2,
                                        "scale_down_delay": 63,
                                        "target_in_flight_tokens": null,
                                        "target_utilization_percentage": null
                                    },
                                    "chainlet_name": "HelloWorld",
                                    "instance_type_id": "2x8"
                                },
                                {
                                    "autoscaling_settings": {
                                        "autoscaling_window": null,
                                        "concurrency_target": null,
                                        "max_replica": 3,
                                        "min_replica": 3,
                                        "scale_down_delay": null,
                                        "target_in_flight_tokens": null,
                                        "target_utilization_percentage": null
                                    },
                                    "chainlet_name": "RandInt",
                                    "instance_type_id": "A10Gx8x32"
                                }
                            ]
                        ],
                        "title": "Chainlet Settings"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "CreateChainEnvironmentRequestV1",
                "type": "object"
            },
            "ChainletEnvironmentSettingsV1": {
                "description": "Environment settings for a chainlet.",
                "properties": {
                    "chainlet_name": {
                        "description": "Name of the chainlet",
                        "title": "Chainlet Name",
                        "type": "string"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Autoscaling settings for the chainlet. If null, it has not finished deploying"
                    },
                    "instance_type": {
                        "$ref": "#/components/schemas/InstanceTypeV1",
                        "description": "Instance type for the chainlet"
                    }
                },
                "required": [
                    "chainlet_name",
                    "autoscaling_settings",
                    "instance_type"
                ],
                "title": "ChainletEnvironmentSettingsV1",
                "type": "object"
            },
            "ChainEnvironmentV1": {
                "description": "Environment for oracles.",
                "properties": {
                    "name": {
                        "description": "Name of the environment",
                        "title": "Name",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the environment was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "chain_id": {
                        "description": "Unique identifier of the chain",
                        "title": "Chain Id",
                        "type": "string"
                    },
                    "promotion_settings": {
                        "$ref": "#/components/schemas/PromotionSettingsV1",
                        "description": "Promotion settings for the environment"
                    },
                    "chainlet_settings": {
                        "description": "Environment settings for the chainlets",
                        "items": {
                            "$ref": "#/components/schemas/ChainletEnvironmentSettingsV1"
                        },
                        "title": "Chainlet Settings",
                        "type": "array"
                    },
                    "current_deployment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/ChainDeploymentV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Current chain deployment of the environment"
                    },
                    "candidate_deployment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/ChainDeploymentV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Candidate chain deployment being promoted to the environment, if a promotion is in progress"
                    }
                },
                "required": [
                    "name",
                    "created_at",
                    "chain_id",
                    "promotion_settings",
                    "chainlet_settings",
                    "current_deployment"
                ],
                "title": "ChainEnvironmentV1",
                "type": "object"
            },
            "UpdateChainEnvironmentRequestV1": {
                "description": "A request to update a chain environment.",
                "properties": {
                    "promotion_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdatePromotionSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Promotion settings for the environment",
                        "examples": [
                            {
                                "promotion_cleanup_strategy": null,
                                "ramp_up_duration_seconds": 600,
                                "ramp_up_while_promoting": true,
                                "redeploy_on_promotion": null,
                                "rolling_deploy": null,
                                "rolling_deploy_config": null
                            }
                        ]
                    }
                },
                "title": "UpdateChainEnvironmentRequestV1",
                "type": "object"
            },
            "UpdateChainEnvironmentResponseV1": {
                "description": "A response to update a chain environment.",
                "properties": {
                    "ok": {
                        "description": "Whether the update was successful",
                        "title": "Ok",
                        "type": "boolean"
                    }
                },
                "required": [
                    "ok"
                ],
                "title": "UpdateChainEnvironmentResponseV1",
                "type": "object"
            },
            "PromoteToChainEnvironmentRequestV1": {
                "description": "A request to promote a deployment to a environment.",
                "properties": {
                    "scale_down_previous_deployment": {
                        "default": true,
                        "description": "Whether to scale down the previous deployment after promoting",
                        "examples": [
                            true
                        ],
                        "title": "Scale Down Previous Deployment",
                        "type": "boolean"
                    },
                    "deployment_id": {
                        "description": "The id of the chain deployment to promote",
                        "title": "Deployment Id",
                        "type": "string"
                    }
                },
                "required": [
                    "deployment_id"
                ],
                "title": "PromoteToChainEnvironmentRequestV1",
                "type": "object"
            },
            "ChainletEnvironmentAutoscalingSettingsUpdateV1": {
                "description": "The request to update the autoscaling settings for a chainlet.",
                "properties": {
                    "chainlet_name": {
                        "description": "Name of the chainlet",
                        "examples": [
                            "HelloWorld"
                        ],
                        "title": "Chainlet Name",
                        "type": "string"
                    },
                    "autoscaling_settings": {
                        "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1",
                        "description": "Autoscaling settings for the chainlet",
                        "examples": [
                            {
                                "autoscaling_window": 800,
                                "concurrency_target": 3,
                                "max_replica": 2,
                                "min_replica": 1,
                                "scale_down_delay": 60,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": null
                            }
                        ]
                    }
                },
                "required": [
                    "chainlet_name",
                    "autoscaling_settings"
                ],
                "title": "ChainletEnvironmentAutoscalingSettingsUpdateV1",
                "type": "object"
            },
            "UpdateChainletEnvironmentAutoscalingSettingsRequestV1": {
                "description": "A request to update the autoscaling settings for a multiple chainlets in an environment.\nIf a chainlet name doesn't exist, an error is returned.",
                "properties": {
                    "updates": {
                        "description": "Mapping of chainlet name to the desired chainlet autoscaling settings. If the chainlet name doesn't exist, an error is returned.",
                        "examples": [
                            [
                                {
                                    "autoscaling_settings": {
                                        "autoscaling_window": 800,
                                        "concurrency_target": 4,
                                        "max_replica": 3,
                                        "min_replica": 2,
                                        "scale_down_delay": 63,
                                        "target_in_flight_tokens": null,
                                        "target_utilization_percentage": null
                                    },
                                    "chainlet_name": "HelloWorld"
                                }
                            ],
                            [
                                {
                                    "autoscaling_settings": {
                                        "autoscaling_window": null,
                                        "concurrency_target": null,
                                        "max_replica": null,
                                        "min_replica": 0,
                                        "scale_down_delay": null,
                                        "target_in_flight_tokens": null,
                                        "target_utilization_percentage": null
                                    },
                                    "chainlet_name": "HelloWorld"
                                },
                                {
                                    "autoscaling_settings": {
                                        "autoscaling_window": null,
                                        "concurrency_target": null,
                                        "max_replica": null,
                                        "min_replica": 0,
                                        "scale_down_delay": null,
                                        "target_in_flight_tokens": null,
                                        "target_utilization_percentage": null
                                    },
                                    "chainlet_name": "RandInt"
                                }
                            ]
                        ],
                        "items": {
                            "$ref": "#/components/schemas/ChainletEnvironmentAutoscalingSettingsUpdateV1"
                        },
                        "title": "Updates",
                        "type": "array"
                    }
                },
                "required": [
                    "updates"
                ],
                "title": "UpdateChainletEnvironmentAutoscalingSettingsRequestV1",
                "type": "object"
            },
            "ChainletEnvironmentInstanceTypeUpdateV1": {
                "description": "A request to update the environment settings for a chainlet.",
                "properties": {
                    "chainlet_name": {
                        "description": "Name of the chainlet",
                        "examples": [
                            "HelloWorld"
                        ],
                        "title": "Chainlet Name",
                        "type": "string"
                    },
                    "instance_type_id": {
                        "description": "Key of the instance type to use for the chainlet",
                        "examples": [
                            "1x4",
                            "2x8",
                            "A10G:2x24x96"
                        ],
                        "title": "Instance Type Id",
                        "type": "string"
                    }
                },
                "required": [
                    "chainlet_name",
                    "instance_type_id"
                ],
                "title": "ChainletEnvironmentInstanceTypeUpdateV1",
                "type": "object"
            },
            "UpdateChainletEnvironmentInstanceTypeRequestV1": {
                "description": "A request to update the instance types for chainlets in an environment. Multiples\nupdates can be made in one request. The updates will be processed in batch and a new deployment\nwill be created, deployed and promoted into the environment.",
                "properties": {
                    "updates": {
                        "description": "Mapping of chainlet name to the desired chainlet instance type. If the chainlet name doesn't exist, an error is returned.",
                        "examples": [
                            [
                                {
                                    "chainlet_name": "HelloWorld",
                                    "instance_type_id": "1x4"
                                },
                                {
                                    "chainlet_name": "RandInt",
                                    "instance_type_id": "A10G:2x24x96"
                                }
                            ]
                        ],
                        "items": {
                            "$ref": "#/components/schemas/ChainletEnvironmentInstanceTypeUpdateV1"
                        },
                        "title": "Updates",
                        "type": "array"
                    }
                },
                "required": [
                    "updates"
                ],
                "title": "UpdateChainletEnvironmentInstanceTypeRequestV1",
                "type": "object"
            },
            "UpdateChainletEnvironmentInstanceTypeResponseV1": {
                "description": "A response to update the environment settings for a chainlet. If updating the instance type\nresulted in a re-deployment, `requires_redeployment` will be True and the resulting deployment\nwill be returned in the `chain_deployment` field.",
                "properties": {
                    "requires_redeployment": {
                        "description": "Whether the resource update requires a re-deployment to update the instance type.",
                        "title": "Requires Redeployment",
                        "type": "boolean"
                    },
                    "chain_deployment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/ChainDeploymentV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The chain deployment resulting from the resource update, if any."
                    },
                    "chainlet_environment_settings": {
                        "description": "The updated chainlet environment settings",
                        "items": {
                            "$ref": "#/components/schemas/ChainletEnvironmentSettingsV1"
                        },
                        "title": "Chainlet Environment Settings",
                        "type": "array"
                    }
                },
                "required": [
                    "requires_redeployment",
                    "chain_deployment",
                    "chainlet_environment_settings"
                ],
                "title": "UpdateChainletEnvironmentInstanceTypeResponseV1",
                "type": "object"
            },
            "UpsertTrainingProjectV1": {
                "description": "Fields that can be upserted on a training project.",
                "properties": {
                    "name": {
                        "description": "Name of the training project.",
                        "examples": [
                            "My Training Project"
                        ],
                        "title": "Name",
                        "type": "string"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "UpsertTrainingProjectV1",
                "type": "object"
            },
            "UpsertTrainingProjectRequestV1": {
                "description": "A request to upsert a training project.",
                "properties": {
                    "training_project": {
                        "$ref": "#/components/schemas/UpsertTrainingProjectV1",
                        "description": "The training project to upsert."
                    }
                },
                "required": [
                    "training_project"
                ],
                "title": "UpsertTrainingProjectRequestV1",
                "type": "object"
            },
            "CheckpointSyncStatus": {
                "description": "Lifecycle state for the checkpoint uploader.",
                "enum": [
                    "SYNCING",
                    "COMPLETED"
                ],
                "title": "CheckpointSyncStatus",
                "type": "string"
            },
            "TrainingJobV1": {
                "properties": {
                    "id": {
                        "description": "Unique identifier of the training job.",
                        "title": "Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the job was created in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "current_status": {
                        "description": "Current status of the training job.",
                        "title": "Current Status",
                        "type": "string"
                    },
                    "error_message": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Error message if the training job failed.",
                        "title": "Error Message"
                    },
                    "instance_type": {
                        "$ref": "#/components/schemas/InstanceTypeV1",
                        "description": "Instance type of the training job."
                    },
                    "updated_at": {
                        "description": "Time the job was updated in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Updated At",
                        "type": "string"
                    },
                    "training_project_id": {
                        "description": "ID of the training project.",
                        "title": "Training Project Id",
                        "type": "string"
                    },
                    "training_project": {
                        "$ref": "#/components/schemas/TrainingProjectSummaryV1",
                        "description": "Summary of the training project."
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the training job.",
                        "examples": [
                            "gpt-oss-job"
                        ],
                        "title": "Name"
                    },
                    "checkpoint_sync_status": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/CheckpointSyncStatus"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Checkpoint sync status of the training job."
                    },
                    "priority": {
                        "default": 0,
                        "description": "Queue priority. Higher values are dequeued first. NULL is treated as 0.",
                        "title": "Priority",
                        "type": "integer"
                    },
                    "user": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UserV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The user who created the training job."
                    }
                },
                "required": [
                    "id",
                    "created_at",
                    "current_status",
                    "instance_type",
                    "updated_at",
                    "training_project_id",
                    "training_project"
                ],
                "title": "TrainingJobV1",
                "type": "object"
            },
            "TrainingProjectSummaryV1": {
                "description": "A summary of a training project.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the training project.",
                        "title": "Id",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the training project.",
                        "title": "Name",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name"
                ],
                "title": "TrainingProjectSummaryV1",
                "type": "object"
            },
            "TrainingProjectV1": {
                "properties": {
                    "id": {
                        "description": "Unique identifier of the training project",
                        "title": "Id",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of the training project.",
                        "title": "Name",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the training project was created in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "updated_at": {
                        "description": "Time the training project was updated in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Updated At",
                        "type": "string"
                    },
                    "team_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the team associated with the training project.",
                        "title": "Team Name"
                    },
                    "latest_job": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TrainingJobV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Most recently created training job for the training project."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "created_at",
                    "updated_at",
                    "latest_job"
                ],
                "title": "TrainingProjectV1",
                "type": "object"
            },
            "UserV1": {
                "description": "A user.",
                "properties": {
                    "email": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Email of the user.",
                        "title": "Email"
                    }
                },
                "title": "UserV1",
                "type": "object"
            },
            "UpsertTrainingProjectResponseV1": {
                "description": "A response to upserting a training project.",
                "properties": {
                    "training_project": {
                        "$ref": "#/components/schemas/TrainingProjectV1",
                        "description": "The upserted training project."
                    }
                },
                "required": [
                    "training_project"
                ],
                "title": "UpsertTrainingProjectResponseV1",
                "type": "object"
            },
            "ListTrainingProjectsResponseV1": {
                "description": "A response to list training projects.",
                "properties": {
                    "training_projects": {
                        "description": "List of training projects.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingProjectV1"
                        },
                        "title": "Training Projects",
                        "type": "array"
                    }
                },
                "required": [
                    "training_projects"
                ],
                "title": "ListTrainingProjectsResponseV1",
                "type": "object"
            },
            "ListTrainingJobsResponseV1": {
                "description": "A response to list training jobs.",
                "properties": {
                    "training_project": {
                        "$ref": "#/components/schemas/TrainingProjectV1",
                        "description": "The training project."
                    },
                    "training_jobs": {
                        "description": "List of training jobs.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobV1"
                        },
                        "title": "Training Jobs",
                        "type": "array"
                    }
                },
                "required": [
                    "training_project",
                    "training_jobs"
                ],
                "title": "ListTrainingJobsResponseV1",
                "type": "object"
            },
            "AwsIamDockerAuthV1": {
                "description": "AWS details for the registry.",
                "properties": {
                    "access_key_secret_ref": {
                        "$ref": "#/components/schemas/SecretReferenceV1",
                        "description": "Name of the access key secret"
                    },
                    "secret_access_key_secret_ref": {
                        "$ref": "#/components/schemas/SecretReferenceV1",
                        "description": "Name of the secret key secret"
                    }
                },
                "required": [
                    "access_key_secret_ref",
                    "secret_access_key_secret_ref"
                ],
                "title": "AwsIamDockerAuthV1",
                "type": "object"
            },
            "AwsOidcDockerAuthV1": {
                "description": "AWS OIDC details for the registry.",
                "properties": {
                    "role_arn": {
                        "description": "AWS IAM role ARN for OIDC authentication",
                        "title": "Role Arn",
                        "type": "string"
                    },
                    "region": {
                        "description": "AWS region for OIDC authentication",
                        "title": "Region",
                        "type": "string"
                    }
                },
                "required": [
                    "role_arn",
                    "region"
                ],
                "title": "AwsOidcDockerAuthV1",
                "type": "object"
            },
            "BasetenLatestCheckpointConfig": {
                "properties": {
                    "project_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the project to load the checkpoint from",
                        "title": "Project Name"
                    },
                    "job_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "ID of the job to load the checkpoint from",
                        "title": "Job Id"
                    },
                    "typ": {
                        "const": "baseten_latest_checkpoint",
                        "default": "baseten_latest_checkpoint",
                        "title": "Typ",
                        "type": "string"
                    }
                },
                "title": "BasetenLatestCheckpointConfig",
                "type": "object"
            },
            "BasetenNamedCheckpointConfig": {
                "properties": {
                    "checkpoint_name": {
                        "description": "Name of the checkpoint to load from",
                        "title": "Checkpoint Name",
                        "type": "string"
                    },
                    "project_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the project to load the checkpoint from",
                        "title": "Project Name"
                    },
                    "job_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "ID of the job to load the checkpoint from",
                        "title": "Job Id"
                    },
                    "typ": {
                        "const": "baseten_named_checkpoint",
                        "default": "baseten_named_checkpoint",
                        "title": "Typ",
                        "type": "string"
                    }
                },
                "required": [
                    "checkpoint_name"
                ],
                "title": "BasetenNamedCheckpointConfig",
                "type": "object"
            },
            "CreateJobWeightConfigV1": {
                "description": "Weight source configuration for MDN (Model Distribution Network).\n\nEnables training jobs to mount external model weights from HuggingFace, S3, GCS, or R2\nvia MDN's caching and CSI mounting infrastructure. Weights are mirrored once and\ndeduplicated across training jobs.",
                "properties": {
                    "source": {
                        "description": "Weight source URI. Supported formats: hf://, s3://, gs://, r2://",
                        "examples": [
                            "hf://meta-llama/Llama-3-8B@main",
                            "s3://my-bucket/models/llama",
                            "gs://my-bucket/models/llama",
                            "r2://account_id.bucket/models/llama"
                        ],
                        "title": "Source",
                        "type": "string"
                    },
                    "mount_location": {
                        "description": "Path where weights will be mounted in the container",
                        "examples": [
                            "/app/models/base",
                            "/models/llama"
                        ],
                        "title": "Mount Location",
                        "type": "string"
                    },
                    "allow_patterns": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "File patterns to include (Unix-style shell patterns)",
                        "examples": [
                            [
                                "*.safetensors",
                                "config.json"
                            ]
                        ],
                        "title": "Allow Patterns"
                    },
                    "ignore_patterns": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "File patterns to exclude (Unix-style shell patterns)",
                        "examples": [
                            [
                                "*.bin",
                                "*.h5"
                            ]
                        ],
                        "title": "Ignore Patterns"
                    },
                    "auth_secret_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the workspace secret for authentication (e.g., HuggingFace token)",
                        "examples": [
                            "hf_token",
                            "aws_credentials"
                        ],
                        "title": "Auth Secret Name"
                    },
                    "auth": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Authentication configuration for the weight source.",
                        "examples": [
                            {
                                "auth_method": "CUSTOM_SECRET",
                                "auth_secret_name": "hf_token"
                            }
                        ],
                        "title": "Auth"
                    }
                },
                "required": [
                    "source",
                    "mount_location"
                ],
                "title": "CreateJobWeightConfigV1",
                "type": "object"
            },
            "CreateTrainingJobAcceleratorV1": {
                "properties": {
                    "accelerator": {
                        "description": "GPU type for the training job.",
                        "examples": [
                            "H100"
                        ],
                        "title": "Accelerator",
                        "type": "string"
                    },
                    "count": {
                        "description": "GPUs needed for the training job.",
                        "examples": [
                            2
                        ],
                        "title": "Count",
                        "type": "integer"
                    }
                },
                "required": [
                    "accelerator",
                    "count"
                ],
                "title": "CreateTrainingJobAcceleratorV1",
                "type": "object"
            },
            "CreateTrainingJobCacheConfig": {
                "properties": {
                    "enable_legacy_hf_mount": {
                        "default": false,
                        "description": "Whether to enable the legacy Hugging Face cache.",
                        "examples": [
                            true
                        ],
                        "title": "Enable Legacy Hf Mount",
                        "type": "boolean"
                    },
                    "enabled": {
                        "default": false,
                        "description": "Whether to enable the read-write cache.",
                        "examples": [
                            true
                        ],
                        "title": "Enabled",
                        "type": "boolean"
                    },
                    "require_cache_affinity": {
                        "default": true,
                        "description": "Whether to require region affinity for the read-write cache. If False, the resulting job is not guaranteed to be deployed alongside the previous cache.",
                        "examples": [
                            true,
                            false
                        ],
                        "title": "Require Cache Affinity",
                        "type": "boolean"
                    },
                    "mount_base_path": {
                        "default": "/root/.cache",
                        "description": "Mount base path for the cache directory. The project cache and team cache will be mounted under this path.",
                        "examples": [
                            "/workspace/.cache",
                            "/root/.cache"
                        ],
                        "title": "Mount Base Path",
                        "type": "string"
                    }
                },
                "title": "CreateTrainingJobCacheConfig",
                "type": "object"
            },
            "CreateTrainingJobCheckpointingConfig": {
                "properties": {
                    "enabled": {
                        "default": false,
                        "description": "Whether checkpointing is enabled.",
                        "examples": [
                            true
                        ],
                        "title": "Enabled",
                        "type": "boolean"
                    },
                    "checkpoint_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "path where checkpoints will be saved.",
                        "examples": [
                            "/mnt/ckpts"
                        ],
                        "title": "Checkpoint Path"
                    },
                    "volume_size_gib": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Size of the volume in gibibytes. If not provided, the default size will be used",
                        "examples": [
                            10
                        ],
                        "title": "Volume Size Gib"
                    }
                },
                "title": "CreateTrainingJobCheckpointingConfig",
                "type": "object"
            },
            "CreateTrainingJobComputeV1": {
                "description": "Configuration to specify the compute for a training job.",
                "properties": {
                    "node_count": {
                        "default": 1,
                        "description": "Number of nodes for the training job.",
                        "examples": [
                            1
                        ],
                        "title": "Node Count",
                        "type": "integer"
                    },
                    "cpu_count": {
                        "default": 1,
                        "description": "Number of cpus for the training job.",
                        "examples": [
                            1
                        ],
                        "title": "Cpu Count",
                        "type": "integer"
                    },
                    "memory": {
                        "default": "2Gi",
                        "description": "Memory for the training job.",
                        "examples": [
                            "2Gi"
                        ],
                        "title": "Memory",
                        "type": "string"
                    },
                    "accelerator": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/CreateTrainingJobAcceleratorV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "GPU specification for the training job",
                        "examples": [
                            {
                                "accelerator": "H100",
                                "count": 2
                            }
                        ]
                    }
                },
                "title": "CreateTrainingJobComputeV1",
                "type": "object"
            },
            "CreateTrainingJobImageV1": {
                "description": "Configuration to create a training job image.",
                "properties": {
                    "base_image": {
                        "description": "Base image for the training job.",
                        "examples": [
                            "hello-world"
                        ],
                        "title": "Base Image",
                        "type": "string"
                    },
                    "docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/DockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Docker authentication credentials"
                    }
                },
                "required": [
                    "base_image"
                ],
                "title": "CreateTrainingJobImageV1",
                "type": "object"
            },
            "CreateTrainingJobRuntimeV1": {
                "description": "Configuration to specify the runtime environment for a training job.",
                "properties": {
                    "start_commands": {
                        "description": "Commands to execute when starting the runtime.",
                        "examples": [
                            [
                                "python main.py"
                            ]
                        ],
                        "items": {
                            "type": "string"
                        },
                        "title": "Start Commands",
                        "type": "array"
                    },
                    "environment_variables": {
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "$ref": "#/components/schemas/SecretReferenceV1"
                                }
                            ]
                        },
                        "description": "Environment variables to set in the runtime.",
                        "examples": [
                            {
                                "API_KEY": "your_api_key_here",
                                "PATH": "/usr/bin"
                            }
                        ],
                        "title": "Environment Variables",
                        "type": "object"
                    },
                    "artifacts": {
                        "description": "Runtime artifacts for the training job.",
                        "items": {
                            "$ref": "#/components/schemas/CreateTrainingJobS3Artifact"
                        },
                        "title": "Artifacts",
                        "type": "array"
                    },
                    "enable_cache": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Deprecated. Use cache_config instead.",
                        "examples": [
                            true
                        ],
                        "title": "Enable Cache"
                    },
                    "cache_config": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/CreateTrainingJobCacheConfig"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Configuration for the read-write cache.",
                        "examples": [
                            {
                                "enable_legacy_hf_mount": true,
                                "enabled": true,
                                "mount_base_path": "/root/.cache",
                                "require_cache_affinity": true
                            }
                        ]
                    },
                    "checkpointing_config": {
                        "$ref": "#/components/schemas/CreateTrainingJobCheckpointingConfig",
                        "description": "Configuration for checkpointing.",
                        "examples": [
                            {
                                "checkpoint_path": "/mnt/ckpts",
                                "enabled": true,
                                "volume_size_gib": null
                            }
                        ]
                    },
                    "load_checkpoint_config": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/LoadCheckpointConfig"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Configuration for loading checkpoints"
                    }
                },
                "title": "CreateTrainingJobRuntimeV1",
                "type": "object"
            },
            "CreateTrainingJobS3Artifact": {
                "properties": {
                    "s3_bucket": {
                        "description": "S3 bucket for the uploaded runtime artifact.",
                        "examples": [
                            "my-s3-bucket"
                        ],
                        "title": "S3 Bucket",
                        "type": "string"
                    },
                    "s3_key": {
                        "description": "S3 key for the uploaded runtime artifact.",
                        "examples": [
                            "my-s3-key"
                        ],
                        "title": "S3 Key",
                        "type": "string"
                    }
                },
                "required": [
                    "s3_bucket",
                    "s3_key"
                ],
                "title": "CreateTrainingJobS3Artifact",
                "type": "object"
            },
            "CreateTrainingJobV1": {
                "description": "Configuration for a training job.",
                "properties": {
                    "image": {
                        "$ref": "#/components/schemas/CreateTrainingJobImageV1",
                        "examples": [
                            {
                                "base_image": "hello-world",
                                "docker_auth": null
                            }
                        ]
                    },
                    "compute": {
                        "$ref": "#/components/schemas/CreateTrainingJobComputeV1",
                        "examples": [
                            {
                                "accelerator": {
                                    "accelerator": "H100",
                                    "count": 2
                                },
                                "cpu_count": 1,
                                "memory": "2Gi",
                                "node_count": 1
                            }
                        ]
                    },
                    "runtime": {
                        "$ref": "#/components/schemas/CreateTrainingJobRuntimeV1",
                        "description": "Configuration for the runtime environment of the training job.",
                        "examples": [
                            {
                                "artifacts": [],
                                "cache_config": null,
                                "checkpointing_config": {
                                    "checkpoint_path": null,
                                    "enabled": false,
                                    "volume_size_gib": null
                                },
                                "enable_cache": null,
                                "environment_variables": {
                                    "API_KEY": "your_api_key_here",
                                    "PATH": "/usr/bin"
                                },
                                "load_checkpoint_config": null,
                                "start_commands": [
                                    "python main.py"
                                ]
                            }
                        ]
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the training job.",
                        "examples": [
                            "gpt-oss-job"
                        ],
                        "title": "Name"
                    },
                    "truss_user_env": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TrussUserEnv"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Truss user environment information"
                    },
                    "interactive_session": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/InteractiveSessionConfigV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Configuration for interactive debugging sessions."
                    },
                    "weights": {
                        "description": "MDN weight sources to mount in the training container. Weights are mirrored and cached for fast startup.",
                        "examples": [
                            [
                                {
                                    "allow_patterns": null,
                                    "auth": null,
                                    "auth_secret_name": null,
                                    "ignore_patterns": null,
                                    "mount_location": "/app/models/base",
                                    "source": "hf://meta-llama/Llama-3-8B@main"
                                }
                            ]
                        ],
                        "items": {
                            "$ref": "#/components/schemas/CreateJobWeightConfigV1"
                        },
                        "title": "Weights",
                        "type": "array"
                    },
                    "enable_baseten_workdir": {
                        "default": false,
                        "description": "When enabled, uses /b10/workspace as the working directory instead of the image WORKDIR.",
                        "examples": [
                            false,
                            true
                        ],
                        "title": "Enable Baseten Workdir",
                        "type": "boolean"
                    },
                    "priority": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Queue priority. Higher values are dequeued first. Defaults to 0.",
                        "examples": [
                            0,
                            10,
                            100
                        ],
                        "title": "Priority"
                    }
                },
                "required": [
                    "image"
                ],
                "title": "CreateTrainingJobV1",
                "type": "object"
            },
            "DockerAuthType": {
                "enum": [
                    "GCP_SERVICE_ACCOUNT_JSON",
                    "AWS_IAM",
                    "AWS_OIDC",
                    "GCP_OIDC",
                    "REGISTRY_SECRET"
                ],
                "title": "DockerAuthType",
                "type": "string"
            },
            "DockerAuthV1": {
                "description": "Docker authentication credentials.",
                "properties": {
                    "registry": {
                        "description": "Registry to authenticate with",
                        "title": "Registry",
                        "type": "string"
                    },
                    "auth_method": {
                        "$ref": "#/components/schemas/DockerAuthType",
                        "description": "Method to authenticate with the registry",
                        "examples": [
                            "GCP_SERVICE_ACCOUNT_JSON",
                            "AWS_IAM",
                            "AWS_OIDC",
                            "GCP_OIDC",
                            "REGISTRY_SECRET"
                        ]
                    },
                    "gcp_service_account_json_docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/GcpServiceAccountJsonDockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "GCP service account details for the registry"
                    },
                    "aws_iam_docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AwsIamDockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "AWS details for the registry"
                    },
                    "aws_oidc_docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AwsOidcDockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "AWS OIDC details for the registry"
                    },
                    "gcp_oidc_docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/GcpOidcDockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "GCP OIDC details for the registry"
                    },
                    "registry_secret_docker_auth": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/RegistrySecretDockerAuthV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Required when auth_method is REGISTRY_SECRET. Supports any Docker registry (Docker Hub, GHCR, NGC, etc.) via username:password credentials stored as a Baseten secret."
                    }
                },
                "required": [
                    "registry",
                    "auth_method"
                ],
                "title": "DockerAuthV1",
                "type": "object"
            },
            "GcpOidcDockerAuthV1": {
                "description": "GCP OIDC details for the registry.",
                "properties": {
                    "service_account": {
                        "description": "GCP service account name for OIDC authentication",
                        "title": "Service Account",
                        "type": "string"
                    },
                    "workload_identity_provider": {
                        "description": "GCP workload identity provider for OIDC authentication",
                        "title": "Workload Identity Provider",
                        "type": "string"
                    }
                },
                "required": [
                    "service_account",
                    "workload_identity_provider"
                ],
                "title": "GcpOidcDockerAuthV1",
                "type": "object"
            },
            "GcpServiceAccountJsonDockerAuthV1": {
                "description": "GCP details for the registry.",
                "properties": {
                    "service_account_json_secret_ref": {
                        "$ref": "#/components/schemas/SecretReferenceV1",
                        "description": "Name of the service account secret"
                    }
                },
                "required": [
                    "service_account_json_secret_ref"
                ],
                "title": "GcpServiceAccountJsonDockerAuthV1",
                "type": "object"
            },
            "GitInfo": {
                "properties": {
                    "latest_commit_sha": {
                        "title": "Latest Commit Sha",
                        "type": "string"
                    },
                    "latest_tag": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Latest Tag"
                    },
                    "commits_since_tag": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Commits Since Tag"
                    },
                    "has_uncommitted_changes": {
                        "title": "Has Uncommitted Changes",
                        "type": "boolean"
                    }
                },
                "required": [
                    "latest_commit_sha",
                    "latest_tag",
                    "commits_since_tag",
                    "has_uncommitted_changes"
                ],
                "title": "GitInfo",
                "type": "object"
            },
            "InteractiveSessionConfigV1": {
                "description": "Configuration for interactive debugging sessions on training jobs.",
                "properties": {
                    "trigger": {
                        "$ref": "#/components/schemas/V1InteractiveSessionTrigger",
                        "default": "on_demand",
                        "description": "When to create the interactive session. 'on_startup' creates on job start, 'on_failure' creates on job failure, 'on_demand' bypasses automatic session creation."
                    },
                    "timeout_minutes": {
                        "default": 480,
                        "description": "Number of minutes before the interactive session times out.",
                        "examples": [
                            480,
                            1440,
                            10080
                        ],
                        "title": "Timeout Minutes",
                        "type": "integer"
                    },
                    "session_provider": {
                        "$ref": "#/components/schemas/V1InteractiveSessionProvider",
                        "default": "vs_code",
                        "description": "The IDE client for the interactive session."
                    },
                    "auth_provider": {
                        "$ref": "#/components/schemas/V1InteractiveSessionAuthProvider",
                        "default": "github",
                        "description": "The authentication provider for the interactive session."
                    }
                },
                "title": "InteractiveSessionConfigV1",
                "type": "object"
            },
            "LoadCheckpointConfig": {
                "properties": {
                    "enabled": {
                        "default": false,
                        "description": "Whether checkpoint loading is enabled",
                        "title": "Enabled",
                        "type": "boolean"
                    },
                    "download_folder": {
                        "default": "/tmp/loaded_checkpoints",
                        "description": "Folder where checkpoints will be downloaded",
                        "title": "Download Folder",
                        "type": "string"
                    },
                    "checkpoints": {
                        "description": "List of checkpoint configurations",
                        "items": {
                            "discriminator": {
                                "mapping": {
                                    "baseten_latest_checkpoint": "#/components/schemas/BasetenLatestCheckpointConfig",
                                    "baseten_named_checkpoint": "#/components/schemas/BasetenNamedCheckpointConfig"
                                },
                                "propertyName": "typ"
                            },
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/BasetenLatestCheckpointConfig"
                                },
                                {
                                    "$ref": "#/components/schemas/BasetenNamedCheckpointConfig"
                                }
                            ]
                        },
                        "title": "Checkpoints",
                        "type": "array"
                    }
                },
                "title": "LoadCheckpointConfig",
                "type": "object"
            },
            "RegistrySecretDockerAuthV1": {
                "description": "Authentication via a Baseten secret for any Docker registry (Docker Hub, GHCR, NGC, etc.).\nThe referenced secret must contain credentials in the format 'username:password'.\nFor Docker Hub, set registry to 'https://index.docker.io/v1/'. For GHCR, use 'ghcr.io'.",
                "properties": {
                    "secret_ref": {
                        "$ref": "#/components/schemas/SecretReferenceV1",
                        "description": "Reference to a Baseten secret containing credentials in the format 'username:password'"
                    }
                },
                "required": [
                    "secret_ref"
                ],
                "title": "RegistrySecretDockerAuthV1",
                "type": "object"
            },
            "SecretReferenceV1": {
                "properties": {
                    "name": {
                        "description": "Name of the secret to reference.",
                        "examples": [
                            "hf_token"
                        ],
                        "title": "Name",
                        "type": "string"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "SecretReferenceV1",
                "type": "object"
            },
            "TrussUserEnv": {
                "description": "This data models is used to flexibly store info alongside oracle versions.\n\nThere is a corresponding data model in the truss client.\nIn contrast, here all fields are optional for backwards compatibility with old\nclients.",
                "properties": {
                    "truss_client_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Truss Client Version"
                    },
                    "python_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Python Version"
                    },
                    "pydantic_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Pydantic Version"
                    },
                    "mypy_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Mypy Version"
                    },
                    "is_library_deployment": {
                        "default": false,
                        "title": "Is Library Deployment",
                        "type": "boolean"
                    },
                    "is_frontend_deployment": {
                        "default": false,
                        "title": "Is Frontend Deployment",
                        "type": "boolean"
                    },
                    "git_info": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/GitInfo"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null
                    }
                },
                "title": "TrussUserEnv",
                "type": "object"
            },
            "V1InteractiveSessionAuthProvider": {
                "enum": [
                    "github",
                    "microsoft"
                ],
                "title": "V1InteractiveSessionAuthProvider",
                "type": "string"
            },
            "V1InteractiveSessionProvider": {
                "enum": [
                    "vs_code",
                    "cursor",
                    "ssh"
                ],
                "title": "V1InteractiveSessionProvider",
                "type": "string"
            },
            "V1InteractiveSessionTrigger": {
                "enum": [
                    "on_startup",
                    "on_failure",
                    "on_demand"
                ],
                "title": "V1InteractiveSessionTrigger",
                "type": "string"
            },
            "CreateTrainingJobRequestV1": {
                "description": "A request to create a training job.",
                "properties": {
                    "training_job": {
                        "$ref": "#/components/schemas/CreateTrainingJobV1",
                        "description": "The training job to create."
                    }
                },
                "required": [
                    "training_job"
                ],
                "title": "CreateTrainingJobRequestV1",
                "type": "object"
            },
            "CreateTrainingJobResponseV1": {
                "description": "A response to creating a training job.",
                "properties": {
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The created training job."
                    }
                },
                "required": [
                    "training_job"
                ],
                "title": "CreateTrainingJobResponseV1",
                "type": "object"
            },
            "TrainingJobTombstoneV1": {
                "description": "A training job tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the training job",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the training job was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    },
                    "training_project_id": {
                        "description": "Unique identifier of the training project",
                        "title": "Training Project Id",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "deleted",
                    "training_project_id"
                ],
                "title": "TrainingJobTombstoneV1",
                "type": "object"
            },
            "GetTrainingJobResponseV1": {
                "description": "A response to fetch a training job.",
                "properties": {
                    "training_project": {
                        "$ref": "#/components/schemas/TrainingProjectV1",
                        "description": "The training project."
                    },
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The fetched training job."
                    }
                },
                "required": [
                    "training_project",
                    "training_job"
                ],
                "title": "GetTrainingJobResponseV1",
                "type": "object"
            },
            "DownloadTrainingJobResponseV1": {
                "description": "A response that includes the artifacts for a training job",
                "properties": {
                    "artifact_presigned_urls": {
                        "description": "Presigned URL's for the artifacts",
                        "items": {
                            "type": "string"
                        },
                        "title": "Artifact Presigned Urls",
                        "type": "array"
                    }
                },
                "required": [
                    "artifact_presigned_urls"
                ],
                "title": "DownloadTrainingJobResponseV1",
                "type": "object"
            },
            "RecreateTrainingJobResponseV1": {
                "description": "A response that sends the new training job",
                "properties": {
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The created training job."
                    }
                },
                "required": [
                    "training_job"
                ],
                "title": "RecreateTrainingJobResponseV1",
                "type": "object"
            },
            "GetTrainingJobLogsRequestV1": {
                "description": "A request to fetch training logs.",
                "properties": {
                    "start_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to start fetching logs",
                        "title": "Start Epoch Millis"
                    },
                    "end_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to end fetching logs",
                        "title": "End Epoch Millis"
                    },
                    "direction": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SortOrderV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Sort order for logs"
                    },
                    "limit": {
                        "anyOf": [
                            {
                                "maximum": 1000,
                                "minimum": 1,
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": 500,
                        "description": "Limit of logs to fetch in a single request",
                        "title": "Limit"
                    }
                },
                "title": "GetTrainingJobLogsRequestV1",
                "type": "object"
            },
            "GetTrainingJobMetricsRequestV1": {
                "description": "A request to fetch metrics. Allows the user to request metrics over a period of time.",
                "properties": {
                    "end_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to end fetching metrics",
                        "title": "End Epoch Millis"
                    },
                    "start_epoch_millis": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Epoch millis timestamp to start fetching metrics.",
                        "title": "Start Epoch Millis"
                    }
                },
                "title": "GetTrainingJobMetricsRequestV1",
                "type": "object"
            },
            "StorageMetricsV1": {
                "description": "A metric for a training job.",
                "properties": {
                    "usage_bytes": {
                        "description": "The number of bytes used on the storage entity.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Usage Bytes",
                        "type": "array"
                    },
                    "utilization": {
                        "description": "The utilization of the storage entity as a decimal percentage.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Utilization",
                        "type": "array"
                    }
                },
                "required": [
                    "usage_bytes",
                    "utilization"
                ],
                "title": "StorageMetricsV1",
                "type": "object"
            },
            "TrainingJobMetricV1": {
                "description": "A metric for a training job.",
                "properties": {
                    "value": {
                        "description": "The value of the metric.",
                        "title": "Value",
                        "type": "number"
                    },
                    "timestamp": {
                        "description": "The timestamp of the metric in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Timestamp",
                        "type": "string"
                    }
                },
                "required": [
                    "value",
                    "timestamp"
                ],
                "title": "TrainingJobMetricV1",
                "type": "object"
            },
            "TrainingJobMetricsV1": {
                "properties": {
                    "gpu_memory_usage_bytes": {
                        "additionalProperties": {
                            "items": {
                                "$ref": "#/components/schemas/TrainingJobMetricV1"
                            },
                            "type": "array"
                        },
                        "description": "A map of GPU rank to memory usage for the training job. For multinode jobs, this is the memory usage of the leader unless specified otherwise.",
                        "title": "Gpu Memory Usage Bytes",
                        "type": "object"
                    },
                    "gpu_utilization": {
                        "additionalProperties": {
                            "items": {
                                "$ref": "#/components/schemas/TrainingJobMetricV1"
                            },
                            "type": "array"
                        },
                        "description": "A map of GPU rank to fractional GPU utilization. For multinode jobs, this is the GPU utilization of the leader unless specified otherwise.",
                        "title": "Gpu Utilization",
                        "type": "object"
                    },
                    "cpu_usage": {
                        "description": "The CPU usage measured in cores. For multinode jobs, this is the CPU usage of the leader unless specified otherwise.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Cpu Usage",
                        "type": "array"
                    },
                    "cpu_memory_usage_bytes": {
                        "description": "The CPU memory usage for the training job. For multinode jobs, this is the CPU memory usage of the leader unless specified otherwise.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Cpu Memory Usage Bytes",
                        "type": "array"
                    },
                    "ephemeral_storage": {
                        "$ref": "#/components/schemas/StorageMetricsV1",
                        "description": "The storage usage for the ephemeral storage. For multinode jobs, this is the ephemeral storage usage of the leader unless specified otherwise."
                    }
                },
                "required": [
                    "gpu_memory_usage_bytes",
                    "gpu_utilization",
                    "cpu_usage",
                    "cpu_memory_usage_bytes",
                    "ephemeral_storage"
                ],
                "title": "TrainingJobMetricsV1",
                "type": "object"
            },
            "TrainingJobNodeMetricsV1": {
                "description": "A set of metrics for a training job node.",
                "properties": {
                    "node_id": {
                        "description": "The name of the node.",
                        "title": "Node Id",
                        "type": "string"
                    },
                    "metrics": {
                        "$ref": "#/components/schemas/TrainingJobMetricsV1",
                        "description": "The metrics for the node."
                    }
                },
                "required": [
                    "node_id",
                    "metrics"
                ],
                "title": "TrainingJobNodeMetricsV1",
                "type": "object"
            },
            "GetTrainingJobMetricsResponseV1": {
                "description": "A response to fetch training job metrics. The outer list for each metric represents that metric across time.",
                "properties": {
                    "gpu_memory_usage_bytes": {
                        "additionalProperties": {
                            "items": {
                                "$ref": "#/components/schemas/TrainingJobMetricV1"
                            },
                            "type": "array"
                        },
                        "description": "A map of GPU rank to memory usage for the training job. For multinode jobs, this is the memory usage of the leader unless specified otherwise.",
                        "title": "Gpu Memory Usage Bytes",
                        "type": "object"
                    },
                    "gpu_utilization": {
                        "additionalProperties": {
                            "items": {
                                "$ref": "#/components/schemas/TrainingJobMetricV1"
                            },
                            "type": "array"
                        },
                        "description": "A map of GPU rank to fractional GPU utilization. For multinode jobs, this is the GPU utilization of the leader unless specified otherwise.",
                        "title": "Gpu Utilization",
                        "type": "object"
                    },
                    "cpu_usage": {
                        "description": "The CPU usage measured in cores. For multinode jobs, this is the CPU usage of the leader unless specified otherwise.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Cpu Usage",
                        "type": "array"
                    },
                    "cpu_memory_usage_bytes": {
                        "description": "The CPU memory usage for the training job. For multinode jobs, this is the CPU memory usage of the leader unless specified otherwise.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobMetricV1"
                        },
                        "title": "Cpu Memory Usage Bytes",
                        "type": "array"
                    },
                    "ephemeral_storage": {
                        "$ref": "#/components/schemas/StorageMetricsV1",
                        "description": "The storage usage for the ephemeral storage. For multinode jobs, this is the ephemeral storage usage of the leader unless specified otherwise."
                    },
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The training job."
                    },
                    "cache": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/StorageMetricsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The storage usage for the read-write cache."
                    },
                    "per_node_metrics": {
                        "description": "The metrics for each node in the training job.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobNodeMetricsV1"
                        },
                        "title": "Per Node Metrics",
                        "type": "array"
                    }
                },
                "required": [
                    "gpu_memory_usage_bytes",
                    "gpu_utilization",
                    "cpu_usage",
                    "cpu_memory_usage_bytes",
                    "ephemeral_storage",
                    "training_job",
                    "cache",
                    "per_node_metrics"
                ],
                "title": "GetTrainingJobMetricsResponseV1",
                "type": "object"
            },
            "StopTrainingJobRequestV1": {
                "description": "A request to stop a training job.",
                "properties": {},
                "title": "StopTrainingJobRequestV1",
                "type": "object"
            },
            "StopTrainingJobResponseV1": {
                "description": "A response to stopping a training job.",
                "properties": {
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The stopped training job."
                    }
                },
                "required": [
                    "training_job"
                ],
                "title": "StopTrainingJobResponseV1",
                "type": "object"
            },
            "TrainingJobCheckpointV1": {
                "description": "A checkpoint for a training job.",
                "properties": {
                    "checkpoint_id": {
                        "description": "The ID of the checkpoint.",
                        "title": "Checkpoint Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "The timestamp of the checkpoint in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "checkpoint_type": {
                        "description": "The type of checkpoint.",
                        "title": "Checkpoint Type",
                        "type": "string"
                    },
                    "base_model": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The base model of the checkpoint.",
                        "title": "Base Model"
                    },
                    "lora_adapter_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The adapter config of the checkpoint.",
                        "title": "Lora Adapter Config"
                    },
                    "size_bytes": {
                        "description": "The size of the checkpoint in bytes.",
                        "title": "Size Bytes",
                        "type": "integer"
                    },
                    "sync_status": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Sync state of the checkpoint: SYNCING or COMPLETE.",
                        "title": "Sync Status"
                    },
                    "training_job_id": {
                        "description": "The ID of the training job.",
                        "title": "Training Job Id",
                        "type": "string"
                    }
                },
                "required": [
                    "checkpoint_id",
                    "created_at",
                    "checkpoint_type",
                    "base_model",
                    "lora_adapter_config",
                    "size_bytes",
                    "training_job_id"
                ],
                "title": "TrainingJobCheckpointV1",
                "type": "object"
            },
            "GetTrainingJobCheckpointsResponseV1": {
                "description": "A response to fetch checkpoints for a training job.",
                "properties": {
                    "training_job": {
                        "$ref": "#/components/schemas/TrainingJobV1",
                        "description": "The training job."
                    },
                    "checkpoints": {
                        "description": "The checkpoints for the training job.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobCheckpointV1"
                        },
                        "title": "Checkpoints",
                        "type": "array"
                    }
                },
                "required": [
                    "training_job",
                    "checkpoints"
                ],
                "title": "GetTrainingJobCheckpointsResponseV1",
                "type": "object"
            },
            "CheckpointFile": {
                "properties": {
                    "url": {
                        "title": "Url",
                        "type": "string"
                    },
                    "relative_file_name": {
                        "title": "Relative File Name",
                        "type": "string"
                    },
                    "node_rank": {
                        "title": "Node Rank",
                        "type": "integer"
                    },
                    "size_bytes": {
                        "title": "Size Bytes",
                        "type": "integer"
                    },
                    "last_modified": {
                        "title": "Last Modified",
                        "type": "string"
                    }
                },
                "required": [
                    "url",
                    "relative_file_name",
                    "node_rank",
                    "size_bytes",
                    "last_modified"
                ],
                "title": "CheckpointFile",
                "type": "object"
            },
            "GetTrainingJobCheckpointFilesResponseV1": {
                "description": "A response to fetch presigned URLs for checkpoint files of a training job.",
                "properties": {
                    "presigned_urls": {
                        "description": "List of presigned URLs for checkpoint files.",
                        "items": {
                            "$ref": "#/components/schemas/CheckpointFile"
                        },
                        "title": "Presigned Urls",
                        "type": "array"
                    },
                    "next_page_token": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Token to use for fetching the next page of results. None when there are no more results.",
                        "title": "Next Page Token"
                    },
                    "total_count": {
                        "description": "Total number of checkpoint files available.",
                        "title": "Total Count",
                        "type": "integer"
                    }
                },
                "required": [
                    "presigned_urls",
                    "total_count"
                ],
                "title": "GetTrainingJobCheckpointFilesResponseV1",
                "type": "object"
            },
            "AuthCodeV1": {
                "description": "Authentication code for a training job interactive session node.",
                "properties": {
                    "session_id": {
                        "description": "Unique identifier of the interactive session.",
                        "title": "Session Id",
                        "type": "string"
                    },
                    "replica_id": {
                        "description": "Replica identifier in gXXrY format (e.g., 'g00r0' for group 0, replica 0).",
                        "title": "Replica Id",
                        "type": "string"
                    },
                    "auth_code": {
                        "description": "The device authentication code (e.g., '4F64-C0D9').",
                        "title": "Auth Code",
                        "type": "string"
                    },
                    "auth_url": {
                        "description": "URL where the user should enter the auth code (e.g., 'https://github.com/login/device').",
                        "title": "Auth Url",
                        "type": "string"
                    },
                    "generated_at": {
                        "anyOf": [
                            {
                                "format": "date-time",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "When the auth code was generated, in ISO 8601 format.",
                        "title": "Generated At"
                    },
                    "tunnel_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The name of the tunnel node.",
                        "title": "Tunnel Name"
                    },
                    "expires_at": {
                        "anyOf": [
                            {
                                "format": "date-time",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "When the session expires, in ISO 8601 format.",
                        "title": "Expires At"
                    },
                    "working_directory": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The working directory of the session.",
                        "title": "Working Directory"
                    }
                },
                "required": [
                    "session_id",
                    "replica_id",
                    "auth_code",
                    "auth_url"
                ],
                "title": "AuthCodeV1",
                "type": "object"
            },
            "GetAuthCodesResponseV1": {
                "description": "Response containing auth codes for all nodes of a training job's interactive sessions.",
                "properties": {
                    "auth_codes": {
                        "description": "List of auth codes for each node that has an active interactive session.",
                        "items": {
                            "$ref": "#/components/schemas/AuthCodeV1"
                        },
                        "title": "Auth Codes",
                        "type": "array"
                    }
                },
                "required": [
                    "auth_codes"
                ],
                "title": "GetAuthCodesResponseV1",
                "type": "object"
            },
            "PatchInteractiveSessionRequestV1": {
                "description": "Request to patch an interactive session.\n\nOnly fields that are provided (non-None) will be applied.",
                "properties": {
                    "timeout_minutes": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "For on_startup sessions, minutes to add to the expiration. For on_demand/on_failure sessions, minutes to add to the timeout. Use -1 for infinite timeout (bumps by 10 years).",
                        "title": "Timeout Minutes"
                    },
                    "trigger": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/V1InteractiveSessionTrigger"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Update when the interactive session is created. Cannot be changed if the session trigger is 'on_startup'."
                    }
                },
                "title": "PatchInteractiveSessionRequestV1",
                "type": "object"
            },
            "InteractiveSessionV1": {
                "description": "Representation of a training job interactive session.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the interactive session.",
                        "title": "Id",
                        "type": "string"
                    },
                    "trigger": {
                        "description": "When the interactive session is created.",
                        "title": "Trigger",
                        "type": "string"
                    },
                    "timeout_minutes": {
                        "description": "Minutes before the session times out.",
                        "title": "Timeout Minutes",
                        "type": "integer"
                    },
                    "session_provider": {
                        "description": "The IDE client for the session.",
                        "title": "Session Provider",
                        "type": "string"
                    },
                    "auth_provider": {
                        "description": "The authentication provider for the session.",
                        "title": "Auth Provider",
                        "type": "string"
                    },
                    "pod_name": {
                        "description": "Pod name / node rank for the session.",
                        "title": "Pod Name",
                        "type": "string"
                    },
                    "expires_at": {
                        "anyOf": [
                            {
                                "format": "date-time",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "When the session expires, in ISO 8601 format.",
                        "title": "Expires At"
                    },
                    "tunnel_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The tunnel name for the session.",
                        "title": "Tunnel Name"
                    },
                    "auth_code": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The device authentication code.",
                        "title": "Auth Code"
                    },
                    "auth_url": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "URL where the user should enter the auth code.",
                        "title": "Auth Url"
                    },
                    "auth_code_generated_at": {
                        "anyOf": [
                            {
                                "format": "date-time",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "When the auth code was generated.",
                        "title": "Auth Code Generated At"
                    },
                    "authenticated_at": {
                        "anyOf": [
                            {
                                "format": "date-time",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "When the session was authenticated.",
                        "title": "Authenticated At"
                    },
                    "working_directory": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The working directory of the session.",
                        "title": "Working Directory"
                    }
                },
                "required": [
                    "id",
                    "trigger",
                    "timeout_minutes",
                    "session_provider",
                    "auth_provider",
                    "pod_name"
                ],
                "title": "InteractiveSessionV1",
                "type": "object"
            },
            "PatchInteractiveSessionResponseV1": {
                "description": "Response after patching an interactive session.",
                "properties": {
                    "interactive_session": {
                        "$ref": "#/components/schemas/InteractiveSessionV1",
                        "description": "The updated interactive session."
                    },
                    "message": {
                        "description": "Human-readable summary of what was updated.",
                        "title": "Message",
                        "type": "string"
                    }
                },
                "required": [
                    "interactive_session",
                    "message"
                ],
                "title": "PatchInteractiveSessionResponseV1",
                "type": "object"
            },
            "FileSummary": {
                "description": "Information about a file in the cache.",
                "properties": {
                    "path": {
                        "description": "Relative path of the file in the cache",
                        "title": "Path",
                        "type": "string"
                    },
                    "size_bytes": {
                        "description": "Size of the file in bytes",
                        "title": "Size Bytes",
                        "type": "integer"
                    },
                    "modified": {
                        "description": "Last modification time of the file",
                        "title": "Modified",
                        "type": "string"
                    },
                    "file_type": {
                        "description": "Type of the file",
                        "title": "File Type",
                        "type": "string"
                    },
                    "permissions": {
                        "description": "Permissions of the file",
                        "title": "Permissions",
                        "type": "string"
                    }
                },
                "required": [
                    "path",
                    "size_bytes",
                    "modified",
                    "file_type",
                    "permissions"
                ],
                "title": "FileSummary",
                "type": "object"
            },
            "GetCacheSummaryResponseV1": {
                "description": "Response for getting cache summary.",
                "properties": {
                    "timestamp": {
                        "description": "Timestamp when the cache summary was captured",
                        "title": "Timestamp",
                        "type": "string"
                    },
                    "project_id": {
                        "description": "Project ID associated with the cache",
                        "title": "Project Id",
                        "type": "string"
                    },
                    "file_summaries": {
                        "description": "List of files in the cache",
                        "items": {
                            "$ref": "#/components/schemas/FileSummary"
                        },
                        "title": "File Summaries",
                        "type": "array"
                    }
                },
                "required": [
                    "timestamp",
                    "project_id",
                    "file_summaries"
                ],
                "title": "GetCacheSummaryResponseV1",
                "type": "object"
            },
            "TrainingProjectTombstoneV1": {
                "description": "A training project tombstone.",
                "properties": {
                    "id": {
                        "description": "Unique identifier of the training project",
                        "title": "Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the training project was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "deleted"
                ],
                "title": "TrainingProjectTombstoneV1",
                "type": "object"
            },
            "GetTrainingProjectResponseV1": {
                "description": "A response to getting a training project.",
                "properties": {
                    "training_project": {
                        "$ref": "#/components/schemas/TrainingProjectV1",
                        "description": "The training project."
                    }
                },
                "required": [
                    "training_project"
                ],
                "title": "GetTrainingProjectResponseV1",
                "type": "object"
            },
            "OrderByV1": {
                "description": "A request to order training jobs.",
                "properties": {
                    "field": {
                        "description": "The field to order by.",
                        "examples": [
                            "created_at"
                        ],
                        "title": "Field",
                        "type": "string"
                    },
                    "order": {
                        "description": "The direction to order by.",
                        "examples": [
                            "asc",
                            "desc"
                        ],
                        "title": "Order",
                        "type": "string"
                    }
                },
                "required": [
                    "field",
                    "order"
                ],
                "title": "OrderByV1",
                "type": "object"
            },
            "SearchTrainingJobsRequestV1": {
                "description": "A request to search training jobs.",
                "properties": {
                    "project_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Filter the training jobs by project ID.",
                        "examples": [
                            "n4q95w5"
                        ],
                        "title": "Project Id"
                    },
                    "job_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Filter the training jobs by job ID.",
                        "examples": [
                            "p7qr9qv"
                        ],
                        "title": "Job Id"
                    },
                    "statuses": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Filter the training jobs by status.",
                        "examples": [
                            [
                                "TRAINING_JOB_RUNNING",
                                "TRAINING_JOB_COMPLETED"
                            ]
                        ],
                        "title": "Statuses"
                    },
                    "order_by": {
                        "default": [
                            {
                                "field": "created_at",
                                "order": "desc"
                            }
                        ],
                        "description": "Order the training jobs by a field. Currently supports created_at",
                        "items": {
                            "$ref": "#/components/schemas/OrderByV1"
                        },
                        "title": "Order By",
                        "type": "array"
                    }
                },
                "title": "SearchTrainingJobsRequestV1",
                "type": "object"
            },
            "SearchTrainingJobsResponseV1": {
                "description": "A response to search training jobs.",
                "properties": {
                    "training_jobs": {
                        "description": "List of training jobs.",
                        "items": {
                            "$ref": "#/components/schemas/TrainingJobV1"
                        },
                        "title": "Training Jobs",
                        "type": "array"
                    }
                },
                "required": [
                    "training_jobs"
                ],
                "title": "SearchTrainingJobsResponseV1",
                "type": "object"
            },
            "SearchTrainersRequestV1": {
                "description": "Filters for searching trainers visible to the requesting user.",
                "properties": {
                    "trainer_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Filter by trainer ID.",
                        "examples": [
                            "k4q95w5"
                        ],
                        "title": "Trainer Id"
                    }
                },
                "title": "SearchTrainersRequestV1",
                "type": "object"
            },
            "SearchedTrainerV1": {
                "description": "Trainer entry returned by /v1/trainers/search.",
                "properties": {
                    "trainer_id": {
                        "description": "The trainer ID.",
                        "title": "Trainer Id",
                        "type": "string"
                    },
                    "session_id": {
                        "description": "The session ID this trainer belongs to.",
                        "title": "Session Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "The HuggingFace base model the trainer is fine-tuning.",
                        "title": "Base Model",
                        "type": "string"
                    }
                },
                "required": [
                    "trainer_id",
                    "session_id",
                    "base_model"
                ],
                "title": "SearchedTrainerV1",
                "type": "object"
            },
            "SearchTrainersResponseV1": {
                "description": "Trainers matching the search filters.",
                "properties": {
                    "trainers": {
                        "description": "List of trainers.",
                        "items": {
                            "$ref": "#/components/schemas/SearchedTrainerV1"
                        },
                        "title": "Trainers",
                        "type": "array"
                    }
                },
                "required": [
                    "trainers"
                ],
                "title": "SearchTrainersResponseV1",
                "type": "object"
            },
            "CheckpointSearchRequestV1": {
                "description": "Lookup body for ``POST /v1/trainers/checkpoints/search``.",
                "properties": {
                    "checkpoint_path": {
                        "description": "bt:// URI of a trainer checkpoint. Form: bt://loops:<trainer_id>/(weights|sampler_weights)/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/sampler_weights/step-100"
                        ],
                        "title": "Checkpoint Path",
                        "type": "string"
                    }
                },
                "required": [
                    "checkpoint_path"
                ],
                "title": "CheckpointSearchRequestV1",
                "type": "object"
            },
            "TrainerCheckpointTarget": {
                "description": "Whether a TrainerServerCheckpoint is loadable by the sampler or the trainer.\n\nSAMPLER checkpoints are consumed by the sampling server for inference;\nTRAINER checkpoints capture full trainer state for resuming training.\nMirrored in the bt:// URI as\n``bt://loops:<trainer_id>/(sampler_weights|weights)/<name>``.",
                "enum": [
                    "sampler",
                    "trainer"
                ],
                "title": "TrainerCheckpointTarget",
                "type": "string"
            },
            "TrainerServerCheckpointV1": {
                "description": "A checkpoint saved by a trainer.",
                "properties": {
                    "checkpoint_id": {
                        "description": "The ID of the checkpoint.",
                        "title": "Checkpoint Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "The timestamp of the checkpoint in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "checkpoint_type": {
                        "description": "The type of checkpoint.",
                        "title": "Checkpoint Type",
                        "type": "string"
                    },
                    "base_model": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The base model of the checkpoint.",
                        "title": "Base Model"
                    },
                    "lora_adapter_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The adapter config of the checkpoint.",
                        "title": "Lora Adapter Config"
                    },
                    "size_bytes": {
                        "description": "The size of the checkpoint in bytes.",
                        "title": "Size Bytes",
                        "type": "integer"
                    },
                    "sync_status": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Sync state of the checkpoint: SYNCING or COMPLETE.",
                        "title": "Sync Status"
                    },
                    "id": {
                        "description": "The TrainerServerCheckpoint database ID.",
                        "title": "Id",
                        "type": "string"
                    },
                    "trainer_id": {
                        "description": "The ID of the trainer.",
                        "title": "Trainer Id",
                        "type": "string"
                    },
                    "target": {
                        "$ref": "#/components/schemas/TrainerCheckpointTarget",
                        "description": "Whether this checkpoint is loadable by the sampler ('sampler') or by the trainer ('trainer')."
                    }
                },
                "required": [
                    "checkpoint_id",
                    "created_at",
                    "checkpoint_type",
                    "base_model",
                    "lora_adapter_config",
                    "size_bytes",
                    "id",
                    "trainer_id",
                    "target"
                ],
                "title": "TrainerServerCheckpointV1",
                "type": "object"
            },
            "CheckpointSearchResponseV1": {
                "description": "Response for ``POST /v1/trainers/checkpoints/search``.",
                "properties": {
                    "checkpoint": {
                        "$ref": "#/components/schemas/TrainerServerCheckpointV1",
                        "description": "The checkpoint metadata (id, target, type, sizes, etc.)."
                    }
                },
                "required": [
                    "checkpoint"
                ],
                "title": "CheckpointSearchResponseV1",
                "type": "object"
            },
            "CreateTrainerSessionRequestV1": {
                "properties": {
                    "training_project_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "ID of the training project to associate with. If omitted, a default project is created for the org.",
                        "title": "Training Project Id"
                    }
                },
                "title": "CreateTrainerSessionRequestV1",
                "type": "object"
            },
            "TrainerSessionV1": {
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string"
                    }
                },
                "required": [
                    "id"
                ],
                "title": "TrainerSessionV1",
                "type": "object"
            },
            "CreateTrainerSessionResponseV1": {
                "properties": {
                    "session": {
                        "$ref": "#/components/schemas/TrainerSessionV1"
                    }
                },
                "required": [
                    "session"
                ],
                "title": "CreateTrainerSessionResponseV1",
                "type": "object"
            },
            "CreateTrainerServerRequestV1": {
                "properties": {
                    "model": {
                        "description": "Base model ID (e.g. 'Qwen/Qwen3-8B').",
                        "title": "Model",
                        "type": "string"
                    },
                    "max_seq_len": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Maximum sequence length for training. Defaults to the maximum supported by the model configuration.",
                        "title": "Max Seq Len"
                    },
                    "lora_rank": {
                        "default": 64,
                        "description": "LoRA rank.",
                        "title": "Lora Rank",
                        "type": "integer"
                    },
                    "seed": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Random seed for reproducibility.",
                        "title": "Seed"
                    },
                    "scale_down_delay_seconds": {
                        "default": 3600,
                        "description": "Seconds of inactivity before the trainer scales to zero. Must be positive. Defaults to 3600 (1 hour).",
                        "exclusiveMinimum": 0,
                        "title": "Scale Down Delay Seconds",
                        "type": "integer"
                    },
                    "checkpoint_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional bt:// URI of an existing trainer-target checkpoint to resume training from. Form: bt://loops:<trainer_id>/weights/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/weights/step-100"
                        ],
                        "title": "Checkpoint Path"
                    }
                },
                "required": [
                    "model"
                ],
                "title": "CreateTrainerServerRequestV1",
                "type": "object"
            },
            "SamplingServerV1": {
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string"
                    },
                    "base_url": {
                        "title": "Base Url",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "base_url"
                ],
                "title": "SamplingServerV1",
                "type": "object"
            },
            "TrainerServerV1": {
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string"
                    },
                    "base_url": {
                        "title": "Base Url",
                        "type": "string"
                    },
                    "sampling_server": {
                        "$ref": "#/components/schemas/SamplingServerV1"
                    }
                },
                "required": [
                    "id",
                    "base_url",
                    "sampling_server"
                ],
                "title": "TrainerServerV1",
                "type": "object"
            },
            "CreateTrainerServerResponseV1": {
                "properties": {
                    "trainer_server": {
                        "$ref": "#/components/schemas/TrainerServerV1"
                    }
                },
                "required": [
                    "trainer_server"
                ],
                "title": "CreateTrainerServerResponseV1",
                "type": "object"
            },
            "CreateSamplingServerRequestV1": {
                "properties": {
                    "model": {
                        "description": "Model to use for standalone samplers (eg, for baselines).",
                        "title": "Model",
                        "type": "string"
                    },
                    "max_seq_length": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Maximum prompt length (in tokens) the sampler must handle. Set this to the longest prompt you plan to send. Omit to use the default for the base model.",
                        "title": "Max Seq Length"
                    },
                    "checkpoint_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional bt:// URI of an existing sampler-target checkpoint to load weights from on startup. Form: bt://loops:<trainer_id>/sampler_weights/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/sampler_weights/step-100"
                        ],
                        "title": "Checkpoint Path"
                    }
                },
                "required": [
                    "model"
                ],
                "title": "CreateSamplingServerRequestV1",
                "type": "object"
            },
            "CreateSamplingServerResponseV1": {
                "properties": {
                    "sampling_server": {
                        "$ref": "#/components/schemas/SamplingServerV1"
                    }
                },
                "required": [
                    "sampling_server"
                ],
                "title": "CreateSamplingServerResponseV1",
                "type": "object"
            },
            "GetTrainerServerCheckpointsResponseV1": {
                "description": "A response to list checkpoints for a trainer.",
                "properties": {
                    "trainer_id": {
                        "description": "The ID of the trainer.",
                        "title": "Trainer Id",
                        "type": "string"
                    },
                    "checkpoints": {
                        "description": "The checkpoints for the trainer.",
                        "items": {
                            "$ref": "#/components/schemas/TrainerServerCheckpointV1"
                        },
                        "title": "Checkpoints",
                        "type": "array"
                    }
                },
                "required": [
                    "trainer_id",
                    "checkpoints"
                ],
                "title": "GetTrainerServerCheckpointsResponseV1",
                "type": "object"
            },
            "GetTrainerServerCheckpointFilesResponseV1": {
                "description": "A response to fetch presigned URLs for files under a trainer server checkpoint.",
                "properties": {
                    "presigned_urls": {
                        "description": "List of presigned URLs for checkpoint files.",
                        "items": {
                            "$ref": "#/components/schemas/CheckpointFile"
                        },
                        "title": "Presigned Urls",
                        "type": "array"
                    },
                    "next_page_token": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Token to use for fetching the next page of results. None when there are no more results.",
                        "title": "Next Page Token"
                    },
                    "total_count": {
                        "description": "Total number of checkpoint files available.",
                        "title": "Total Count",
                        "type": "integer"
                    }
                },
                "required": [
                    "presigned_urls",
                    "total_count"
                ],
                "title": "GetTrainerServerCheckpointFilesResponseV1",
                "type": "object"
            },
            "SupportedModelV1": {
                "description": "A model supported by the Loops server.",
                "properties": {
                    "model_name": {
                        "description": "The name of the supported model.",
                        "title": "Model Name",
                        "type": "string"
                    },
                    "max_context_length": {
                        "description": "The maximum context length (in tokens) supported by this model.",
                        "title": "Max Context Length",
                        "type": "integer"
                    }
                },
                "required": [
                    "model_name",
                    "max_context_length"
                ],
                "title": "SupportedModelV1",
                "type": "object"
            },
            "GetLoopsCapabilitiesResponseV1": {
                "description": "Response for ``GET /v1/loops/capabilities``.",
                "properties": {
                    "supported_models": {
                        "description": "List of models available on the server.",
                        "items": {
                            "$ref": "#/components/schemas/SupportedModelV1"
                        },
                        "title": "Supported Models",
                        "type": "array"
                    }
                },
                "required": [
                    "supported_models"
                ],
                "title": "GetLoopsCapabilitiesResponseV1",
                "type": "object"
            },
            "CreateLoopsSessionRequestV1": {
                "properties": {
                    "training_project_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "ID of the training project to associate with. If omitted, a default project is created for the org.",
                        "title": "Training Project Id"
                    }
                },
                "title": "CreateLoopsSessionRequestV1",
                "type": "object"
            },
            "LoopsSessionV1": {
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string"
                    }
                },
                "required": [
                    "id"
                ],
                "title": "LoopsSessionV1",
                "type": "object"
            },
            "CreateLoopsSessionResponseV1": {
                "properties": {
                    "session": {
                        "$ref": "#/components/schemas/LoopsSessionV1"
                    }
                },
                "required": [
                    "session"
                ],
                "title": "CreateLoopsSessionResponseV1",
                "type": "object"
            },
            "GetLoopsSessionResponseV1": {
                "description": "Response for ``GET /v1/loops/sessions/<session_id>``.",
                "properties": {
                    "session": {
                        "$ref": "#/components/schemas/LoopsSessionV1",
                        "description": "The Loops session."
                    }
                },
                "required": [
                    "session"
                ],
                "title": "GetLoopsSessionResponseV1",
                "type": "object"
            },
            "LoopsRunV1": {
                "properties": {
                    "id": {
                        "description": "The run ID.",
                        "title": "Id",
                        "type": "string"
                    },
                    "session_id": {
                        "description": "The session ID this run belongs to.",
                        "title": "Session Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "The HuggingFace base model the run is fine-tuning.",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "base_url": {
                        "description": "The run's base URL.",
                        "title": "Base Url",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the run was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "sampler": {
                        "$ref": "#/components/schemas/LoopsSamplerV1",
                        "description": "The sampler bound to this run."
                    }
                },
                "required": [
                    "id",
                    "session_id",
                    "base_model",
                    "base_url",
                    "created_at",
                    "sampler"
                ],
                "title": "LoopsRunV1",
                "type": "object"
            },
            "LoopsSamplerV1": {
                "properties": {
                    "id": {
                        "title": "Id",
                        "type": "string"
                    },
                    "base_url": {
                        "title": "Base Url",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "The HuggingFace base model the sampler is serving.",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the sampler was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "base_url",
                    "base_model",
                    "created_at"
                ],
                "title": "LoopsSamplerV1",
                "type": "object"
            },
            "ListLoopsRunsResponseV1": {
                "description": "Runs matching the query filters.",
                "properties": {
                    "runs": {
                        "description": "List of runs.",
                        "items": {
                            "$ref": "#/components/schemas/LoopsRunV1"
                        },
                        "title": "Runs",
                        "type": "array"
                    }
                },
                "required": [
                    "runs"
                ],
                "title": "ListLoopsRunsResponseV1",
                "type": "object"
            },
            "CreateLoopsRunRequestV1": {
                "properties": {
                    "session_id": {
                        "description": "ID of the Loops session this run belongs to.",
                        "title": "Session Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "Base model ID (e.g. 'Qwen/Qwen3-8B').",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "max_seq_len": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.",
                        "title": "Max Seq Len"
                    },
                    "lora_rank": {
                        "default": 64,
                        "description": "LoRA rank.",
                        "title": "Lora Rank",
                        "type": "integer"
                    },
                    "seed": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Random seed for reproducibility.",
                        "title": "Seed"
                    },
                    "scale_down_delay_seconds": {
                        "default": 3600,
                        "description": "Seconds of inactivity before the run scales to zero. Must be positive. Defaults to 3600 (1 hour).",
                        "exclusiveMinimum": 0,
                        "title": "Scale Down Delay Seconds",
                        "type": "integer"
                    },
                    "path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:<run_id>/weights/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/weights/step-100"
                        ],
                        "title": "Path"
                    }
                },
                "required": [
                    "session_id",
                    "base_model"
                ],
                "title": "CreateLoopsRunRequestV1",
                "type": "object"
            },
            "CreateLoopsRunResponseV1": {
                "properties": {
                    "run": {
                        "$ref": "#/components/schemas/LoopsRunV1"
                    }
                },
                "required": [
                    "run"
                ],
                "title": "CreateLoopsRunResponseV1",
                "type": "object"
            },
            "GetLoopsRunResponseV1": {
                "description": "Response for ``GET /v1/loops/runs/<run_id>``.",
                "properties": {
                    "run": {
                        "$ref": "#/components/schemas/LoopsRunV1",
                        "description": "The Loops run with its associated sampler."
                    }
                },
                "required": [
                    "run"
                ],
                "title": "GetLoopsRunResponseV1",
                "type": "object"
            },
            "ListLoopsSamplersResponseV1": {
                "description": "Response for ``GET /v1/loops/samplers``.\n\nReturns the caller's samplers, including those paired to runs and\nstandalone samplers. Ordered newest-first.",
                "properties": {
                    "samplers": {
                        "description": "List of samplers.",
                        "items": {
                            "$ref": "#/components/schemas/LoopsSamplerV1"
                        },
                        "title": "Samplers",
                        "type": "array"
                    }
                },
                "required": [
                    "samplers"
                ],
                "title": "ListLoopsSamplersResponseV1",
                "type": "object"
            },
            "CreateLoopsSamplerRequestV1": {
                "properties": {
                    "session_id": {
                        "description": "ID of the Loops session this sampler belongs to.",
                        "title": "Session Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "Base model ID for standalone samplers (e.g., for baselines).",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "max_seq_length": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Maximum prompt length (in tokens) the sampler must handle. Set this to the longest prompt you plan to send. Omit to use the default for the base model.",
                        "title": "Max Seq Length"
                    },
                    "model_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional bt:// URI of an existing sampler-target checkpoint to load weights from on startup. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/sampler_weights/step-100"
                        ],
                        "title": "Model Path"
                    }
                },
                "required": [
                    "session_id",
                    "base_model"
                ],
                "title": "CreateLoopsSamplerRequestV1",
                "type": "object"
            },
            "CreateLoopsSamplerResponseV1": {
                "properties": {
                    "sampler": {
                        "$ref": "#/components/schemas/LoopsSamplerV1"
                    }
                },
                "required": [
                    "sampler"
                ],
                "title": "CreateLoopsSamplerResponseV1",
                "type": "object"
            },
            "GetLoopsSamplerResponseV1": {
                "description": "Response for ``GET /v1/loops/samplers/<sampler_id>``.",
                "properties": {
                    "sampler": {
                        "$ref": "#/components/schemas/LoopsSamplerV1",
                        "description": "The Loops sampler."
                    }
                },
                "required": [
                    "sampler"
                ],
                "title": "GetLoopsSamplerResponseV1",
                "type": "object"
            },
            "LoopsCheckpointV1": {
                "description": "A checkpoint saved by a Loops run.",
                "properties": {
                    "checkpoint_id": {
                        "description": "The ID of the checkpoint.",
                        "title": "Checkpoint Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "The timestamp of the checkpoint in ISO 8601 format.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "checkpoint_type": {
                        "description": "The type of checkpoint.",
                        "title": "Checkpoint Type",
                        "type": "string"
                    },
                    "base_model": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The base model of the checkpoint.",
                        "title": "Base Model"
                    },
                    "lora_adapter_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The adapter config of the checkpoint.",
                        "title": "Lora Adapter Config"
                    },
                    "size_bytes": {
                        "description": "The size of the checkpoint in bytes.",
                        "title": "Size Bytes",
                        "type": "integer"
                    },
                    "sync_status": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Sync state of the checkpoint: SYNCING or COMPLETE.",
                        "title": "Sync Status"
                    },
                    "id": {
                        "description": "The checkpoint ID.",
                        "title": "Id",
                        "type": "string"
                    },
                    "run_id": {
                        "description": "The ID of the run that produced the checkpoint.",
                        "title": "Run Id",
                        "type": "string"
                    },
                    "target": {
                        "$ref": "#/components/schemas/TrainerCheckpointTarget",
                        "description": "Whether this checkpoint is loadable by the sampler or by the run."
                    }
                },
                "required": [
                    "checkpoint_id",
                    "created_at",
                    "checkpoint_type",
                    "base_model",
                    "lora_adapter_config",
                    "size_bytes",
                    "id",
                    "run_id",
                    "target"
                ],
                "title": "LoopsCheckpointV1",
                "type": "object"
            },
            "ListLoopsCheckpointsResponseV1": {
                "description": "Checkpoints matching the query filter.",
                "properties": {
                    "checkpoints": {
                        "description": "Matching checkpoints.",
                        "items": {
                            "$ref": "#/components/schemas/LoopsCheckpointV1"
                        },
                        "title": "Checkpoints",
                        "type": "array"
                    }
                },
                "required": [
                    "checkpoints"
                ],
                "title": "ListLoopsCheckpointsResponseV1",
                "type": "object"
            },
            "ValidateLoopsCheckpointRequestV1": {
                "description": "Request body for ``POST /v1/loops/checkpoints/validate``.",
                "properties": {
                    "checkpoint_path": {
                        "description": "bt:// URI of a sampler checkpoint. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>.",
                        "examples": [
                            "bt://loops:k4q95w5/sampler_weights/step-100"
                        ],
                        "title": "Checkpoint Path",
                        "type": "string"
                    }
                },
                "required": [
                    "checkpoint_path"
                ],
                "title": "ValidateLoopsCheckpointRequestV1",
                "type": "object"
            },
            "ValidateLoopsCheckpointResponseV1": {
                "description": "Response for ``POST /v1/loops/checkpoints/validate``. Empty on success;\ninaccessible or malformed paths raise 400.",
                "properties": {},
                "title": "ValidateLoopsCheckpointResponseV1",
                "type": "object"
            },
            "LoopsCheckpointFilesResponseV1": {
                "description": "Response with presigned URLs for files under a Loops checkpoint.",
                "properties": {
                    "presigned_urls": {
                        "description": "List of presigned URLs for checkpoint files.",
                        "items": {
                            "$ref": "#/components/schemas/CheckpointFile"
                        },
                        "title": "Presigned Urls",
                        "type": "array"
                    },
                    "next_page_token": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Token to use for fetching the next page of results. None when there are no more results.",
                        "title": "Next Page Token"
                    },
                    "total_count": {
                        "description": "Total number of checkpoint files available.",
                        "title": "Total Count",
                        "type": "integer"
                    }
                },
                "required": [
                    "presigned_urls",
                    "total_count"
                ],
                "title": "LoopsCheckpointFilesResponseV1",
                "type": "object"
            },
            "LoopsDeploymentStatusV1": {
                "description": "Latest deployment status for a Loops deployment.",
                "properties": {
                    "name": {
                        "$ref": "#/components/schemas/Name",
                        "description": "Latest status of the Loops deployment."
                    }
                },
                "required": [
                    "name"
                ],
                "title": "LoopsDeploymentStatusV1",
                "type": "object"
            },
            "LoopsDeploymentV1": {
                "description": "A Loops deployment \u2014 the long-lived run + sampler pair owned by a user.\n\nThe deployment's current sampler is included inline. The full list of\nsamplers visible to the caller (across all deployments) lives at\n``GET /v1/loops/samplers``.",
                "properties": {
                    "id": {
                        "description": "The Loops deployment ID.",
                        "title": "Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "The HuggingFace base model the deployment is fine-tuning.",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "base_url": {
                        "description": "The run's base URL.",
                        "title": "Base Url",
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/LoopsDeploymentStatusV1",
                        "description": "Latest deployment status."
                    },
                    "sampler": {
                        "$ref": "#/components/schemas/LoopsSamplerV1",
                        "description": "The sampler bound to this deployment."
                    }
                },
                "required": [
                    "id",
                    "base_model",
                    "base_url",
                    "status",
                    "sampler"
                ],
                "title": "LoopsDeploymentV1",
                "type": "object"
            },
            "Name": {
                "enum": [
                    "CREATED",
                    "DEPLOYING",
                    "RUNNING",
                    "FAILED",
                    "STOPPED"
                ],
                "title": "Name",
                "type": "string"
            },
            "ListLoopsDeploymentsResponseV1": {
                "description": "Response for ``GET /v1/loops/deployments``.\n\nReturns the caller's Loops deployments whose latest status is not STOPPED\n(i.e. CREATED, DEPLOYING, RUNNING, or FAILED). Stopped deployments are\nexcluded so the list is a fit-for-purpose \"what's currently provisioned\nfor me\" view \u2014 the deactivate endpoint is the inverse pair.",
                "properties": {
                    "deployments": {
                        "description": "Active Loops deployments.",
                        "items": {
                            "$ref": "#/components/schemas/LoopsDeploymentV1"
                        },
                        "title": "Deployments",
                        "type": "array"
                    }
                },
                "required": [
                    "deployments"
                ],
                "title": "ListLoopsDeploymentsResponseV1",
                "type": "object"
            },
            "DeactivateLoopsDeploymentResponseV1": {
                "description": "Response for ``POST /v1/loops/deployments/<deployment_id>/deactivate``.",
                "properties": {
                    "id": {
                        "description": "The deactivated Loops deployment ID.",
                        "title": "Id",
                        "type": "string"
                    },
                    "base_model": {
                        "description": "The base model whose Loops deployment was deactivated.",
                        "title": "Base Model",
                        "type": "string"
                    },
                    "user": {
                        "$ref": "#/components/schemas/UserV1",
                        "description": "The user who owned the Loops deployment."
                    }
                },
                "required": [
                    "id",
                    "base_model",
                    "user"
                ],
                "title": "DeactivateLoopsDeploymentResponseV1",
                "type": "object"
            },
            "GetLoopsDeploymentResponseV1": {
                "description": "Response for ``GET /v1/loops/deployments/<deployment_id>``.",
                "properties": {
                    "deployment": {
                        "$ref": "#/components/schemas/LoopsDeploymentV1",
                        "description": "The Loops deployment."
                    }
                },
                "required": [
                    "deployment"
                ],
                "title": "GetLoopsDeploymentResponseV1",
                "type": "object"
            },
            "TrainingGpuCapacityItemV1": {
                "description": "GPU capacity and current usage for one GPU type.",
                "properties": {
                    "gpu_type": {
                        "description": "GPU type identifier (e.g. H100, A100-40GB)",
                        "title": "Gpu Type",
                        "type": "string"
                    },
                    "baseline": {
                        "description": "Baseline GPU allocation; jobs below this threshold are expected to run immediately. 0 if not configured.",
                        "title": "Baseline",
                        "type": "integer"
                    },
                    "limit": {
                        "description": "Maximum concurrent GPUs of this type for this org",
                        "title": "Limit",
                        "type": "integer"
                    },
                    "usage_count": {
                        "description": "GPUs currently in use by active training jobs",
                        "title": "Usage Count",
                        "type": "integer"
                    }
                },
                "required": [
                    "gpu_type",
                    "baseline",
                    "limit",
                    "usage_count"
                ],
                "title": "TrainingGpuCapacityItemV1",
                "type": "object"
            },
            "GetTrainingGpuCapacityResponseV1": {
                "description": "Response for the training GPU capacity endpoint.",
                "properties": {
                    "gpu_capacities": {
                        "description": "GPU capacity limits and current usage per GPU type",
                        "items": {
                            "$ref": "#/components/schemas/TrainingGpuCapacityItemV1"
                        },
                        "title": "Gpu Capacities",
                        "type": "array"
                    }
                },
                "required": [
                    "gpu_capacities"
                ],
                "title": "GetTrainingGpuCapacityResponseV1",
                "type": "object"
            },
            "AWSCredentialsV1": {
                "description": "AWS credentials",
                "properties": {
                    "aws_access_key_id": {
                        "description": "The AWS access key ID",
                        "title": "Aws Access Key Id",
                        "type": "string"
                    },
                    "aws_secret_access_key": {
                        "description": "The AWS secret access key",
                        "title": "Aws Secret Access Key",
                        "type": "string"
                    },
                    "aws_session_token": {
                        "description": "The AWS session token",
                        "title": "Aws Session Token",
                        "type": "string"
                    }
                },
                "required": [
                    "aws_access_key_id",
                    "aws_secret_access_key",
                    "aws_session_token"
                ],
                "title": "AWSCredentialsV1",
                "type": "object"
            },
            "GetBlobCredentialsResponseV1": {
                "description": "Response to create a new set of credentials for blob upload.",
                "properties": {
                    "creds": {
                        "$ref": "#/components/schemas/AWSCredentialsV1",
                        "description": "The credentials to upload the blob to"
                    },
                    "s3_key": {
                        "description": "The S3 key to upload the blob to",
                        "title": "S3 Key",
                        "type": "string"
                    },
                    "s3_bucket": {
                        "description": "The S3 bucket to upload the blob to",
                        "title": "S3 Bucket",
                        "type": "string"
                    }
                },
                "required": [
                    "creds",
                    "s3_key",
                    "s3_bucket"
                ],
                "title": "GetBlobCredentialsResponseV1",
                "type": "object"
            },
            "APIKeyCategory": {
                "description": "Enum representing the category of an API key.",
                "enum": [
                    "PERSONAL",
                    "WORKSPACE_MANAGE_ALL",
                    "WORKSPACE_EXPORT_METRICS",
                    "WORKSPACE_INVOKE"
                ],
                "title": "APIKeyCategory",
                "type": "string"
            },
            "CreateAPIKeyRequestV1": {
                "description": "Request to create an API key.",
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional name for the API key",
                        "examples": [
                            "my-api-key"
                        ],
                        "title": "Name"
                    },
                    "type": {
                        "$ref": "#/components/schemas/APIKeyCategory",
                        "description": "Type of the API key.",
                        "examples": [
                            "PERSONAL",
                            "WORKSPACE_EXPORT_METRICS",
                            "WORKSPACE_INVOKE",
                            "WORKSPACE_MANAGE_ALL"
                        ]
                    },
                    "model_ids": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "List of model IDs to scope the API key to, only present if type is 'WORKSPACE_EXPORT_METRICS' or 'WORKSPACE_INVOKE'",
                        "examples": [
                            [
                                "aaaaaaaa"
                            ]
                        ],
                        "title": "Model Ids"
                    }
                },
                "required": [
                    "type"
                ],
                "title": "CreateAPIKeyRequestV1",
                "type": "object"
            },
            "APIKeyV1": {
                "description": "Represents an API key.",
                "properties": {
                    "api_key": {
                        "description": "The API key string",
                        "title": "Api Key",
                        "type": "string"
                    }
                },
                "required": [
                    "api_key"
                ],
                "title": "APIKeyV1",
                "type": "object"
            },
            "APIKeyInfoV1": {
                "description": "Represents the metadata of an API key.",
                "properties": {
                    "prefix": {
                        "description": "The prefix of the API key",
                        "title": "Prefix",
                        "type": "string"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional name for the API key",
                        "examples": [
                            "my-api-key"
                        ],
                        "title": "Name"
                    },
                    "type": {
                        "$ref": "#/components/schemas/APIKeyCategory",
                        "description": "Type of the API key.",
                        "examples": [
                            "PERSONAL",
                            "WORKSPACE_EXPORT_METRICS",
                            "WORKSPACE_INVOKE",
                            "WORKSPACE_MANAGE_ALL"
                        ]
                    },
                    "model_ids": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "List of model IDs to scope the API key to, only present if type is 'WORKSPACE_EXPORT_METRICS' or 'WORKSPACE_INVOKE'",
                        "examples": [
                            [
                                "aaaaaaaa"
                            ]
                        ],
                        "title": "Model Ids"
                    },
                    "team_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The name of the team associated with the API key",
                        "title": "Team Name"
                    }
                },
                "required": [
                    "prefix",
                    "type"
                ],
                "title": "APIKeyInfoV1",
                "type": "object"
            },
            "APIKeysV1": {
                "description": "A list of API keys.",
                "properties": {
                    "keys": {
                        "description": "A list of API key information",
                        "items": {
                            "$ref": "#/components/schemas/APIKeyInfoV1"
                        },
                        "title": "Keys",
                        "type": "array"
                    }
                },
                "required": [
                    "keys"
                ],
                "title": "APIKeysV1",
                "type": "object"
            },
            "APIKeyTombstoneV1": {
                "description": "An API key tombstone.",
                "properties": {
                    "prefix": {
                        "description": "Unique prefix of the API key",
                        "title": "Prefix",
                        "type": "string"
                    }
                },
                "required": [
                    "prefix"
                ],
                "title": "APIKeyTombstoneV1",
                "type": "object"
            },
            "ModelWeightSnapshotV1": {
                "description": "A model weight snapshot.",
                "properties": {
                    "model": {
                        "description": "Unique identifier of the model",
                        "title": "Model",
                        "type": "string"
                    },
                    "snapshot_uri": {
                        "description": "Path to the model weight snapshot",
                        "title": "Snapshot Uri",
                        "type": "string"
                    },
                    "received_at": {
                        "description": "Time of the snapshot",
                        "format": "date-time",
                        "title": "Received At",
                        "type": "string"
                    }
                },
                "required": [
                    "model",
                    "snapshot_uri",
                    "received_at"
                ],
                "title": "ModelWeightSnapshotV1",
                "type": "object"
            },
            "CreateModelWeightSnapshotRequestV1": {
                "description": "A request to create a model weight snapshot.",
                "properties": {
                    "model": {
                        "description": "Unique identifier of the model",
                        "title": "Model",
                        "type": "string"
                    },
                    "snapshot_uri": {
                        "description": "Path to the model weight snapshot",
                        "title": "Snapshot Uri",
                        "type": "string"
                    }
                },
                "required": [
                    "model",
                    "snapshot_uri"
                ],
                "title": "CreateModelWeightSnapshotRequestV1",
                "type": "object"
            },
            "CreateLLMModelRequestV1": {
                "description": "A request to create a BIS LLM model",
                "properties": {
                    "resources": {
                        "additionalProperties": true,
                        "description": "Resources allocated to the model",
                        "title": "Resources",
                        "type": "object"
                    },
                    "llm_version": {
                        "default": "1.0",
                        "description": "Version of the helm chart to use",
                        "title": "Llm Version",
                        "type": "string"
                    },
                    "llm_config": {
                        "additionalProperties": true,
                        "description": "Configuration specific to the LLM model",
                        "title": "Llm Config",
                        "type": "object"
                    },
                    "environment_variables": {
                        "additionalProperties": true,
                        "description": "Environment variables for the model",
                        "title": "Environment Variables",
                        "type": "object"
                    },
                    "model_metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Model metadata persisted into model_config",
                        "title": "Model Metadata"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Autoscaling settings for the model",
                        "examples": [
                            {
                                "autoscaling_window": 600,
                                "concurrency_target": null,
                                "max_replica": 5,
                                "min_replica": 1,
                                "scale_down_delay": 300,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": null
                            }
                        ]
                    },
                    "additional_autoscaling_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Additional autoscaling configuration (e.g. target in-flight tokens)",
                        "examples": [
                            {
                                "metrics": [
                                    {
                                        "name": "in_flight_tokens",
                                        "target": 40000
                                    }
                                ]
                            }
                        ],
                        "title": "Additional Autoscaling Config"
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "User-defined metadata for the deployment",
                        "examples": [
                            {
                                "environment": "production",
                                "git_sha": "abc123"
                            }
                        ],
                        "title": "Metadata"
                    },
                    "weights": {
                        "anyOf": [
                            {
                                "items": {
                                    "additionalProperties": true,
                                    "type": "object"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Weight configurations for BDN model weight distribution",
                        "examples": [
                            [
                                {
                                    "mount_location": "/models/base",
                                    "source": "hf://meta-llama/Llama-3-8B"
                                }
                            ]
                        ],
                        "title": "Weights"
                    },
                    "name": {
                        "description": "Name of the model",
                        "title": "Name",
                        "type": "string"
                    }
                },
                "required": [
                    "resources",
                    "name"
                ],
                "title": "CreateLLMModelRequestV1",
                "type": "object"
            },
            "LLMModelHandleV1": {
                "description": "Handle for a BIS LLM model deployment.",
                "properties": {
                    "model_id": {
                        "description": "Unique identifier of the model",
                        "title": "Model Id",
                        "type": "string"
                    },
                    "version_id": {
                        "description": "Unique identifier of the model version",
                        "title": "Version Id",
                        "type": "string"
                    },
                    "hostname": {
                        "description": "Hostname used to invoke the model",
                        "title": "Hostname",
                        "type": "string"
                    },
                    "instance_type_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the instance type the model deployment is running on",
                        "title": "Instance Type Name"
                    }
                },
                "required": [
                    "model_id",
                    "version_id",
                    "hostname"
                ],
                "title": "LLMModelHandleV1",
                "type": "object"
            },
            "CreateLLMModelVersionRequestV1": {
                "description": "A request to create a BIS LLM model version",
                "properties": {
                    "resources": {
                        "additionalProperties": true,
                        "description": "Resources allocated to the model",
                        "title": "Resources",
                        "type": "object"
                    },
                    "llm_version": {
                        "default": "1.0",
                        "description": "Version of the helm chart to use",
                        "title": "Llm Version",
                        "type": "string"
                    },
                    "llm_config": {
                        "additionalProperties": true,
                        "description": "Configuration specific to the LLM model",
                        "title": "Llm Config",
                        "type": "object"
                    },
                    "environment_variables": {
                        "additionalProperties": true,
                        "description": "Environment variables for the model",
                        "title": "Environment Variables",
                        "type": "object"
                    },
                    "model_metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Model metadata persisted into model_config",
                        "title": "Model Metadata"
                    },
                    "autoscaling_settings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateAutoscalingSettingsV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Autoscaling settings for the model",
                        "examples": [
                            {
                                "autoscaling_window": 600,
                                "concurrency_target": null,
                                "max_replica": 5,
                                "min_replica": 1,
                                "scale_down_delay": 300,
                                "target_in_flight_tokens": null,
                                "target_utilization_percentage": null
                            }
                        ]
                    },
                    "additional_autoscaling_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Additional autoscaling configuration (e.g. target in-flight tokens)",
                        "examples": [
                            {
                                "metrics": [
                                    {
                                        "name": "in_flight_tokens",
                                        "target": 40000
                                    }
                                ]
                            }
                        ],
                        "title": "Additional Autoscaling Config"
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "User-defined metadata for the deployment",
                        "examples": [
                            {
                                "environment": "production",
                                "git_sha": "abc123"
                            }
                        ],
                        "title": "Metadata"
                    },
                    "weights": {
                        "anyOf": [
                            {
                                "items": {
                                    "additionalProperties": true,
                                    "type": "object"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Weight configurations for BDN model weight distribution",
                        "examples": [
                            [
                                {
                                    "mount_location": "/models/base",
                                    "source": "hf://meta-llama/Llama-3-8B"
                                }
                            ]
                        ],
                        "title": "Weights"
                    }
                },
                "required": [
                    "resources"
                ],
                "title": "CreateLLMModelVersionRequestV1",
                "type": "object"
            },
            "LibraryListingV1": {
                "description": "A library listing.",
                "properties": {
                    "display_name": {
                        "description": "Display name of the library listing",
                        "title": "Display Name",
                        "type": "string"
                    },
                    "user_defined_id": {
                        "description": "User-defined identifier of the library listing",
                        "title": "User Defined Id",
                        "type": "string"
                    },
                    "is_public": {
                        "description": "Whether the listing is publicly accessible",
                        "title": "Is Public",
                        "type": "boolean"
                    },
                    "created_at": {
                        "description": "Time the listing was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "modified_at": {
                        "description": "Time the listing was last modified",
                        "format": "date-time",
                        "title": "Modified At",
                        "type": "string"
                    }
                },
                "required": [
                    "display_name",
                    "user_defined_id",
                    "is_public",
                    "created_at",
                    "modified_at"
                ],
                "title": "LibraryListingV1",
                "type": "object"
            },
            "LibraryListingsV1": {
                "description": "A list of library listings.",
                "properties": {
                    "listings": {
                        "items": {
                            "$ref": "#/components/schemas/LibraryListingV1"
                        },
                        "title": "Listings",
                        "type": "array"
                    }
                },
                "required": [
                    "listings"
                ],
                "title": "LibraryListingsV1",
                "type": "object"
            },
            "CreateLibraryListingRequestV1": {
                "description": "Request to create a new library listing.",
                "properties": {
                    "display_name": {
                        "description": "Display name of the library listing",
                        "title": "Display Name",
                        "type": "string"
                    },
                    "user_defined_id": {
                        "description": "User-defined identifier of the library listing",
                        "title": "User Defined Id",
                        "type": "string"
                    },
                    "is_public": {
                        "default": false,
                        "description": "Whether the listing is publicly accessible",
                        "title": "Is Public",
                        "type": "boolean"
                    }
                },
                "required": [
                    "display_name",
                    "user_defined_id"
                ],
                "title": "CreateLibraryListingRequestV1",
                "type": "object"
            },
            "LibraryListingTombstoneV1": {
                "description": "A library listing tombstone.",
                "properties": {
                    "user_defined_id": {
                        "description": "User-defined identifier of the library listing",
                        "title": "User Defined Id",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the library listing was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    }
                },
                "required": [
                    "user_defined_id",
                    "deleted"
                ],
                "title": "LibraryListingTombstoneV1",
                "type": "object"
            },
            "UpdateLibraryListingRequestV1": {
                "description": "Request to update a library listing.",
                "properties": {
                    "display_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "New display name for the library listing",
                        "title": "Display Name"
                    },
                    "is_public": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether the listing is publicly accessible",
                        "title": "Is Public"
                    }
                },
                "title": "UpdateLibraryListingRequestV1",
                "type": "object"
            },
            "LibraryListingVersionV1": {
                "description": "A library listing version.",
                "properties": {
                    "version_tag": {
                        "description": "Human-readable tag for this version",
                        "title": "Version Tag",
                        "type": "string"
                    },
                    "is_live": {
                        "description": "Whether this version is the live version",
                        "title": "Is Live",
                        "type": "boolean"
                    },
                    "allow_truss_download": {
                        "description": "Whether users deploying this model can download the Truss",
                        "title": "Allow Truss Download",
                        "type": "boolean"
                    },
                    "oracle_version_id": {
                        "description": "Id of the source model version",
                        "title": "Oracle Version Id",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "Time the version was created in ISO 8601 format",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    },
                    "modified_at": {
                        "description": "Time the version was last modified",
                        "format": "date-time",
                        "title": "Modified At",
                        "type": "string"
                    }
                },
                "required": [
                    "version_tag",
                    "is_live",
                    "allow_truss_download",
                    "oracle_version_id",
                    "created_at",
                    "modified_at"
                ],
                "title": "LibraryListingVersionV1",
                "type": "object"
            },
            "LibraryListingVersionsV1": {
                "description": "A list of library listing versions.",
                "properties": {
                    "versions": {
                        "items": {
                            "$ref": "#/components/schemas/LibraryListingVersionV1"
                        },
                        "title": "Versions",
                        "type": "array"
                    }
                },
                "required": [
                    "versions"
                ],
                "title": "LibraryListingVersionsV1",
                "type": "object"
            },
            "CreateLibraryListingVersionRequestV1": {
                "description": "Request to create a new library listing version from an existing model version.",
                "properties": {
                    "display_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Display name of the library listing. Required when creating a new listing.",
                        "title": "Display Name"
                    },
                    "is_public": {
                        "default": false,
                        "description": "Whether the listing is publicly accessible. Only used when creating a new listing.",
                        "title": "Is Public",
                        "type": "boolean"
                    },
                    "oracle_version_id": {
                        "description": "Id of the source model version to publish",
                        "title": "Oracle Version Id",
                        "type": "string"
                    },
                    "allow_truss_download": {
                        "default": false,
                        "description": "Whether users deploying this model can download the Truss",
                        "title": "Allow Truss Download",
                        "type": "boolean"
                    },
                    "version_tag": {
                        "description": "Human-readable tag for this version",
                        "title": "Version Tag",
                        "type": "string"
                    }
                },
                "required": [
                    "oracle_version_id",
                    "version_tag"
                ],
                "title": "CreateLibraryListingVersionRequestV1",
                "type": "object"
            },
            "LibraryListingVersionTombstoneV1": {
                "description": "A library listing version tombstone.",
                "properties": {
                    "version_tag": {
                        "description": "Human-readable tag for this version",
                        "title": "Version Tag",
                        "type": "string"
                    },
                    "deleted": {
                        "description": "Whether the library listing version was deleted",
                        "title": "Deleted",
                        "type": "boolean"
                    }
                },
                "required": [
                    "version_tag",
                    "deleted"
                ],
                "title": "LibraryListingVersionTombstoneV1",
                "type": "object"
            },
            "UpdateLibraryListingVersionRequestV1": {
                "description": "Request to update a library listing version.",
                "properties": {
                    "is_live": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether this version should be the live version. Setting to true demotes the current live version.",
                        "title": "Is Live"
                    },
                    "allow_truss_download": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Whether users deploying this model can download the Truss",
                        "title": "Allow Truss Download"
                    }
                },
                "title": "UpdateLibraryListingVersionRequestV1",
                "type": "object"
            },
            "BillableResourceV1": {
                "properties": {
                    "id": {
                        "description": "Unique identifier of the resource",
                        "title": "Id",
                        "type": "string"
                    },
                    "kind": {
                        "$ref": "#/components/schemas/ResourceKind",
                        "description": "Resource kind (MODEL_DEPLOYMENT, TRAINING_JOB, or CHAINLET)"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the resource",
                        "title": "Name"
                    },
                    "model_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the parent resource (e.g., model name for model deployments, training project name for training jobs)",
                        "title": "Model Name"
                    },
                    "is_deleted": {
                        "description": "Indicates if the resource has been deleted",
                        "title": "Is Deleted",
                        "type": "boolean"
                    },
                    "instance_type": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Instance type used",
                        "title": "Instance Type"
                    },
                    "environment_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Environment name (e.g., 'production', 'staging')",
                        "title": "Environment Name"
                    },
                    "chain_metadata": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/ChainMetadataV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Chain metadata if this is a chainlet deployment"
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "is_deleted"
                ],
                "title": "BillableResourceV1",
                "type": "object"
            },
            "ChainMetadataV1": {
                "properties": {
                    "chain_id": {
                        "description": "Unique identifier of the chain",
                        "title": "Chain Id",
                        "type": "string"
                    },
                    "chain_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the chain",
                        "title": "Chain Name"
                    },
                    "chain_deployment_id": {
                        "description": "Unique identifier of the chain deployment",
                        "title": "Chain Deployment Id",
                        "type": "string"
                    }
                },
                "required": [
                    "chain_id",
                    "chain_deployment_id"
                ],
                "title": "ChainMetadataV1",
                "type": "object"
            },
            "DailyDedicatedUsageV1": {
                "properties": {
                    "date": {
                        "description": "Date of the usage",
                        "format": "date",
                        "title": "Date",
                        "type": "string"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost incurred on this date in dollars",
                        "title": "Subtotal"
                    },
                    "minutes": {
                        "description": "Minutes used on this date",
                        "title": "Minutes",
                        "type": "integer"
                    },
                    "inference_requests": {
                        "description": "Number of inference requests on this date",
                        "title": "Inference Requests",
                        "type": "integer"
                    }
                },
                "required": [
                    "date",
                    "subtotal",
                    "minutes",
                    "inference_requests"
                ],
                "title": "DailyDedicatedUsageV1",
                "type": "object"
            },
            "DailyModelApiUsageV1": {
                "properties": {
                    "date": {
                        "description": "Date of the usage",
                        "format": "date",
                        "title": "Date",
                        "type": "string"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost incurred on this date in dollars",
                        "title": "Subtotal"
                    },
                    "input_tokens": {
                        "description": "Number of input tokens on this date",
                        "title": "Input Tokens",
                        "type": "integer"
                    },
                    "output_tokens": {
                        "description": "Number of output tokens on this date",
                        "title": "Output Tokens",
                        "type": "integer"
                    },
                    "cached_input_tokens": {
                        "description": "Number of cached input tokens on this date",
                        "title": "Cached Input Tokens",
                        "type": "integer"
                    }
                },
                "required": [
                    "date",
                    "subtotal",
                    "input_tokens",
                    "output_tokens",
                    "cached_input_tokens"
                ],
                "title": "DailyModelApiUsageV1",
                "type": "object"
            },
            "DailyTrainingUsageV1": {
                "properties": {
                    "date": {
                        "description": "Date of the usage",
                        "format": "date",
                        "title": "Date",
                        "type": "string"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost incurred on this date in dollars",
                        "title": "Subtotal"
                    },
                    "minutes": {
                        "description": "Minutes used on this date",
                        "title": "Minutes",
                        "type": "integer"
                    }
                },
                "required": [
                    "date",
                    "subtotal",
                    "minutes"
                ],
                "title": "DailyTrainingUsageV1",
                "type": "object"
            },
            "DedicatedItemV1": {
                "properties": {
                    "billable_resource": {
                        "$ref": "#/components/schemas/BillableResourceV1",
                        "description": "The model deployment resource"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars for this billable resource",
                        "title": "Subtotal"
                    },
                    "minutes": {
                        "description": "Total minutes used for this billable resource",
                        "title": "Minutes",
                        "type": "integer"
                    },
                    "inference_requests": {
                        "description": "Total inference requests for this billable resource",
                        "title": "Inference Requests",
                        "type": "integer"
                    },
                    "daily": {
                        "description": "Daily usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/DailyDedicatedUsageV1"
                        },
                        "title": "Daily",
                        "type": "array"
                    }
                },
                "required": [
                    "billable_resource",
                    "subtotal",
                    "minutes",
                    "inference_requests"
                ],
                "title": "DedicatedItemV1",
                "type": "object"
            },
            "DedicatedUsageV1": {
                "properties": {
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars after applying credits used",
                        "title": "Subtotal"
                    },
                    "credits_used": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Credits applied in dollars",
                        "title": "Credits Used"
                    },
                    "total": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Total cost in dollars",
                        "title": "Total"
                    },
                    "minutes": {
                        "description": "Total minutes used",
                        "title": "Minutes",
                        "type": "integer"
                    },
                    "breakdown": {
                        "description": "Per-deployment usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/DedicatedItemV1"
                        },
                        "title": "Breakdown",
                        "type": "array"
                    }
                },
                "required": [
                    "subtotal",
                    "credits_used",
                    "total",
                    "minutes"
                ],
                "title": "DedicatedUsageV1",
                "type": "object"
            },
            "ModelApiItemV1": {
                "properties": {
                    "model_name": {
                        "description": "Model name",
                        "title": "Model Name",
                        "type": "string"
                    },
                    "model_family": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Model family (e.g., llama, mistral)",
                        "title": "Model Family"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars for this model",
                        "title": "Subtotal"
                    },
                    "input_tokens": {
                        "description": "Total input tokens for this model",
                        "title": "Input Tokens",
                        "type": "integer"
                    },
                    "output_tokens": {
                        "description": "Total output tokens for this model",
                        "title": "Output Tokens",
                        "type": "integer"
                    },
                    "cached_input_tokens": {
                        "description": "Total cached input tokens for this model",
                        "title": "Cached Input Tokens",
                        "type": "integer"
                    },
                    "daily": {
                        "description": "Daily usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/DailyModelApiUsageV1"
                        },
                        "title": "Daily",
                        "type": "array"
                    }
                },
                "required": [
                    "model_name",
                    "subtotal",
                    "input_tokens",
                    "output_tokens",
                    "cached_input_tokens"
                ],
                "title": "ModelApiItemV1",
                "type": "object"
            },
            "ModelApisUsageV1": {
                "properties": {
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars after applying credits used",
                        "title": "Subtotal"
                    },
                    "credits_used": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Credits applied in dollars",
                        "title": "Credits Used"
                    },
                    "total": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Total cost in dollars",
                        "title": "Total"
                    },
                    "breakdown": {
                        "description": "Per-model usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/ModelApiItemV1"
                        },
                        "title": "Breakdown",
                        "type": "array"
                    }
                },
                "required": [
                    "subtotal",
                    "credits_used",
                    "total"
                ],
                "title": "ModelApisUsageV1",
                "type": "object"
            },
            "ResourceKind": {
                "enum": [
                    "MODEL_DEPLOYMENT",
                    "TRAINING_JOB",
                    "CHAINLET"
                ],
                "title": "ResourceKind",
                "type": "string"
            },
            "TrainingItemV1": {
                "properties": {
                    "billable_resource": {
                        "$ref": "#/components/schemas/BillableResourceV1",
                        "description": "The training job resource"
                    },
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars for this billable resource",
                        "title": "Subtotal"
                    },
                    "minutes": {
                        "description": "Total minutes used for this billable resource",
                        "title": "Minutes",
                        "type": "integer"
                    },
                    "daily": {
                        "description": "Daily usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/DailyTrainingUsageV1"
                        },
                        "title": "Daily",
                        "type": "array"
                    }
                },
                "required": [
                    "billable_resource",
                    "subtotal",
                    "minutes"
                ],
                "title": "TrainingItemV1",
                "type": "object"
            },
            "TrainingUsageV1": {
                "properties": {
                    "subtotal": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Subtotal cost in dollars after applying credits used",
                        "title": "Subtotal"
                    },
                    "credits_used": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Credits applied in dollars",
                        "title": "Credits Used"
                    },
                    "total": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                "type": "string"
                            }
                        ],
                        "description": "Total cost in dollars",
                        "title": "Total"
                    },
                    "minutes": {
                        "description": "Total minutes used",
                        "title": "Minutes",
                        "type": "integer"
                    },
                    "breakdown": {
                        "description": "Per-job usage breakdown",
                        "items": {
                            "$ref": "#/components/schemas/TrainingItemV1"
                        },
                        "title": "Breakdown",
                        "type": "array"
                    }
                },
                "required": [
                    "subtotal",
                    "credits_used",
                    "total",
                    "minutes"
                ],
                "title": "TrainingUsageV1",
                "type": "object"
            },
            "UsageSummaryV1": {
                "description": "Billing usage summary for the requested date range.",
                "properties": {
                    "dedicated_usage": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/DedicatedUsageV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Dedicated model serving usage"
                    },
                    "training_usage": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TrainingUsageV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Training usage"
                    },
                    "model_apis_usage": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/ModelApisUsageV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Model APIs usage"
                    }
                },
                "title": "UsageSummaryV1",
                "type": "object"
            },
            "UserInfoV1": {
                "description": "A Baseten user.",
                "properties": {
                    "user_id": {
                        "description": "Unique identifier for the user",
                        "title": "User Id",
                        "type": "string"
                    },
                    "email": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Email address of the user",
                        "title": "Email"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Display name of the user",
                        "title": "Name"
                    },
                    "workspace_name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Name of the user's workspace",
                        "title": "Workspace Name"
                    }
                },
                "required": [
                    "user_id"
                ],
                "title": "UserInfoV1",
                "type": "object"
            },
            "EffectiveModelConfigV1": {
                "properties": {
                    "slug": {
                        "description": "Shared endpoint slug.",
                        "title": "Slug",
                        "type": "string"
                    },
                    "rate_limits": {
                        "items": {
                            "$ref": "#/components/schemas/EffectiveRateLimitV1"
                        },
                        "title": "Rate Limits",
                        "type": "array"
                    },
                    "usage_limits": {
                        "items": {
                            "$ref": "#/components/schemas/EffectiveUsageLimitV1"
                        },
                        "title": "Usage Limits",
                        "type": "array"
                    }
                },
                "required": [
                    "slug"
                ],
                "title": "EffectiveModelConfigV1",
                "type": "object"
            },
            "EffectiveRateLimitV1": {
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/LimitTypeV1",
                        "description": "The type of the rate limit",
                        "examples": [
                            "TOKEN",
                            "REQUEST"
                        ]
                    },
                    "unit": {
                        "$ref": "#/components/schemas/RateLimitUnitV1",
                        "description": "The unit of the rate limit",
                        "examples": [
                            "SECOND",
                            "MINUTE"
                        ]
                    },
                    "threshold": {
                        "description": "The threshold for the rate limit",
                        "examples": [
                            1000,
                            50000
                        ],
                        "minimum": 1,
                        "title": "Threshold",
                        "type": "integer"
                    },
                    "source_group": {
                        "description": "ID of the group in the hierarchy this limit is anchored to.",
                        "examples": [
                            "abc123"
                        ],
                        "title": "Source Group",
                        "type": "string"
                    }
                },
                "required": [
                    "type",
                    "unit",
                    "threshold",
                    "source_group"
                ],
                "title": "EffectiveRateLimitV1",
                "type": "object"
            },
            "EffectiveUsageLimitV1": {
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/LimitTypeV1",
                        "description": "The type of the usage limit",
                        "examples": [
                            "REQUEST",
                            "TOKEN"
                        ]
                    },
                    "unit": {
                        "$ref": "#/components/schemas/UsageLimitUnitV1",
                        "description": "The unit of the usage limit",
                        "examples": [
                            "DAY"
                        ]
                    },
                    "threshold": {
                        "description": "The threshold for the usage limit",
                        "examples": [
                            10000000
                        ],
                        "minimum": 1,
                        "title": "Threshold",
                        "type": "integer"
                    },
                    "source_group": {
                        "description": "ID of the group in the hierarchy this limit is anchored to.",
                        "examples": [
                            "abc123"
                        ],
                        "title": "Source Group",
                        "type": "string"
                    }
                },
                "required": [
                    "type",
                    "unit",
                    "threshold",
                    "source_group"
                ],
                "title": "EffectiveUsageLimitV1",
                "type": "object"
            },
            "GroupHierarchyV1": {
                "properties": {
                    "limit_enforcement": {
                        "$ref": "#/components/schemas/LimitEnforcementV1",
                        "default": "INDEPENDENT",
                        "examples": [
                            "CASCADING",
                            "INDEPENDENT"
                        ]
                    },
                    "parent_group_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "examples": [
                            "abc123"
                        ],
                        "title": "Parent Group Id"
                    }
                },
                "title": "GroupHierarchyV1",
                "type": "object"
            },
            "GroupMetadataV1": {
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "maxLength": 255,
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional display name for the group.",
                        "examples": [
                            "Acme prod"
                        ],
                        "title": "Name"
                    },
                    "external_entity_id": {
                        "description": "External-system identifier for this group. Unique within the caller's org.",
                        "examples": [
                            "cust_42"
                        ],
                        "maxLength": 255,
                        "minLength": 1,
                        "title": "External Entity Id",
                        "type": "string"
                    }
                },
                "required": [
                    "external_entity_id"
                ],
                "title": "GroupMetadataV1",
                "type": "object"
            },
            "GroupV1": {
                "properties": {
                    "id": {
                        "description": "Internal Baseten ID for the group.",
                        "title": "Id",
                        "type": "string"
                    },
                    "metadata": {
                        "$ref": "#/components/schemas/GroupMetadataV1",
                        "description": "Group identity + display metadata."
                    },
                    "models": {
                        "items": {
                            "$ref": "#/components/schemas/ModelConfigV1"
                        },
                        "title": "Models",
                        "type": "array"
                    },
                    "effective_models": {
                        "items": {
                            "$ref": "#/components/schemas/EffectiveModelConfigV1"
                        },
                        "title": "Effective Models",
                        "type": "array"
                    },
                    "hierarchy": {
                        "$ref": "#/components/schemas/GroupHierarchyV1",
                        "description": "Parent linkage and limit enforcement mode. Parent is null for root groups."
                    },
                    "created_at": {
                        "description": "When this group was created.",
                        "format": "date-time",
                        "title": "Created At",
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "metadata",
                    "hierarchy",
                    "created_at"
                ],
                "title": "GroupV1",
                "type": "object"
            },
            "LimitEnforcementV1": {
                "enum": [
                    "CASCADING",
                    "INDEPENDENT"
                ],
                "title": "LimitEnforcementV1",
                "type": "string"
            },
            "LimitTypeV1": {
                "enum": [
                    "REQUEST",
                    "TOKEN"
                ],
                "title": "LimitTypeV1",
                "type": "string"
            },
            "ModelConfigV1": {
                "properties": {
                    "slug": {
                        "description": "Shared endpoint slug.",
                        "title": "Slug",
                        "type": "string"
                    },
                    "rate_limits": {
                        "items": {
                            "$ref": "#/components/schemas/RateLimitV1"
                        },
                        "title": "Rate Limits",
                        "type": "array"
                    },
                    "usage_limits": {
                        "items": {
                            "$ref": "#/components/schemas/UsageLimitV1"
                        },
                        "title": "Usage Limits",
                        "type": "array"
                    }
                },
                "required": [
                    "slug"
                ],
                "title": "ModelConfigV1",
                "type": "object"
            },
            "PaginationResponseV1": {
                "properties": {
                    "has_more": {
                        "description": "Whether more items exist after this page.",
                        "title": "Has More",
                        "type": "boolean"
                    },
                    "cursor": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Opaque cursor to pass into the next request. Null when there is no next page.",
                        "title": "Cursor"
                    }
                },
                "required": [
                    "has_more"
                ],
                "title": "PaginationResponseV1",
                "type": "object"
            },
            "RateLimitUnitV1": {
                "enum": [
                    "SECOND",
                    "MINUTE"
                ],
                "title": "RateLimitUnitV1",
                "type": "string"
            },
            "RateLimitV1": {
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/LimitTypeV1",
                        "description": "The type of the rate limit",
                        "examples": [
                            "TOKEN",
                            "REQUEST"
                        ]
                    },
                    "unit": {
                        "$ref": "#/components/schemas/RateLimitUnitV1",
                        "description": "The unit of the rate limit",
                        "examples": [
                            "SECOND",
                            "MINUTE"
                        ]
                    },
                    "threshold": {
                        "description": "The threshold for the rate limit",
                        "examples": [
                            1000,
                            50000
                        ],
                        "minimum": 1,
                        "title": "Threshold",
                        "type": "integer"
                    }
                },
                "required": [
                    "type",
                    "unit",
                    "threshold"
                ],
                "title": "RateLimitV1",
                "type": "object"
            },
            "UsageLimitUnitV1": {
                "enum": [
                    "DAY"
                ],
                "title": "UsageLimitUnitV1",
                "type": "string"
            },
            "UsageLimitV1": {
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/LimitTypeV1",
                        "description": "The type of the usage limit",
                        "examples": [
                            "REQUEST",
                            "TOKEN"
                        ]
                    },
                    "unit": {
                        "$ref": "#/components/schemas/UsageLimitUnitV1",
                        "description": "The unit of the usage limit",
                        "examples": [
                            "DAY"
                        ]
                    },
                    "threshold": {
                        "description": "The threshold for the usage limit",
                        "examples": [
                            10000000
                        ],
                        "minimum": 1,
                        "title": "Threshold",
                        "type": "integer"
                    }
                },
                "required": [
                    "type",
                    "unit",
                    "threshold"
                ],
                "title": "UsageLimitV1",
                "type": "object"
            },
            "GroupsResponseV1": {
                "properties": {
                    "items": {
                        "description": "Items in this page.",
                        "items": {
                            "$ref": "#/components/schemas/GroupV1"
                        },
                        "title": "Items",
                        "type": "array"
                    },
                    "pagination": {
                        "$ref": "#/components/schemas/PaginationResponseV1",
                        "description": "Pagination metadata for the page."
                    }
                },
                "required": [
                    "items",
                    "pagination"
                ],
                "title": "GroupsResponseV1",
                "type": "object"
            },
            "CreateGroupRequestV1": {
                "properties": {
                    "metadata": {
                        "$ref": "#/components/schemas/GroupMetadataV1",
                        "description": "Group identity + display metadata."
                    },
                    "models": {
                        "description": "Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty.",
                        "items": {
                            "$ref": "#/components/schemas/ModelConfigV1"
                        },
                        "title": "Models",
                        "type": "array"
                    },
                    "hierarchy": {
                        "$ref": "#/components/schemas/GroupHierarchyV1",
                        "description": "Parent linkage and limit enforcement mode. Immutable after creation."
                    }
                },
                "required": [
                    "metadata",
                    "models",
                    "hierarchy"
                ],
                "title": "CreateGroupRequestV1",
                "type": "object"
            },
            "UpdateGroupMetadataV1": {
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "maxLength": 255,
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional display name for the group.",
                        "examples": [
                            "Acme prod"
                        ],
                        "title": "Name"
                    }
                },
                "title": "UpdateGroupMetadataV1",
                "type": "object"
            },
            "UpdateGroupRequestV1": {
                "properties": {
                    "metadata": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/UpdateGroupMetadataV1"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Mutable group metadata.",
                        "examples": [
                            {
                                "name": "Acme Prod"
                            }
                        ]
                    },
                    "models": {
                        "anyOf": [
                            {
                                "items": {
                                    "$ref": "#/components/schemas/ModelConfigV1"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Per-model rate and usage limit configuration.",
                        "title": "Models"
                    }
                },
                "title": "UpdateGroupRequestV1",
                "type": "object"
            },
            "GatewayKeyInfoV1": {
                "properties": {
                    "prefix": {
                        "description": "The prefix of the Model API key.",
                        "title": "Prefix",
                        "type": "string"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional display name.",
                        "title": "Name"
                    }
                },
                "required": [
                    "prefix"
                ],
                "title": "GatewayKeyInfoV1",
                "type": "object"
            },
            "KeysForGroupResponseV1": {
                "properties": {
                    "items": {
                        "description": "Items in this page.",
                        "items": {
                            "$ref": "#/components/schemas/GatewayKeyInfoV1"
                        },
                        "title": "Items",
                        "type": "array"
                    },
                    "pagination": {
                        "$ref": "#/components/schemas/PaginationResponseV1",
                        "description": "Pagination metadata for the page."
                    }
                },
                "required": [
                    "items",
                    "pagination"
                ],
                "title": "KeysForGroupResponseV1",
                "type": "object"
            },
            "CreateApiKeyForGroupRequestV1": {
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional display name for the new key.",
                        "examples": [
                            "prod-key-1"
                        ],
                        "title": "Name"
                    }
                },
                "title": "CreateApiKeyForGroupRequestV1",
                "type": "object"
            },
            "CreateApiKeyForGroupResponseV1": {
                "properties": {
                    "api_key": {
                        "description": "Plaintext key string, returned exactly once.",
                        "title": "Api Key",
                        "type": "string"
                    },
                    "prefix": {
                        "description": "Key prefix (the part before the dot).",
                        "title": "Prefix",
                        "type": "string"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Display name of the key.",
                        "title": "Name"
                    }
                },
                "required": [
                    "api_key",
                    "prefix"
                ],
                "title": "CreateApiKeyForGroupResponseV1",
                "type": "object"
            },
            "RegisterAPIKeyRequestV1": {
                "description": "Request to register a caller-supplied API key against an existing FederatedGroup.",
                "properties": {
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Optional name for the Model API key",
                        "examples": [
                            "my-model-api-key"
                        ],
                        "title": "Name"
                    },
                    "key": {
                        "description": "Value of the API key to register",
                        "examples": [
                            "my-secure-api-key-value"
                        ],
                        "title": "Key",
                        "type": "string"
                    }
                },
                "required": [
                    "key"
                ],
                "title": "RegisterAPIKeyRequestV1",
                "type": "object"
            },
            "RegisterAPIKeyResponseV1": {
                "properties": {
                    "ok": {
                        "description": "Whether the registration was successful",
                        "title": "Ok",
                        "type": "boolean"
                    }
                },
                "required": [
                    "ok"
                ],
                "title": "RegisterAPIKeyResponseV1",
                "type": "object"
            }
        },
        "parameters": {
            "team_id": {
                "schema": {
                    "type": "string"
                },
                "name": "team_id",
                "in": "path",
                "required": true
            },
            "model_id": {
                "schema": {
                    "type": "string"
                },
                "name": "model_id",
                "in": "path",
                "required": true
            },
            "deployment_id": {
                "schema": {
                    "type": "string"
                },
                "name": "deployment_id",
                "in": "path",
                "required": true
            },
            "replica_id": {
                "schema": {
                    "type": "string"
                },
                "name": "replica_id",
                "in": "path",
                "required": true
            },
            "env_name": {
                "schema": {
                    "type": "string"
                },
                "name": "env_name",
                "in": "path",
                "required": true
            },
            "chain_id": {
                "schema": {
                    "type": "string"
                },
                "name": "chain_id",
                "in": "path",
                "required": true
            },
            "chain_deployment_id": {
                "schema": {
                    "type": "string"
                },
                "name": "chain_deployment_id",
                "in": "path",
                "required": true
            },
            "chainlet_id": {
                "schema": {
                    "type": "string"
                },
                "name": "chainlet_id",
                "in": "path",
                "required": true
            },
            "training_project_id": {
                "schema": {
                    "type": "string"
                },
                "name": "training_project_id",
                "in": "path",
                "required": true
            },
            "training_job_id": {
                "schema": {
                    "type": "string"
                },
                "name": "training_job_id",
                "in": "path",
                "required": true
            },
            "session_id": {
                "schema": {
                    "type": "string"
                },
                "name": "session_id",
                "in": "path",
                "required": true
            },
            "trainer_id": {
                "schema": {
                    "type": "string"
                },
                "name": "trainer_id",
                "in": "path",
                "required": true
            },
            "checkpoint_id": {
                "schema": {
                    "type": "string"
                },
                "name": "checkpoint_id",
                "in": "path",
                "required": true
            },
            "run_id": {
                "schema": {
                    "type": "string"
                },
                "name": "run_id",
                "in": "path",
                "required": true
            },
            "sampler_id": {
                "schema": {
                    "type": "string"
                },
                "name": "sampler_id",
                "in": "path",
                "required": true
            },
            "api_key_prefix": {
                "schema": {
                    "type": "string"
                },
                "name": "api_key_prefix",
                "in": "path",
                "required": true
            },
            "user_defined_listing_id": {
                "schema": {
                    "type": "string"
                },
                "name": "user_defined_listing_id",
                "in": "path",
                "required": true
            },
            "version_tag": {
                "schema": {
                    "type": "string"
                },
                "name": "version_tag",
                "in": "path",
                "required": true
            },
            "user_id": {
                "schema": {
                    "type": "string"
                },
                "name": "user_id",
                "in": "path",
                "required": true
            },
            "group_id": {
                "schema": {
                    "type": "string"
                },
                "name": "group_id",
                "in": "path",
                "required": true
            }
        },
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "Authorization",
                "description": "You must specify the scheme 'Api-Key' in the Authorization header. For example, `Authorization: Api-Key <Your_Api_Key>`"
            }
        }
    }
}