Skip to content

Read an image

GET
/images/{sha}
curl --request GET \
--url https://api.prismlet.com/v1/images/example \
--header 'Authorization: Bearer <token>'

Returns the bytes of an image this account stored, by the 64 hex characters of its image: ref. The content type is the stored image type. A result keeps an image: ref only when its prism stores input in full, and an image no result refers to is deleted by a daily sweep.

sha
required
string
/^[0-9a-f]{64}$/

The image.

string format: binary

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 image with this hash in this account.

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
Exampleunknown_image

Unknown image

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

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