Skip to content

Where an AI extraction of requirements stands, and what it proposed

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

The extraction (#2292, ADR 0076), for the person who asked for it: its state, what was sent, the cost and, once done, the proposals in result until resultKeptUntil (24 hours after it ended; then result is null and the cost stays). failed names its failureKind; one still running 25 minutes after its try began, or still queued 2 hours after it was asked for, reads failed / stalled. Anyone else in the project gets the 404 of an extraction nobody made.

id
required
string

An id from GET /v1/projects

extractionId
required
string

The id a POST …/extractions answered with

The extraction

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": "done",
"reused": false,
"createdAt": "2026-11-04T09:00:00.000Z",
"startedAt": "2026-11-04T09:00:02.000Z",
"finishedAt": "2026-11-04T09:00:41.000Z",
"fetched": {
"text": 268
},
"redactions": 0,
"provider": "anthropic",
"model": "claude-haiku-4-5",
"cost": {
"inputTokens": 290,
"outputTokens": 180,
"costUsd": 0.00119
},
"failureKind": null,
"result": {
"requirements": [
{
"line": 4,
"title": "Accept a card payment",
"quote": "The system shall accept a card payment.",
"priority": "High",
"type": "user_story"
}
],
"questions": [
{
"line": 6,
"title": "Support Apple Pay?",
"quote": "We could maybe support Apple Pay later."
}
],
"refused": []
},
"resultKeptUntil": "2026-11-05T09:00:41.000Z"
}

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"
}

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