Processing 100 lines of code (~1,120 tokens) with Text Embedding 3 (Large) costs $0.000146 for codebase ingestion and $0.000146 for an AI-powered code review and refactoring pass.
Feed 100 lines of code into the prompt context for repository search, Q&A, or architecture planning.
Ingest 100 lines of code and generate audit findings, unit test recommendations, and refactor diffs.
Text Embedding 3 (Large) writes 100 lines of code from scratch based on product specifications.
| Model | Provider | Code Ingestion | Cached Ingestion | Code Review Cost | Context Limit |
|---|---|---|---|---|---|
| Text Embedding 3 (Large) (Current) | openai | $0.000146 | $0.000036 | $0.000146 | 8,191 |
| Text Embedding 3 (Small) | openai | $0.000022 | $0.0000056 | $0.000022 | 8,191 |
| Text Embedding 004 | $0.000022 | $0.0000056 | $0.000022 | 8,192 |
On average, code yields approximately 11.2 tokens per line in Text Embedding 3 (Large) (cl100k_base tokenizer). Indentation, brackets, camelCase variable names, and comments slightly increase token density compared to plain English text. 100 lines of code produces approximately 1,120 tokens.
Sending 100 lines of code as context and generating a thorough code review with recommendations costs approximately $0.000146. Utilizing prompt caching on repeat turns or static repository definitions drops this to $0.000036.
Text Embedding 3 (Large) has a context window of 8,191 tokens. 100 lines of code consumes 13.67% of its total available context.