credits

Check Credits

Pre-flight check: do we have enough credits for an operation?

Use this before executing expensive operations to give users clear feedback about whether they can proceed.

The 'action' parameter should be one of:

  • mode_1_text (1 credit)
  • mode_1_video (6 credits)
  • mode_2_campaign_text (2 credits)
  • mode_2_campaign_video (8 credits)
  • mode_3_text (4 credits)
  • mode_3_video (15 credits)
  • extra_strategy_session (50 credits)
post/v1/credits/check

Request

  • Base URL: https://api.theagentc.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.theagentc.io/v1/credits/check
  • Auth: HTTP bearer

Request body

actionstring required

The action being performed (e.g., 'mode_1_text', 'mode_3_video')

content_typestring nullable

Optional content type for context

Example request

{
  "action": "mode_1_video",
  "content_type": "video"
}

Response

Successful Response

has_sufficientboolean required

Whether workspace has enough credits

current_balanceinteger required

Current credit balance

requiredinteger required

Credits required for operation

warning_levelstring required

Current balance warning

Example response

{
  "current_balance": 200,
  "has_sufficient": true,
  "required": 6,
  "warning_level": "normal"
}

Changes

No recorded changes to this operation across all 1 revision of this API.