See the organization's plan and what it uses
const url = 'https://forge.example.com/api/billing';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://forge.example.com/api/billing \ --header 'Authorization: Bearer <token>'kind is trial, plan or none (no plan was set, and nothing is counted against the organization). meters are reviewers, creators (or people, when the plan counts the two as one pool) and models: used, limit (null for no limit), percent, and state: none, ok, near (at or past the notice’s share, 80 percent unless the instance sets another) or over. waiting are invitations not used yet, which count as the person they invite. A reviewer holds Assessor or Approver and is counted once whatever else they hold; a creator is anyone else who holds Author, Central, Curator or Administrator; everyone else is a reader, free and not limited. Every model counts once it exists, however it was made; revisions do not. With a plan, ai is the month’s AI allowance on the instance’s own account, in millionths of a dollar of what the calls cost: monthLimit, monthSpent, dayLimit (0 for no daily cap), daySpent, and stop, which is month or day while the assistant is stopped and null while it runs. Its meter, ai, has hard true: it is the one limit that stops something, the assistant, until the next month or day (UTC) or until the organization connects an AI account of its own. notices say what is near or past a limit; each one about people or models says that nothing is blocked (blocks false). offer is what can be bought, with prices only when the instance’s price table is approved. enabled is false on an instance that sells no plans. For administrators.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
object
object
object
object
object
object
object
object
object
object
Example
{ "meters": [ { "waiting": 0 } ]}default
Section titled “default”A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}