๐Ÿ”ข AI Token Efficiency: JSON vs XML vs YAML vs Markdown - Which Format Saves You More Money?

๐Ÿ“šLoad Example Data

๐Ÿ“„JSON Format

๐Ÿท๏ธXML Format

๐Ÿ“YAML Format

๐Ÿ“„Markdown Format

โณ Initializing js-tiktoken library...

๐Ÿ”‘API Keys

๐Ÿค–Model Selection

โš ๏ธ Note about Model Selection:
In testing, Google Gemini and Anthropic Claude APIs return the same token counts regardless of which model is selected. The token counting appears to use a shared tokenizer across models within each provider. Model selection may still be useful for future API updates.

๐Ÿ” Token Breakdown by Format