Agent mode (multi-pass) switch for a card
const url = 'https://api.harperharbor.com/open/v1/player/agent-mode?roleId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&contextLevel=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.harperharbor.com/open/v1/player/agent-mode?roleId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&contextLevel=1' \ --header 'Authorization: Bearer <token>'Reads the caller’s Agent preference and a read-only estimate for the proposed model/context/thinking/response length. costEstimate is preferred to the legacy costWarning boolean; no preference is saved by GET. Only a high estimate at least 1000 credits requires confirmation; the caller can still enable Agent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Card id.
Model value the client is about to select; modelSupported/costWarning are computed for it instead of the saved model.
Selected context tier; 100 is the legacy alias for 5.
Selected thinking option from the model catalog.
Supported response length target; omitted uses the current save preference.
Responses
Section titled “Responses”Agent-mode state.
object
Per-card switch saved by the player.
Whether the server currently executes agent mode at all.
Whether the evaluated model (query model or the saved one) supports agent mode.
Compatibility decision: true for a high estimate (at least 1000 credits) or unknown; false for a known lower estimate. Does not determine Agent support.
Selected Agent turn estimate at current rates. Observed high is a matched 14-day p90; estimated high is a conservative fallback, not a percentile or maximum. Unknown amounts are null. Actual usage, retries, continuation and separate memory work can cost more.
object
Credits, not a charge limit. Unknown amounts are null.
Credits, not a charge limit. Unknown amounts are null.
Credits, not a charge limit. Unknown amounts are null.
Numeric normal fixed-price rule used only to invalidate an estimate when pricing changes; Agent itself is priced by token usage.
Which cost estimate applies to the next Agent turn: first until a completed Agent turn has been recorded for cost estimation on this runtime and conversation branch; steady afterwards. A display hint only, not a guarantee about setup state. Omitted when unknown. Does not change selectionKey.
Example
{ "costEstimate": { "status": "observed", "source": "observed", "presentation": "none", "costPhase": "first" }}invalid_param — missing roleId.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}unauthorized.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}generic_error.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}