Anthropic has provided API reference documentation for its Sessions endpoints, detailing how users can interact with Claude models within a session context. This documentation covers various aspects of session management, from configuring advisor models to setting financial controls.
Key Points
- A platform advisor roster entry allows a session's primary thread to consult a Claude model mid-turn.
- The
anthropic.advisorroster name is reserved for this advisor entry. - A specific Claude model ID must be permitted as an advisor for the agent's model.
- Users can specify a hard spend ceiling,
max_list_cost, which stops new model requests once the tracked list cost is reached. - Monetary amounts for
max_list_costare specified in minor units of the currency, as an integer decimal string. - USD is the only currency currently supported for cost tracking.
- Prompt-cache creation token usage is broken down by cache lifetime, including 1-hour and 5-minute ephemeral cache entries.
Context
According to Anthropic's documentation, the Sessions API allows for detailed control over how Claude models operate within a conversational or task-oriented session. This includes the ability to integrate secondary Claude models as advisors, which can be consulted during ongoing interactions. The documentation also highlights mechanisms for managing the financial aspects of API usage, such as setting expenditure limits and tracking token consumption for caching.
Why It Matters
Builders can use these API specifications to design more sophisticated and cost-controlled applications leveraging Claude models. The ability to configure advisor models enables complex multi-agent interactions, while cost ceilings provide a critical tool for managing operational expenses and preventing unexpected overages.
What To Do
- Review the
sessions/threads/advisorspecification to understand how to permit advisor models. - Note the
max_list_costparameter for implementing hard spend ceilings in session configurations. - Observe the format for specifying monetary amounts in minor units and the current USD-only currency support.
- Examine the prompt-cache creation token usage details for 1-hour and 5-minute ephemeral cache entries to optimize caching strategies.
