---
title: "Revoke a model lease"
method: POST
path: "/projects/{projectId}/model-leases/revoke"
tags: ["Eval runs"]
---

# Revoke a model lease

`POST /projects/{projectId}/model-leases/revoke`

Kills this caller's SDK model leases under `runId` in the addressed project, immediately — the proxy fails a revoked lease closed from that moment. Leases also expire on their own, so this is for ending a run early (an SDK suite calls it at teardown) rather than something a caller must do.

## Path parameters

- `projectId` string, required

## Request body

- ModelLeaseRevokeRequest
  - `runId` string, required — The `runId` returned when the lease was minted.

## Response `200`

How many leases were revoked.

- object
  - `ok` boolean, required
  - `revoked` integer, required

## Other responses

- `400` — Malformed body or parameters.
- `401` — Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is a property of the server, not your key.
- `403` — Key is valid but not allowed to do this.
- `404` — Unknown project, server, or resource.
- `429` — Per-key rate limit exceeded (60 requests/minute sustained, bursts up to 10). Honor `Retry-After` and back off with jitter.
- `500` — Something failed on MCPJam's side.
- `502` — Could not connect to the target MCP server.
- `504` — The target MCP server connected but didn't respond in time.

## Changes

- **2026-09-16** `49fb945e71f0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mcpjam/apis/mcpjam-api/changes/projects/:projectId/model-leases/revoke/post.md)

---

[API](https://skmtc.dev/mcpjam/apis/mcpjam-api.md) · [All operations](https://skmtc.dev/mcpjam/apis/mcpjam-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mcpjam/apis/mcpjam-api/revisions/a15a9864fb85?raw)
