What a run from pasted text would send to the model
const url = 'https://beta-api.plune.ai/v1/projects/example/case-generations/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
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/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.
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
object
The story and its acceptance criteria. Over 12000 characters is a 422 (text_too_long), under 20 words a 422 (ticket_too_empty).
What the text is called; it becomes the source the proposals name.
A Jira ticket by its key. Not available yet: answered 424 jira_not_connected (the ticket mode comes with the Jira connection).
object
The most proposals the run may produce.
The language of the cases; the project’s AI language when left out.
Proposals or cases from the same text already exist (409 duplicate_source): true generates anyway.
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"}Responses
Section titled “ Responses ”What would be sent, and what already exists
object
object
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
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
object
object
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
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"}ai_not_connected / ai_disabled: the project’s AI is not usable
object
text_too_long: the most characters a run takes.
ticket_too_empty: the fewest words a run takes.
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
object
object
ai_budget_spent: the owner’s monthly limit.
ai_budget_spent: what the month has spent, known-price calls and runs only.
ai_budget_spent: the day the limit frees (the 1st, UTC).
Example
{ "code": "text_too_long"}text_too_long / ticket_too_empty
object
text_too_long: the most characters a run takes.
ticket_too_empty: the fewest words a run takes.
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
object
object
ai_budget_spent: the owner’s monthly limit.
ai_budget_spent: what the month has spent, known-price calls and runs only.
ai_budget_spent: the day the limit frees (the 1st, UTC).
Example
{ "code": "text_too_long"}jira_not_connected: the ticket mode is not available
object
text_too_long: the most characters a run takes.
ticket_too_empty: the fewest words a run takes.
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
object
object
ai_budget_spent: the owner’s monthly limit.
ai_budget_spent: what the month has spent, known-price calls and runs only.
ai_budget_spent: the day the limit frees (the 1st, UTC).
Example
{ "code": "text_too_long"}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
platform_not_configured: the server has no AI encryption key
object
text_too_long: the most characters a run takes.
ticket_too_empty: the fewest words a run takes.
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
object
object
ai_budget_spent: the owner’s monthly limit.
ai_budget_spent: what the month has spent, known-price calls and runs only.
ai_budget_spent: the day the limit frees (the 1st, UTC).
Example
{ "code": "text_too_long"}