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:
- The API key in
Authorization: Bearer $PRIME_API_KEY
- 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
{
"error": {
"message": "Insufficient balance (including overdraft). Please add funds to continue.",
"type": "insufficient_quota",
"code": "insufficient_funds"
}
}
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
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PRIME_API_KEY"],
base_url="https://api.pinference.ai/api/v1",
default_headers={
"X-Prime-Team-ID": "your-team-id-here",
},
)
response = client.chat.completions.create(
model="openai/gpt-5.4-mini",
messages=[{"role": "user", "content": "Hello"}],
)
Related pages