Buy API credits
manga.buy_creditsReturn the Console billing URL so a human can fund apiPackCredits. Generate-scoped keys cannot create Checkout sessions. Call this after 402 insufficient_credits.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "manga.buy_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quality | No | Optional quality you plan to generate next. Included in the response as next_generation_credits so the human knows how many credits to buy. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Machine error code such as invalid_request, insufficient_credits, or quality_forbidden. | |
| buy_url | Yes | Absolute Console billing URL. Always https://mangii.ai/console/billing. | |
| message | No | Human-readable error. Never includes stack traces or internal paths. | |
| credit_costs | Yes | Credits charged per successful panel. | |
| next_generation_credits | No | Credits needed for the requested quality, or null if quality was omitted. |