Anthropic API Limits Constants (constants/apiLimits.ts)

collection-claude-code-source-code · original-source-code/src/constants/apiLimits.ts · typescript · Apache-2.0
files, ai, integration, tag:constants, tag:validation, tag:limits

Defines server-side constraints and size limits for the Anthropic API, such as maximum image and PDF sizes. Reuse this to validate request payloads before sending them to the API.

// Source: https://github.com/chauncygu/collection-claude-code-source-code | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Anthropic API Limits
 *
 * These constants define server-side limits enforced by the Anthropic API.
 * Keep this file dependency-free to prevent circular imports.
 *
 * Last verified: 2025-12-22
 * Source: api/api/schemas/messages/blocks/ and api/api/config.py
 *
 * Future: See issue #13240 for dynamic limits fetching from server.
 */

// =============================================================================
// IMAGE LIMITS
// =============================================================================

/**
 * Maximum base64-encoded image size (

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key