AI Model API Cost Comparison Guide Cost Structure Basics Input tokens: Text sent to the API Output tokens: Text received from the API API call: Each request to the service 1M tokens ≈ 750,000 words Provider Cost Rankings (Lowest to Highest) Most Affordable Models (Under $1 per 1M tokens input) Google Gemini-1.5-flash: $0.07/1M input tokens OpenAI GPT-4-mini: $0.15/1M input tokens Anthropic Claude-3-haiku: $0.25/1M input tokens OpenAI GPT-3.5-turbo: $0.50/1M input tokens Mid-Range Models ($1-5 per 1M tokens input) OpenAI GPT-4o: $5.00/1M input tokens Anthropic Claude-3.5-sonnet: $3.00/1M input tokens Google Gemini-1.5-pro: $3.50/1M input tokens Mistral-large: $3.00/1M input tokens Premium Models ($10+ per 1M tokens input) OpenAI GPT-4-turbo: $10.00/1M input tokens OpenAI GPT-4: $30.00/1M input tokens Cost Per API Call Comparison Budget-Friendly Options (Under $0.001 per call) Google Gemini-1.5-flash: $0.0002 OpenAI GPT-4o-mini: $0.0003 Anthropic Claude-3-haiku: $0.0006 OpenAI GPT-3.5-turbo: $0.0008 Standard Options ($0.001-0.01 per call) Google Gemini-1.5-pro: $0.0056 Mistral-large: $0.0048 Anthropic Claude-3.5-sonnet: $0.0078 OpenAI GPT-4o: $0.0080 Premium Options ($0.01+ per call) OpenAI GPT-4-turbo: $0.0160 OpenAI GPT-4: $0.0330 Cost Optimization Tips Input Cost Reduction Use shorter prompts Remove unnecessary context Batch related requests Output Cost Management Set maximum token limits Use specific instructions Request concise responses API Call Efficiency Combine related queries Cache common responses Use batch processing Best Value Choices By Use Case High-Volume, Simple Tasks Google Gemini-1.5-flash OpenAI GPT-4o-mini Claude-3-haiku Balance of Cost and Capability Claude-3.5-sonnet Mistral-large Gemini-1.5-pro Complex Tasks Requiring Advanced Capabilities GPT-4-turbo GPT-4 (when accuracy is critical) Cost Calculation Formula Total Cost = (Input Tokens × Input Price) + (Output Tokens × Output Price)