Skip to content

Switch overage on or off, and set its monthly cap

PUT
/v1/settings/ai/credits/overage
curl --request PUT \
--url https://beta-api.plune.ai/v1/settings/ai/credits/overage \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "enabled": false }'

#1427 (D12–D14, frame 04). On, a Plune AI draft that finds no credit starts a pack of 1 000 credits ($80) when what overage bought this calendar month (UTC) plus $80 is within the cap — the exact cap included. Paddle and LiqPay charge the card that pays the plan; Monopay keeps no card, so the owner is mailed the pack’s invoice and the credits arrive once it is paid. The owner is told each time (a letter, and GET …/overage/notice). Switching on needs a cap (capUsdCents, at least 8000: one pack; a cap set before is kept), a paid plan (D14: 409 paid_plan_required) and a plan paid through a provider (409 no_payment_method). Switching off needs nothing. The project owner, from the signed-in session, who owns the plan.

Media type application/json
object
enabled
required
boolean
capUsdCents
integer
>= 8000 <= 8000000
Examples

Off

{
"enabled": false
}

The setting as saved

Media type application/json
object
overage
required

#1427 (D12–D14): overage — when a Plune AI draft finds no credit, a pack is bought automatically within the owner’s monthly cap.

object
enabled
required
boolean
capUsdCents
required

US cents a calendar month (UTC), at least one pack ($80). null until set.

integer
nullable >= 8000
spentUsdCents
required

What overage bought this calendar month (paid, or still being bought), US cents.

integer
provider
required

Who an overage pack is bought through — the plan’s paid subscription’s provider; null: none, so overage cannot buy.

string
nullable
Allowed values: paddle monopay liqpay
Example
{
"overage": {
"provider": "paddle"
}
}

Not JSON, a cap under 8000 or not whole, or switched on with no cap

Media type application/json
object
error
required
string
Example
{
"error": "validation failed — capUsdCents: required to switch overage on (at least 8000, one pack)"
}

No / invalid session

A member asked (project owner only); an API token (session_required); not the plan’s own owner — the account itself, or the company’s owner (owner_only). A reader is refused by the project guard.

Media type application/json
object
error
required
string
Example
{
"error": "only the owner of the plan pays for its Plune AI credits",
"code": "owner_only"
}

paid_plan_required (Free, D14) or no_payment_method (the plan has no paid subscription to charge)

Media type application/json
object
error
required
string
Example
{
"error": "Plune AI credit packs and overage are for paid plans — move to Personal or Team first",
"code": "paid_plan_required"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over

This server keeps no credits ledger

Media type application/json
object
error
required
string
Example
{
"error": "AI platform not configured — contact your operator"
}