> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Close Run

> Close a run you opened, ending it.

## Returns

Returns the closed [Run](/concepts/product/run), in a terminal status.

Leaving a `with galtea.runs.start(...)` block already closes the run, so call this only for a run you
opened without a block. A handle from [`runs.start()`](/sdk/api/run/start) closes its own run with
`run.close()`, which takes no arguments and is a no-op the second time.

The API refuses the close in three cases: the run is deleted, the run already ended, or the platform
opened the run. It refuses a run the platform opened whatever its status: that run ends with its own
launch.

A close always ends the run as `COMPLETED`. You performed the work yourself, so the platform has no
outcome of its own to report.

## Example

```python theme={"system"}
# A run you open without a `with` block stays open until you close it yourself.
nightly_run = galtea.runs.start(product_id=product_id, custom_id="nightly-2026-09-16")
closed_run = nightly_run.close()
print(f"Run {closed_run.id} ended as {closed_run.status}")

# With only the id in hand, close the run through the service.
rerun = galtea.runs.start(product_id=product_id, custom_id="nightly-2026-09-16-rerun")
galtea.runs.close(run_id=rerun.id)
```

## Parameters

<ResponseField name="run_id" type="string" required>
  The ID of the run to close.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.