---
title: "Anthropic Count Tokens"
method: POST
path: "/v1/messages/count_tokens"
---

# Anthropic Count Tokens

`POST /v1/messages/count_tokens`

## Request

- Base URL: `https://api.nkq.vn` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nkq.vn/v1/messages/count_tokens`
- Auth: none declared
- TypeScript: <https://skmtc.dev/nkq/apis/antigravity-ai-proxy/docs/v1/messages/count_tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Stub for Anthropic token-count endpoint.

Claude Code / Claude CLI call this before a real request to pre-size
budgets. Upstream (MiniMax) doesn't expose an equivalent, so we return
a conservative heuristic: ~4 chars per token across serialized body.
This avoids 404 spam in admin dashboard and lets clients keep working.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/nkq/apis/antigravity-ai-proxy.md) - [All operations](https://skmtc.dev/nkq/apis/antigravity-ai-proxy/llms.txt) - [OpenAPI document](https://skmtc.dev/nkq/apis/antigravity-ai-proxy/revisions/58a38b92d2d5?raw)
