struct

Anthropic::FallbackCreditTokenParam

Inherits JSON::Serializable < Struct < Value < Object

Object form of fallback_credit_token: the token plus a redemption mode.

Requires anthropic-beta: fallback-credit-2026-07-01. Without that header the field accepts the bare string only. The bare string and the mode-less object are equivalent (both select strict).

  • strict (default / bare-string behavior): a failing redemption is a 400 and the retry is not served.
  • best_effort: the retry is served either way; outcome is reported on usage.fallback_credit.

Constructors

new(token : String, mode : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

mode

"strict" or "best_effort". Nil selects strict (same as bare string).

Source
token
Source