The answers OpenAI gives when an organization cannot pay for a request, and the ones that look similar but are not about money. For each: the status, the body, and what keyover does with it.
Documented by OpenAI: developers.openai.com. The body shows the fields the source establishes.
429You exceeded your current quota, please check your plan and billing details
Moves to the next key: out of credit
The long-standing form. The reference now names the cause in error.code and keeps insufficient_quota as the broader error.type.
{ "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" }}
Reported in the field: stackoverflow.com. The body shows the fields the source establishes.
429Organization reached the monthly spend limit it set
Give the pool a second key that bills another organization you are authorized to use. When OpenAI refuses the first for one of the rejections above, the same request is sent again on the second, inside the same call. Your code gets a normal response, and an event tells you which organization needs attention.
import OpenAI from "openai"import { createKeyPool, OPENAI } from "keyover"const pool = createKeyPool({ provider: OPENAI, keys: { primary: process.env.OPENAI_API_KEY, spare: process.env.OPENAI_API_KEY_SPARE, },})const openai = new OpenAI(pool.clientOptions)const response = await openai.responses.create({ model: "gpt-6-luna", input: "Say hello." })console.log(response.output_text)