Switch overage on or off, and set its monthly cap
const url = 'https://beta-api.plune.ai/v1/settings/ai/credits/overage';const options = { method: 'PUT', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' }, body: '{"enabled":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Examples
Off
{ "enabled": false}On, up to three packs a month
{ "enabled": true, "capUsdCents": 24000}Responses
Section titled “ Responses ”The setting as saved
object
#1427 (D12–D14): overage — when a Plune AI draft finds no credit, a pack is bought automatically within the owner’s monthly cap.
object
US cents a calendar month (UTC), at least one pack ($80). null until set.
What overage bought this calendar month (paid, or still being bought), US cents.
Who an overage pack is bought through — the plan’s paid subscription’s provider; null: none, so overage cannot buy.
Example
{ "overage": { "provider": "paddle" }}Not JSON, a cap under 8000 or not whole, or switched on with no cap
object
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.
object
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)
object
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.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
This server keeps no credits ledger
object
Example
{ "error": "AI platform not configured — contact your operator"}