To estimate the cost of sending 400,000 book cover images to a vision-enabled LLM (like GPT-4o, Gemini, or Claude 3 with vision) for extracting information (title, author, etc.), we need to consider:
- Which model/service you use (OpenAI, Google, Anthropic, etc.)
- How you send the images (API, batch, etc.)
- Image size/resolution (affects token count and cost)
- Pricing model (per image, per token, per character, etc.)
Let's break down the cost for the most common options as of June 2024:
1. OpenAI GPT-4o Vision API
Pricing (as of June 2024):
- Image input: $5.00 per 1,000 images (for 1080px max dimension)
- Text output: $5.00 per 1M output tokens (usually negligible for short outputs)
Source: OpenAI Pricing
Calculation:
- 400,000 images / 1,000 = 400 units
- 400 units × 5.00=2,000
Text output cost:
Assume each response is 50 tokens (title, author, etc.):
- 400,000 × 50 = 20,000,000 tokens
- 20M tokens / 1M = 20 units × 5.00=100
Total estimated cost:
2,000(images)+100 (text) = $2,100
2. Google Gemini Vision API
- Pricing is similar, but may vary. As of June 2024, Gemini 1.5 Pro is $3.50 per 1,000 images (for 1080px).
- 400,000 / 1,000 = 400 × 3.50=∗∗1,400** (image input)
- Text output is usually negligible for short outputs.
3. Anthropic Claude 3 Vision
- Pricing is per token, including image tokens. For 400,000 images, cost will depend on image size and how many tokens each image consumes.
- For simple images (like book covers), expect ~2,000 tokens per image (conservative estimate).
- 400,000 × 2,000 = 800,000,000 tokens
- Claude 3 Opus: 15per1Minputtokens→800×15 = $12,000
- Claude 3 Sonnet: 3 =
Summary Table
| Model/API | Image Cost (400k) | Text Output | Total |
|---|
| OpenAI GPT-4o | $2,000 | $100 | $2,100 |
| Google Gemini | $1,400 | Negligible | $1,400 |
| Claude 3 Sonnet | $2,400 | Included | $2,400 |
| Claude 3 Opus | $12,000 | Included | $12,000 |
Other Considerations
- Image size: If your images are much smaller than 1080px, costs may be lower.
- Batching: Some APIs allow batch processing, which may reduce costs.
- Discounts: At this scale, you may be able to negotiate volume discounts with the provider.
- Preprocessing: If you can crop or compress images, you may save on costs.
Conclusion
- OpenAI GPT-4o: ~$2,100
- Google Gemini: ~$1,400
- Claude 3 Sonnet: ~$2,400
Google Gemini is currently the cheapest for this use case.
Note: Prices may change, and you should check the latest pricing and terms for your specific use case and image sizes.
If you want a more precise estimate, please specify:
- The average image resolution (in pixels)
- The model/provider you plan to use
- Whether you have any special requirements (e.g., batch processing, speed, etc.)