GPT-4o / o-series info
Low Detail Images: Fixed cost of 85 tokens regardless of size.
High Detail Images: Cost depends on size.
- Scale to fit in a 2048px x 2048px square, maintaining aspect ratio
- Scale so that the image's shortest side is 768px long
- Count the number of 512px squares needed to cover the image
- Each 512px square costs 170 tokens
- Add 85 tokens to the total
Examples:
- 1024 x 1024 image (high detail): 765 tokens
- 2048 x 4096 image (high detail): 1105 tokens
- Any size image (low detail): 85 tokens
GPT-4.1 Models info
All GPT-4.1 models: Cost based on 32px x 32px patches.
- Calculate 32px x 32px patches needed to cover the image
- Cap at 1536 patches maximum (scaling down if needed)
- For GPT-4.1: 1 token per patch
- For GPT-4.1-mini: 1.62 tokens per patch
- For GPT-4.1-nano: 2.46 tokens per patch
Examples:
- 1024 x 1024 image: 1024 tokens (GPT-4.1)
- 1800 x 2400 image: 1452 tokens (GPT-4.1)
- Large images are scaled down to stay under 1536 token cap