Create a credit grant on a subscription
Grants credits to a subscription. Provide either pricing_unit_id for pricing-unit credits or currency_code for currency credits.
Authentication
AuthorizationBearer
API key obtained from the Afternoon dashboard
Path parameters
id
Request
This endpoint expects an object.
name
Display name for the credit grant
amount
Credit amount (positive value). Accepts a number or numeric string.
pricing_unit_code
Pricing unit code (e.g. “gpu_sec”, “token”). Required when granting pricing-unit credits.
currency_code
Currency code (e.g. “usd”). Required when granting currency credits.
expires_at
ISO 8601 expiration date, or null for no expiry
Response
Credit grant created
success
credit_grant
request_id
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error
