Skip to content

Insufficient credit error has the same error code as bad requests #618

Description

@dandv

When calling the Messages API with a valid request but insufficient credit, the API returns status code 400 and the message

Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.

Would it be more appropriate to return 402 Payment required, and reserve 400 for actually malformed requests?

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssues pertaining to the underlying Anthropic API (not the SDK)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions