ToAPIsToAPIs
Account

Get account profile

Read your account profile

GET
/api/v1/account

Note for users in mainland China: Please use https://api.toapis.cn as the API endpoint (Base URL). Replace https://api.toapis.com with https://api.toapis.cn in the examples in this document.

See Access for authentication, pagination, and errors.

Behavior

Returns the current account's basic profile, useful for confirming which account the token belongs to. The response contains only six fields: id, display_name, created_at, region, locale, and account_type.

account_type is normal (main account) or sub (sub-account). Unverifiable historical time, region, or locale values return null. No email, username, or credentials are returned.

Authentication

Authorizationstringheaderrequired

Use Bearer YOUR_SYSTEM_ACCESS_TOKEN. Model API keys are not accepted. X-User-Id is not required.

Request parameters

This endpoint accepts no path or query parameters and requires no request body.

Request examples

requestExample

curl --request GET \
  --url 'https://api.toapis.com/api/v1/account' \
  --header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'
import requests

response = requests.get(
    "https://api.toapis.com/api/v1/account",
    headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://api.toapis.com/api/v1/account");

const response = await fetch(url, {
  headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
  signal: AbortSignal.timeout(30_000),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());

Response fields

Examples use fictional data and assume credits_per_usd="100". Use the conversion rate returned by the API.

codeinteger

Numeric result code; 0 means success.

messagestring

Response message; empty on success. Error messages are localized.

dataobject

Result object for this query.

data.idstring

ID of the authenticated account. Returned as a decimal ID string.

data.display_namestring

Account display name.

data.created_atstring | null

Creation time. RFC 3339 timestamp with a timezone. null when unknown or inapplicable.

data.regionstring | null

Account region; null when unknown in historical data.

data.localestring | null

Account language preference, not necessarily the language negotiated for this response. null when unknown or inapplicable.

data.account_typestring

Account type: normal for a main account, sub for a subaccount.

Response examples

responseExample

{
  "code": 0,
  "message": "",
  "data": {
    "id": "7",
    "display_name": "Example User",
    "created_at": "2026-10-01T00:00:00Z",
    "region": "global",
    "locale": "zh",
    "account_type": "normal"
  }
}