Skip to content

1.3.0

Choose a tag to compare

@AboveColin AboveColin released this 16 Oct 13:37
1024bd0

Images and Box questions, for Jev 1.14.

  • Image(data, format) is a PNG or JPEG. Pass images to ask(..., assets={ref: Image(...)}) and write ref where the image belongs: in the state, an instruction or a criterion. ask raises ValueError before the request when an asset is not referenced anywhere, because the API answers that with a 400.
  • Box(instructions) asks where something is. The answer is a BoxAnswer with top, bottom, left, right as fractions of the image, and confidence. Box needs jev-1.14.0 or jev-preview.
  • The client sends the TypeSafe-Danger-Zone-Images: true header on a request with an image or a Box, and on no other.
  • JevError.status carries the HTTP status. 400, 413 and 422 raise JevValidationError, so jev-nope now raises JevValidationError("Unknown model: jev-nope") instead of a generic error.
  • MIN_IMAGE_SIDE (280), MAX_IMAGE_SIDE (1568) and MAX_IMAGE_BYTES (16 MiB) are the API's limits. The API refuses an image outside them and does not resize it.

Measured on 2026-10-16: an image is billed 2 input tokens for each 28 x 28 pixel square, so 200 at 280 x 280 and 6,272 at 1568 x 1568. A Box on a red square at 0.6/0.2/0.8/0.5 answered 0.59/0.19/0.79/0.50 at confidence 0.96.