Skip to content

Retry a failed result

POST
/results/{result_id}/retry
curl --request POST \
--url 'https://api.prismlet.com/v1/results/0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c/retry?format=json' \
--header 'Authorization: Bearer <token>'

Sends a failed result’s fields to the model again, against the same prism version, and saves the answer as a new result with its own id. The response is that new result, on 200 or 502. Send no body.

Only a failed result can be retried, and only once. A second retry answers 409 and names the result that retried it. If that retry failed too, retry it in turn. An idempotency key held by the failed result moves to the new one. A result of an archived prism cannot be retried and answers 404.

A result whose input_storage is not full has no text to send, so its retry answers 409 input_not_stored. Send the text again as a new call, or repeat the call with the result’s idempotency key.

result_id
required
string format: uuid

The result’s id.

Example
0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c
format
string
default: json
Allowed values: json raw csv tsv jsonl

What the response body holds.

  • json: the result, with one answer per question.
  • raw: the result, with the stored answers and every probability.
  • csv, tsv: a header row and one row for the result.
  • jsonl: one line holding the same row as a JSON object.

Defaults to json, also when sent empty. An unknown value answers 400. Errors are JSON in every format.

The retry was answered and saved as a new result.

Any of:
Result (json)

A result in the default json format. answers follows the questions of the published version, so publishing a version that removes a question changes what an old result returns. Yes / No labels keep the cutoffs the result was saved with.

object
id
required

The result id. Use it to read or retry the result.

string format: uuid
ref
required

The ref sent with the call, or null.

string | null
prism
required

The prism’s slug.

string
version
required

The prism version that answered.

integer
>= 1
status
required

ok, or failed when the model gave no usable answer.

string
Allowed values: ok failed
error
required

Why the result failed, in words. Null when status is ok.

string | null
took_ms
required

How long the call to the model took, in milliseconds.

integer
created_at
required

When the result was saved, ISO 8601 in UTC.

string format: date-time
input_storage
required

What Prismlet keeps of the text: full keeps the fields and context, fingerprint keeps only a keyed hash of them, none keeps nothing. Set per prism in the app. Unless it is full, the field columns of a row are empty and the result can’t be retried.

string
Allowed values: full fingerprint none
answers
required

One entry per question of the published prism version, keyed by question key, in question order. Null when the result failed.

object | null
Examples

Answered on retry, format=json

{
"id": "0192f5c4-9e27-7c55-b3d8-41a6f0e8c9b2",
"ref": "TCK-8812",
"prism": "support-routing",
"version": 3,
"status": "ok",
"error": null,
"took_ms": 640,
"created_at": "2026-09-23T09:16:05.931Z",
"input_storage": "full",
"answers": {
"team": "billing",
"urgent": "yes",
"tone": "annoyed"
}
}

The result id or the format is invalid, or the body is not valid JSON.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples

Result id is not a UUID

{
"error": {
"code": "validation_failed",
"message": "Invalid request: result_id: Invalid uuid"
}
}

No API key, or one that is unknown or revoked.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples

No Authorization header

{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}

No result with this id in this account, or its prism is archived.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples

Unknown result

{
"error": {
"code": "not_found",
"message": "Result not found"
}
}

The result succeeded, was already retried, or kept no text.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples

Result succeeded

{
"error": {
"code": "conflict",
"message": "Only a failed result can be retried."
}
}

A body over 1 MiB was sent. Send no body.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples
Examplebody_too_large

Body too large

{
"error": {
"code": "bad_request",
"message": "Malformed request"
}
}

A body was sent with a content type the server does not parse. Send no body.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples
Exampleunsupported_content_type

Unsupported content type

{
"error": {
"code": "bad_request",
"message": "Malformed request"
}
}

The key made more calls this minute than its limit, 600 by default. Nothing was sent to the model and nothing was saved. Wait the seconds in Retry-After, then repeat the call.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples
Exampletoo_many_calls

Too many calls

{
"error": {
"code": "rate_limited",
"message": "This API key made too many calls this minute. Wait the seconds in Retry-After, then repeat the call."
}
}
Retry-After
integer
>= 1 <= 60

Seconds until the key’s minute ends and it can call again.

A bug on our side. The message is always the same.

Media typeapplication/json; charset=utf-8

Every error has this body, in JSON, whatever format asked for.

object
error
required
object
code
required

validation_failed, bad_request, unauthorized, not_found, conflict, input_not_stored or internal_error.

string
message
required

What went wrong, in words. A validation message names the failing paths and never repeats a value sent. Unknown fields lists the keys sent.

string
Examples
Exampleunexpected_error

Unexpected error

{
"error": {
"code": "internal_error",
"message": "Internal server error"
}
}

The model failed again. The new failed result is saved and returned, and can be retried in turn.

Any of:
Result (json)

A result in the default json format. answers follows the questions of the published version, so publishing a version that removes a question changes what an old result returns. Yes / No labels keep the cutoffs the result was saved with.

object
id
required

The result id. Use it to read or retry the result.

string format: uuid
ref
required

The ref sent with the call, or null.

string | null
prism
required

The prism’s slug.

string
version
required

The prism version that answered.

integer
>= 1
status
required

ok, or failed when the model gave no usable answer.

string
Allowed values: ok failed
error
required

Why the result failed, in words. Null when status is ok.

string | null
took_ms
required

How long the call to the model took, in milliseconds.

integer
created_at
required

When the result was saved, ISO 8601 in UTC.

string format: date-time
input_storage
required

What Prismlet keeps of the text: full keeps the fields and context, fingerprint keeps only a keyed hash of them, none keeps nothing. Set per prism in the app. Unless it is full, the field columns of a row are empty and the result can’t be retried.

string
Allowed values: full fingerprint none
answers
required

One entry per question of the published prism version, keyed by question key, in question order. Null when the result failed.

object | null
Examples

Model timed out again, format=json

{
"id": "0192f5c5-4d81-7a02-9c3e-6b27d1f0a845",
"ref": "TCK-8812",
"prism": "support-routing",
"version": 3,
"status": "failed",
"error": "The model took too long to answer, so we stopped after 15 seconds.",
"took_ms": 15012,
"created_at": "2026-09-23T09:16:38.644Z",
"input_storage": "full",
"answers": null
}