Skip to content

What a run from pasted text or a Jira ticket would send to the model

POST
/v1/projects/{id}/case-generations/preview
curl --request POST \
--url https://beta-api.plune.ai/v1/projects/example/case-generations/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "input": { "kind": "pasted-text", "title": "Password reset", "text": "As a shopper I want to reset my password from the sign in page, so that I can get back into my account when I forget it.\nAcceptance criteria:\n- the reset link is sent to the e-mail of the account\n- the link expires after one hour\n- a used link cannot be used again" }, "maxCases": 6, "language": "en" }'

The same body as the start, answered without sending, storing or counting anything: how many characters of the title and the text would go to the model after masking, how many places were masked as a secret (keys, tokens, Authorization headers, connection strings), the cost estimate on the project’s model, and the proposals and cases the project already has from the same text. Personal data in the text (names, phones, e-mails) is NOT masked. An owner or a member (a reader gets 403); a bearer token only in the project it was minted in, and only for pasted text. For a Jira ticket, the refusals a start would give before reading it (the monthly limit, the queue’s ceiling, the run limits) come first, and Jira is not asked; then the ticket is read from Jira now, and the answer also says which of its fields would go, how many characters each, and which were cut; the duplicates are what the project holds from the same ticket.

id
required
string

An id from GET /v1/projects

Media type application/json
object
input
required
One of:
object
kind
required
string
Allowed values: pasted-text
text
required

The story and its acceptance criteria. Over 12000 characters is a 422 (text_too_long), under 20 words a 422 (ticket_too_empty).

string
title

What the text is called; it becomes the source the proposals name.

string
<= 300 characters
maxCases

The most proposals the run may produce.

integer
default: 8 >= 1 <= 12
language

The language of the cases; the project’s AI language when left out.

string
>= 2 characters <= 35 characters
confirmDuplicates

Proposals or cases from the same text already exist (409 duplicate_source): true generates anyway.

boolean
Example
{
"input": {
"kind": "pasted-text",
"title": "Password reset",
"text": "As a shopper I want to reset my password from the sign in page, so that I can get back into my account when I forget it.\nAcceptance criteria:\n- the reset link is sent to the e-mail of the account\n- the link expires after one hour\n- a used link cannot be used again"
},
"maxCases": 6,
"language": "en"
}

What would be sent, and what already exists

Media type application/json
object
fetched
required
object
title
required
integer
text
required
integer
ticket

A Jira ticket only: its key, as Jira answered it, and what each of its fields would give.

object
key
required
string
fields
required

The fields of a Jira ticket in the order they are cut (BH-B1 spec §5): summary (300 characters), description (8 000), criteria (4 000) and meta (300), together at most 12 000 — a field gets what its budget and the fields before it leave. chars is what went, after masking; cut says the field had more.

Array<object>
object
field
required
string
Allowed values: summary description criteria meta
chars
required
integer
cut
required
boolean
redactions
required
integer
provider
required
string
Allowed values: anthropic openrouter custom
model
required
string
estimate
required

The input as tokens (about four characters a token) priced, plus the output up to its ceiling. costUsd null = the model’s price is unknown.

object
inputTokens
required
integer
maxOutputTokens
required
integer
costUsd
required
number
nullable
duplicates
required

What the project already holds from the same text: the proposals earlier runs of it put in the queue (any state but approved), and the cases the approved ones became.

object
proposals
required
Array<object>
object
id
required
string
title
required
string
state
required
string
cases
required
Array<object>
object
id
required
string
title
required
string
Example
{
"fetched": {
"title": 14,
"text": 214
},
"redactions": 0,
"provider": "anthropic",
"model": "claude-haiku-4-5",
"estimate": {
"inputTokens": 260,
"maxOutputTokens": 8192,
"costUsd": 0.04122
},
"duplicates": {
"proposals": [],
"cases": []
}
}

Invalid JSON or body

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

No / invalid token or session

You are in the project as a reader; a token asking for a Jira ticket; or the project’s tier has no issue trackers (feature: issue_trackers)

No such project among yours (or a token of another project)

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

ai_not_connected / ai_disabled: the project’s AI is not usable; jira_not_working: the project’s Jira connection does not work (with its state)

Media type application/json
object
error
required
string
code
string
Allowed values: text_too_long ticket_too_empty jira_not_connected jira_not_working jira_ticket_not_found jira_forbidden jira_token_rejected jira_ip_blocked jira_rate_limited jira_unavailable jira_unexpected_answer platform_not_configured ai_not_connected ai_disabled key_rejected duplicate_source member_limit project_limit concurrent_limit ai_budget_spent
key

jira_ticket_not_found / jira_forbidden: the key asked for.

string
state

jira_not_working (409): the state of the project’s Jira connection.

string
Allowed values: rejected ip_blocked error
retryAfterSec

jira_rate_limited: the seconds of Jira’s Retry-After, else 30 (also the Retry-After header).

integer
limit

text_too_long: the most characters a run takes.

integer
minWords

ticket_too_empty: the fewest words a run takes.

integer
duplicates

What the project already holds from the same text: the proposals earlier runs of it put in the queue (any state but approved), and the cases the approved ones became.

object
proposals
required
Array<object>
object
id
required
string
title
required
string
state
required
string
cases
required
Array<object>
object
id
required
string
title
required
string
capUsd

ai_budget_spent: the owner’s monthly limit.

number
spentUsd

ai_budget_spent: what the month has spent, known-price calls and runs only.

number
resetsOn

ai_budget_spent: the day the limit frees (the 1st, UTC).

