1. API Pricing Models Compared
GPT-4o is priced at $2.50 per million input tokens and $10.00 per million output tokens. Claude 3.5 Sonnet is priced at $3.00 per million input tokens and $15.00 per million output tokens. On pricing alone, OpenAI starts with a 16% input and 33% output cost advantage.
2. Tokenizer Compression Efficiency (o200k vs. Claude Tiktoken)
GPT-4o utilizes the `o200k_base` tokenizer with a 200k vocabulary, compressing English and non-English text highly. Claude uses a tokenizer with a smaller vocabulary. In tests, GPT-4o compresses standard text 10-15% better than Claude, requiring fewer tokens to send the same prompt volume.
3. Prompt Caching Differences
Both providers offer prompt caching. Anthropic Claude charges a 25% premium to write the cache, but offers a 90% discount on cache-reads. OpenAI GPT-4o offers a flat 50% discount on cached input tokens. For long-running sessions, Claude's cache-read discount can overcome its higher base price.