Skip to content

Limits

Lengths count UTF-16 code units, as JavaScript's string.length does, so an emoji can count as two characters. No string you send may contain a NUL character or an unpaired surrogate, and one that does answers 400 validation_failed.

Limit Value Over the limit
Texts per call 1 Make one call per text. See Answering many texts.
Field value, or text 100,000 characters 400 validation_failed
context 100,000 characters 400 validation_failed
Fields, both contexts and longest question About 26,000 tokens, counted as 4 characters of JSON each 400 Request too large: about N tokens of fields, context and the longest question, the limit is 26000
Image types PNG, JPEG and WebP 400
Image data URL, before resizing 8,388,608 characters, about a 6 MiB file 400
Image pixels, before resizing 40 megapixels 400 The image is larger than 40 megapixels.
Image size 4 MiB after resizing. A long edge over 1568 px is shrunk and a short edge under 280 px enlarged first, WebP is sent as JPEG, and a PNG still over 4 MiB is sent as JPEG 400 The image is larger than 4 MiB even after resizing.
Images per call 8 MiB together, after resizing 400 The images of one call are larger than 8 MiB together.
Request body 12 MiB for a call that sends fields, 1 MiB for any other request 413 Malformed request
ref 1 to 200 characters, after trimming 400 validation_failed
idempotency_key 1 to 200 characters, after trimming, unique in the account 400 validation_failed, or 409 when first used with another prism
version A whole number from 1 to 2,147,483,647 400 validation_failed, or 404 when the version doesn't exist
{prism} in the path 1 to 64 characters, a slug or a UUID 400 validation_failed, or 404 when no such prism
{result_id} in the path A UUID 400 Invalid request: result_id: Invalid uuid
Model time 15 seconds per attempt by default. A second attempt only after a 429 or a 5xx A failed result, 502
Retries of one failed result 1. See Errors and retries. 409 This result was already retried as <id>.
Calls per API key 600 a minute, counted in fixed one-minute windows, whatever the endpoint 429 rate_limited, with Retry-After in seconds
How long results are kept 90 days by default. The account can choose 30, 90 or 365 days in the app Deleted daily. Reading one answers 404 Result not found

Only a model that reads images takes an image field. Today those are typesafe/jev-1.13.0, cloudflare/clef and cloudflare/clef-flash, and each takes up to four images per call. An image too narrow to fit 280 px on its short side within 1568 px on its long side answers 400. The account picks its model in Settings. With any other model, a call with an image answers 400.

You set these in the app when you build a prism. They explain what a call can send and get back.

Limit Value
Image fields Up to 4 of the fields can be images. A prism with more is refused when it is saved
Fields 1 to 8
Field, question and column keys A lowercase letter, then up to 63 lowercase letters, digits or _
Reserved keys context for fields. result_id, ref, version, status, error and created_at for field, question and column keys. other and insufficient_information for Choice option keys
Context Up to 8,000 characters
Questions 1 to 64
Question text Up to 500 characters, plus up to 4,000 of instructions
Choice options 2 to 253, plus other and insufficient_information
Scale levels 2 to 10
Option label Up to 200 characters, plus up to 2,000 of description
Whole prism About 16,000 tokens
  • A batch endpoint. Each call answers one text. Loop with bounded concurrency and an idempotency key per record.
  • Webhooks and async jobs. The call waits for the answers, so there is nothing to poll or receive. Set a client timeout above 30 seconds, as Sending a text explains.
  • Listing results. You read a result by its id. Keep the ids you need, match results to records with ref, or look results up in the app.
  • SDKs. Call the API over HTTP. To generate a client, use the OpenAPI 3.1 document at /openapi.json.
  • Key scopes. A key works for every prism in its account. Give each system its own key, so you can tell their calls apart and revoke one without the others.
  • CORS. Browsers can't call /v1. Call it from your server, as Authentication explains.
  • A stability promise, yet. Prismlet is not live. Until launch, /v1 can change without notice.
  • Credits and billing. Responses carry no cost, and no call is refused for payment.