Skip to content

Cancel a run still in the queue

DELETE
/v1/projects/{id}/case-generations/{generationId}
curl --request DELETE \
--url https://beta-api.plune.ai/v1/projects/example/case-generations/example \
--header 'Authorization: Bearer <token>'

A run that has not started is cancelled and never reaches the model. A running one has been sent already and is let finish (409). An owner or a member.

id
required
string

An id from GET /v1/projects

generationId
required
string

The id a start answered with

The run, cancelled

Media type application/json

One run (ADR 0067 point 4). It never holds the text: what went to the model is counted (fetched), masked secrets are counted (redactions), and the text itself lives only in the proposals the run wrote.

object
id
required
string
state
required
string
Allowed values: queued running done failed cancelled
inputKind
required
string
Allowed values: pasted-text jira-ticket
maxCases
required
integer
language
required
string
fetched
required

Characters of each field sent to the model, after masking.

object
title
required
integer
text
required
integer
redactions
required

How many places were masked as a secret before anything was sent.

integer
produced
required

Proposals put in the review queue, each pending.

integer
skipped
required

Proposals left out: invalid broke a bound of the proposal (the field named), over_limit came past maxCases.

Array<object>
object
index
required
integer
reason
required
string
Allowed values: invalid over_limit
field
string
cost
required

Tokens null = the provider reported none; costUsd null beside tokens = the model’s price is unknown — never 0. Counted in the project’s monthly AI limit.

object
inputTokens
required
integer
nullable
outputTokens
required
integer
nullable
costUsd
required
number
nullable
provider

Where the run was sent, once it started.

string
Allowed values: anthropic openrouter custom
model
string
failureKind

Only on failed.

string
Allowed values: key_rejected provider_rate_limited provider_unavailable invalid_response address_rejected timeout ai_unavailable queue_full stalled
requestedBy
required
string
createdAt
required
string format: date-time
startedAt
required
string format: date-time
nullable
finishedAt
required
string format: date-time
nullable
Example
{
"id": "6f1c2b3a-0000-4000-8000-0000000000aa",
"state": "cancelled",
"inputKind": "pasted-text",
"maxCases": 6,
"language": "en",
"fetched": {
"title": 14,
"text": 214
},
"redactions": 0,
"produced": 0,
"skipped": [],
"cost": {
"inputTokens": null,
"outputTokens": null,
"costUsd": null
},
"requestedBy": "6f1c2b3a-0000-4000-8000-0000000000a2",
"createdAt": "2026-10-25T09:00:00.000Z",
"startedAt": null,
"finishedAt": "2026-10-25T09:00:05.000Z"
}

No / invalid token or session

You are in the project as a reader

No such project among yours, or no such run in it

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The run is no longer in the queue

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over