Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.perceptron.inc/llms.txt

Use this file to discover all available pages before exploring further.

Understand how Isaac 0.2 counts tokens for images so you can estimate costs and optimize preprocessing pipelines.

Image Token Counting

The gateway smart-resizes any image whose native patch count exceeds the 6,144-patch cap before tokenization, preserving aspect ratio. Isaac 0.2 (both 1B and 2B Preview) uses a patch-based image tokenizer:
  • Native resolution: Processes images at their original resolution; supports a wide range of aspect ratios.
  • Patch size: 16 × 16 pixels.
  • Spatial merge size: 2 × 2 (4 patches into a single token).
  • Token formula: ⌈width / 32⌉ × ⌈height / 32⌉.
  • Minimum: 256 patches → 64 tokens (smaller images auto-upscaled).
  • Maximum: 6,144 patches → ~1,508 tokens for 16:9 inputs (resized dimensions must be divisible by 32, so the practical ceiling is ~1,508 tokens).
  • Smart-resize is silent: no warning in the response. To keep deterministic control over input quality, pre-resize client-side before uploading.

Calculation Examples

Example 1: 640×480 (VGA) — No Resize Needed
  1. Round dimensions to nearest multiple of 32: 640×480 (already divisible).
  2. Calculate patches: (640 ÷ 16) × (480 ÷ 16) = 40 × 30 = 1,200 patches.
  3. Calculate tokens: 1,200 patches ÷ 4 = 300 tokens.
  4. Check constraints: 256 ≤ 1,200 ≤ 6,144 ✓ (no resize needed).
  5. Cost (Isaac 0.2 at $0.15/M input): 300 × ($0.15 / 1,000,000) = $0.000045.
Example 2: 1920×1080 (Full HD) — Requires Resize
  1. Calculate original patches: (1920 ÷ 16) × (1080 ÷ 16) = 120 × 68 = 8,160 patches.
  2. Check constraints: 8,160 > 6,144 (exceeds maximum, resize needed).
  3. Resize to 1664×928 (maintains ~16:9 aspect ratio, divisible by 32).
  4. Calculate new patches: (1664 ÷ 16) × (928 ÷ 16) = 104 × 58 = 6,032 patches.
  5. Calculate tokens: 6,032 patches ÷ 4 = 1,508 tokens.
  6. Cost (Isaac 0.2 at $0.15/M input): 1,508 × ($0.15 / 1,000,000) = $0.000226.

Constraints

  • Context window: 8K tokens (image + text + reasoning + answer all share the same budget).
  • Supported MIME types: image/png, image/jpeg, image/webp.

Pricing

Pricing for Isaac 0.2 (both 1B and 2B Preview):
  • Input: $0.15 per million tokens ($0.15/MT)
  • Output: $1.25 per million tokens ($1.25/MT)

Common Image Sizes

Token counts and costs for common image resolutions.
ResolutionDimensionsTokensCost (Input)Per 1K Images
512×512512×512256$0.000038$0.04
VGA640×480300$0.000045$0.05
HD (720p)1280×720920$0.000138$0.14
1024×10241024×10241,024$0.000154$0.15
Full HD (1080p)1920×10801,508*$0.000226$0.23
2K2560×14401,508*$0.000226$0.23
4K3840×21601,508*$0.000226$0.23
8K7680×43201,508*$0.000226$0.23
*Isaac 0.2 automatically resizes images exceeding 6,144 patches to fit within this limit while maintaining aspect ratio. Due to the resize algorithm (dimensions must be divisible by 32), the practical maximum is 1,508 tokens (6,032 patches at 1664×928 for 16:9 aspect ratio).

Optimization Guidance

We recommend passing in the original resolution of the image. If the resolution is greater than the maximum supported, we recommend client-side preprocessing. Lower resolution can erode quality but may improve latency and reduce token counts.

Client-Side Preprocessing

You can resize images before sending them to reduce token usage and costs: When to Resize:
  • Below minimum: If your images are smaller than 256 patches, resize them yourself to avoid automatic upscaling.
  • Above maximum: If your images exceed 6,144 patches, resize them yourself to maintain control over quality.
Recommendations:
  1. Resize to multiples of 32: When resizing, aim for dimensions divisible by 32 (e.g., 1280×720, 1024×1024, 1920×1088) to avoid additional processing overhead.
  2. Maintain aspect ratio: Preserve original proportions to avoid distortion.
  3. Faster uploads: Pre-resized images reduce bandwidth usage.
For batch processing, consider pre-resizing all images to a consistent resolution to optimize both quality and cost at scale.