string format: date
Example
{
"code": "text_too_long",
"state": "rejected"
}

text_too_long / ticket_too_empty

Media type application/json
object
error
required
string
code
string
Allowed values: text_too_long ticket_too_empty jira_not_connected jira_not_working jira_ticket_not_found jira_forbidden jira_token_rejected jira_ip_blocked jira_rate_limited jira_unavailable jira_unexpected_answer platform_not_configured ai_not_connected ai_disabled key_rejected duplicate_source member_limit project_limit concurrent_limit ai_budget_spent
key

jira_ticket_not_found / jira_forbidden: the key asked for.

string
state

jira_not_working (409): the state of the project’s Jira connection.

string
Allowed values: rejected ip_blocked error
retryAfterSec

jira_rate_limited: the seconds of Jira’s Retry-After, else 30 (also the Retry-After header).

integer
limit

text_too_long: the most characters a run takes.

integer
minWords

ticket_too_empty: the fewest words a run takes.

integer
duplicates

What the project already holds from the same text: the proposals earlier runs of it put in the queue (any state but approved), and the cases the approved ones became.

object
proposals
required
Array<object>
object
id
required
string
title
required
string
state
required
string
cases
required
Array<object>
object
id
required
string
title
required
string
capUsd

ai_budget_spent: the owner’s monthly limit.

number
spentUsd

ai_budget_spent: what the month has spent, known-price calls and runs only.

number
resetsOn

ai_budget_spent: the day the limit frees (the 1st, UTC).

string format: date
Example
{
"code": "text_too_long",
"state": "rejected"
}

jira_not_connected (no Jira on the server or in the project); what Jira answered instead of the ticket: jira_ticket_not_found, jira_forbidden, jira_token_rejected / jira_ip_blocked (the connection takes that state), jira_rate_limited (with Retry-After), jira_unavailable (try again later), jira_unexpected_answer (a redirect; another 4xx of Jira’s, such as 400, 405, 410 or 422; an answer too large or unreadable; or a key longer than 100 characters: check the connection’s address in Settings) — never Jira’s own words

Media type application/json
object
error
required
string
code
string
Allowed values: text_too_long ticket_too_empty jira_not_connected jira_not_working jira_ticket_not_found jira_forbidden jira_token_rejected jira_ip_blocked jira_rate_limited jira_unavailable jira_unexpected_answer platform_not_configured ai_not_connected ai_disabled key_rejected duplicate_source member_limit project_limit concurrent_limit ai_budget_spent
key

jira_ticket_not_found / jira_forbidden: the key asked for.

string
state

jira_not_working (409): the state of the project’s Jira connection.

string
Allowed values: rejected ip_blocked error
retryAfterSec

jira_rate_limited: the seconds of Jira’s Retry-After, else 30 (also the Retry-After header).

integer
limit

text_too_long: the most characters a run takes.

integer
minWords

ticket_too_empty: the fewest words a run takes.

integer
duplicates

What the project already holds from the same text: the proposals earlier runs of it put in the queue (any state but approved), and the cases the approved ones became.

object
proposals
required
Array<object>
object
id
required
string
title
required
string
state
required
string
cases
required
Array<object>
object
id
required
string
title
required
string
capUsd

ai_budget_spent: the owner’s monthly limit.

number
spentUsd

ai_budget_spent: what the month has spent, known-price calls and runs only.

number
resetsOn

ai_budget_spent: the day the limit frees (the 1st, UTC).

string format: date
Example
{
"code": "text_too_long",
"state": "rejected"
}

The route’s throttle; or, for a Jira ticket, what its start would be refused by, answered before Jira is asked: the monthly AI limit (ai_budget_spent), a run limit (member_limit, project_limit, concurrent_limit), each with Retry-After, or the review queue’s ceiling (a quota body, no Retry-After) — unless the same ticket made a run within 10 minutes

Media type application/json
One of:
object
error
required
string
Example
{
"code": "text_too_long",
"state": "rejected"
}
Retry-After
integer

Seconds until the throttle or the limit lets the next request through

platform_not_configured: the server has no AI encryption key

Media type application/json
object
error
required
string
code
string
Allowed values: text_too_long ticket_too_empty jira_not_connected jira_not_working jira_ticket_not_found jira_forbidden jira_token_rejected jira_ip_blocked jira_rate_limited jira_unavailable jira_unexpected_answer platform_not_configured ai_not_connected ai_disabled key_rejected duplicate_source member_limit project_limit concurrent_limit ai_budget_spent
key

jira_ticket_not_found / jira_forbidden: the key asked for.

string
state

jira_not_working (409): the state of the project’s Jira connection.

string
Allowed values: rejected ip_blocked error
retryAfterSec

jira_rate_limited: the seconds of Jira’s Retry-After, else 30 (also the Retry-After header).

integer
limit

text_too_long: the most characters a run takes.

integer
minWords

ticket_too_empty: the fewest words a run takes.

integer
duplicates

What the project already holds from the same text: the proposals earlier runs of it put in the queue (any state but approved), and the cases the approved ones became.

object
proposals
required
Array<object>
object
id
required
string
title
required
string
state
required
string
cases
required
Array<object>
object
id
required
string
title
required
string
capUsd

ai_budget_spent: the owner’s monthly limit.

number
spentUsd

ai_budget_spent: what the month has spent, known-price calls and runs only.

number
resetsOn

ai_budget_spent: the day the limit frees (the 1st, UTC).

string format: date
Example
{
"code": "text_too_long",
"state": "rejected"
}