0votes
2 answersBadRequestError: 400 — Why is max_tokens required?
A Messages API request is rejected even though the model and messages look valid.

Find answers to your programming questions.
A Messages API request is rejected even though the model and messages look valid.
The client cannot connect and no HTTP error body is returned.
Parallel workers begin failing with ratelimiterror.
Anthropic() is created successfully, but the first call returns an invalid-key error.
The API call succeeds, but writing emoji or non-Latin text to my terminal crashes.
A tutorial uses openai.ChatCompletion.create, but the installed v1+ package rejects it.
The API says the input plus requested output exceeds the model’s context window.
The API rejects my request, or the response indicates a refusal.