Skip to content

Get Remaining Credits

Request

Get the current remaining credits for a tenant.

Overview

This endpoint retrieves the current remaining credits available for the authenticated tenant.

Response Fields

  • success: Boolean indicating request success
  • tenant_id: The tenant ID
  • remaining_credits: Current remaining credits for the tenant
  • total_credits: Total credits for the tenant

Authentication

This endpoint requires authentication via Bearer token. The tenant ID is automatically extracted from the authenticated user's token.

Example Response

{
  "success": true,
  "tenant_id": 123,
  "remaining_credits": 4750.25
}
Security
BearerAuth
curl -i -X GET \
  https://api-gateway.agenthq.withlantern.com/v1/credits/remaining \
  -H 'Authorization: Bearer <YOUR_ApiToken_HERE>'

Responses

Success Response

Bodyapplication/json
successboolean(Success)required

Boolean indicating request success

tenant_idinteger(Tenant Id)required

Tenant ID

remaining_creditsnumber(Remaining Credits)required

Remaining credits for the tenant

total_creditsnumber(Total Credits)required

Total credits for the tenant

Response
{ "success": true, "tenant_id": 123, "remaining_credits": 4750.25 }