What an AI extraction of requirements would send, and its estimated cost
const url = 'https://beta-api.plune.ai/v1/projects/example/requirements/import/extract/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"markdown":"# Checkout notes\n\nWe talked about payments with the whole team today and agreed on the first version of the checkout page.\n- The system shall accept a card payment. Priority: High\n- Expired cards must be refused with a clear message.\nWe could maybe support Apple Pay later.\n"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/projects/example/requirements/import/extract/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "markdown": "# Checkout notes\n\nWe talked about payments with the whole team today and agreed on the first version of the checkout page.\n- The system shall accept a card payment. Priority: High\n- Expired cards must be refused with a clear message.\nWe could maybe support Apple Pay later.\n" }'The check before POST …/import/extractions (#1607, epic #1594): how many characters of the file would go to the project’s AI provider after secrets are masked, how many secrets were masked, the provider and model, and the estimated cost (the input at about four characters a token, plus the output ceiling). Nothing is sent, stored or counted. The project’s AI state is answered before the text is judged, so the file step of a client can say why the extraction is not offered (503 / 409). Then the text: more than 100000 characters is a 422 text_too_long (it is never cut), fewer than 20 words a 422 text_too_empty. An owner or a member (a reader gets 403); a bearer token only in the project it was minted in.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”An id from GET /v1/projects
Request Body required
Section titled “Request Body required ”object
The text: at most 100000 characters, at least 20 words.
The language of the titles; the project’s AI language when left out.
Example
{ "markdown": "# Checkout notes\n\nWe talked about payments with the whole team today and agreed on the first version of the checkout page.\n- The system shall accept a card payment. Priority: High\n- Expired cards must be refused with a clear message.\nWe could maybe support Apple Pay later.\n"}Responses
Section titled “ Responses ”What would be sent
object
object
Characters sent, after masking.
Secrets masked before anything leaves.
object
Null when the model has no price: unknown, never 0.
Example
{ "fetched": { "text": 412 }, "redactions": 0, "provider": "anthropic", "model": "claude-haiku-4-5", "estimate": { "inputTokens": 290, "maxOutputTokens": 32768, "costUsd": 0.16413 }}Invalid JSON or body
object
Example generated
{ "error": "example"}No / invalid token or session
You are in the project as a reader
No such project among yours (or a token of another project)
object
Example generated
{ "error": "example"}No AI provider connected (ai_not_connected), AI turned off (ai_disabled), or a saved key this server cannot read (key_rejected, the extraction only)
object
Example generated
{ "error": "example"}text_too_long (more than 100000 characters, with limit) or text_too_empty (fewer than 20 words, with minWords)
object
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.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
No AI platform key on this server (platform_not_configured)
object
Example generated
{ "error": "example"}