Retrieve organization spend limit
client.admin.organization.spendLimit.retrieve(RequestOptionsoptions?): OrganizationSpendLimit { currency, enforcement, interval, 2 more }
GET/organization/spend_limit
Retrieve organization spend limit
import OpenAI from 'openai';
const client = new OpenAI({
adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});
const organizationSpendLimit = await client.admin.organization.spendLimit.retrieve();
console.log(organizationSpendLimit.currency);{
"object": "organization.spend_limit",
"threshold_amount": 10000,
"currency": "USD",
"interval": "month",
"enforcement": {
"status": "enforcing"
}
}
Returns Examples
{
"object": "organization.spend_limit",
"threshold_amount": 10000,
"currency": "USD",
"interval": "month",
"enforcement": {
"status": "enforcing"
}
}