402Organization's balance reached its spend cut-off
Moves to the next key: out of credit
Documented by Together AI: docs.together.ai
The answers Together AI 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.
402Organization's balance reached its spend cut-offMoves to the next key: out of credit
Documented by Together AI: docs.together.ai
403Account cannot access the requested model or featureStays with your SDK
An access restriction, account blocks included. Never routed around.
Documented by Together AI: docs.together.ai
Give the pool a second key that bills another organization you are authorized to use. When Together AI 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, TOGETHER } from "keyover"
const pool = createKeyPool({
provider: TOGETHER,
keys: {
primary: process.env.TOGETHER_API_KEY,
spare: process.env.TOGETHER_API_KEY_SPARE,
},
})
const client = new OpenAI({ ...pool.clientOptions, baseURL: "https://api.together.xyz/v1" })See it fail over in the playground, or read the README.