Skip to main content
GET
/
account
JavaScript
import ModerationAPI from '@moderation-api/sdk';

const client = new ModerationAPI({
  secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});

const accounts = await client.account.list();

console.log(accounts.id);
{
  "id": "<string>",
  "paid_plan_name": "<string>",
  "text_api_quota": 123,
  "remaining_quota": 123,
  "current_project": {
    "id": "<string>",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Account details retrieved successfully

id
string
required

ID of the account

paid_plan_name
string
required

Name of the paid plan

text_api_quota
number
required

Text API quota

remaining_quota
number
required

Remaining quota

current_project
object