Feature Request: Allow for setting max token output - anthropic-beta: output-128k-2025-02-19
I had this conversation with claude-code:
since you are claude and are currently running inside an app called
claude-code that written by anthropic are you able to prepend a header to
allow for longer responses like this
````
curl https://api.anthropic.com/v1/messages \
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01" \
--header "anthropic-beta: output-128k-2025-02-19" \
--header "content-type: application/json" \
--data \
'{
"model": "claude-3-7-sonnet-20250219",
"max_tokens": 128000,
"thinking": {
"type": "enabled",
"budget_tokens": 32000
},
"messages": [
{
"role": "user",
"content": "Generate a comprehensive analysis of..."
}
]
}'
can you enable this programmatically when I need a long output in some cases
⏺ I don't have the ability to modify my API headers or change my output
limits. I'm running within the Claude Code CLI application with fixed
parameters and can't programmatically enable longer responses.
If you need longer responses, you would need to use the Anthropic API
directly or other interfaces that support the output-128k beta feature.
what is the current output length you are restricted too
⏺ I'm restricted to relatively short responses in this interface, but I
don't have precise information about the exact token limit. The Claude
Code CLI is designed for concise command-line interactions.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