Skip to content

Cancel an AI extraction of requirements still in the queue

DELETE
/v1/projects/{id}/requirements/import/extractions/{extractionId}
curl --request DELETE \
--url https://beta-api.plune.ai/v1/projects/example/requirements/import/extractions/example \
--header 'Authorization: Bearer <token>'

Cancels the extraction (#2292) while it is queued: its job then calls no model and spends nothing. One already sent to the model, or ended, is a 409. The person who asked for it only; anyone else gets the 404 of GET.

id
required
string

An id from GET /v1/projects

extractionId
required
string

The id a POST …/extractions answered with

Cancelled

Media type application/json
object
id
required
string
state
required
string
Allowed values: queued running done failed cancelled
reused
required

True only on a POST that found the earlier extraction of the same text; false on GET and DELETE.

boolean
createdAt
required
string format: date-time
startedAt
required
string format: date-time
nullable
finishedAt
required
string format: date-time
nullable
fetched
required
object
text
required

Characters sent, after masking.

integer
redactions
required

Secrets masked before anything left.

integer
provider
required

The project’s provider when it was queued.

string
model
required
string
cost
required

Tokens null = the provider reported none; costUsd null beside tokens = the model’s price is unknown, never 0.

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

Null unless failed: timeout (no answer within 5 minutes), the provider’s own kind (key_rejected, provider_rate_limited, provider_unavailable, invalid_response, address_rejected), stalled (it did not finish), ai_unavailable (the project’s AI was gone when it ran), or ai_budget_spent (the project’s monthly AI limit ran out while it waited in the queue: the provider was not called, nothing was spent).

string
nullable
result
required

What it proposed, each line in the file as sent: only while done and until resultKeptUntil, null otherwise.

object
requirements
required
Array<object>
object
line
required
integer
>= 1
title
required
string
quote
required
string
priority

Only when the text states it.

string
acceptanceCriteria

Only the ones the text states.

Array<string>
type
string
Allowed values: user_story feature epic
questions
required
Array<object>
object
line
required
integer
>= 1
title
required
string
quote
required
string
refused
required
Array<object>
object
title
required
string
reason
required
string
Allowed values: no_quote quote_not_in_text invalid
resultKeptUntil
required

finishedAt plus 24 hours when done; then result reads null and the cost stays. Null otherwise.

string format: date-time
nullable
Example
{
"id": "7a2c4e10-0000-4000-8000-0000000000b1",
"state": "cancelled",
"reused": false,
"createdAt": "2026-11-04T09:00:00.000Z",
"startedAt": null,
"finishedAt": "2026-11-04T09:00:03.000Z",
"fetched": {
"text": 268
},
"redactions": 0,
"provider": "anthropic",
"model": "claude-haiku-4-5",
"cost": {
"inputTokens": null,
"outputTokens": null,
"costUsd": null
},
"failureKind": null,
"result": null,
"resultKeptUntil": null
}

No / invalid token or session

You are in the project as a reader

No such project among yours, or no such extraction of yours in it

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

The extraction is not in the queue any more: running, or ended

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