Claude API adds model capability fields to discovery endpoint, reveals token and feature support
Models API Enhancement
Anthropic has expanded the Models API with machine-readable capability fields to help developers discover model specifications at runtime.
What's New
The GET /v1/models and GET /v1/models/{model_id} endpoints now return:
max_input_tokens: Maximum input context window for the modelmax_tokens: Maximum output token lengthcapabilitiesobject: Structured data on supported features
Developer Impact
Instead of hardcoding model specifications, developers can now query the API to automatically discover:
- Which models support extended thinking
- Context window sizes for long-horizon tasks
- Token limits for request planning
- Feature availability across model versions
This simplifies multi-model strategies and makes applications more resilient to future model updates. Applications can adapt dynamically as Anthropic releases new models without requiring code changes.