Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions api-reference/count-tokens.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 'Count Tokens'
description: 'Estimate token count for a set of messages without making an LLM call'
openapi: 'POST /v1/count_tokens'
---

Estimates the number of input tokens for a set of messages without sending the request to an LLM provider. Useful for pre-flight cost estimation, rate-limit planning, and prompt optimization.
Loading