Skip to main content

Insufficient funds

Prime Inference returns an insufficient_funds error when the billing account selected for the request cannot pay for the model call. The selected billing account is determined by:
  1. The API key in Authorization: Bearer $PRIME_API_KEY
  2. The optional team header X-Prime-Team-ID
If X-Prime-Team-ID is not included, the request bills your personal balance. If the header is included, the request bills that team’s balance.

Error example

How to fix it

If you want to bill your personal account:
  • Add funds in the Billing Dashboard
  • Make sure the API key belongs to the account with funds
If you want to bill a team:
  • Add funds to the team billing balance
  • Include X-Prime-Team-ID on every direct pinference or OpenAI-compatible API request
  • Confirm the API key owner has access to the team
You can find your team ID with:
Or from the Team Profile page.
PRIME_API_KEY and Prime CLI team config do not select a team balance for direct pinference calls. pinference bills a team only when the request contains X-Prime-Team-ID.

Direct API examples