plan_required
The message text is shown in the example below.
| HTTP status | 403 |
type | permission_error |
| Retry? | No, not unchanged |
| Status | In the public catalog (error-envelope.ts) |
| Extra fields | reason, upgrade_url |
When it happens
The organization is on the Free plan (reason: "free_plan") or its billing is inactive (reason: "billing_inactive").
Example
{
"error": {
"type": "permission_error",
"code": "plan_required",
"message": "API access requires a paid plan.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d",
"reason": "free_plan",
"upgrade_url": "https://syntic.ai/pricing"
}
}How to fix it
- Upgrade the plan, or fix the payment method if
reasonisbilling_inactive.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 403 and err.get("code") == "plan_required":
log.warning("%s (%s)", err["message"], err["request_id"]) # fix the request; do not retry unchangedRelated
Was this page helpful?