Translate API

GET /usage

Get current month usage for a workspace the operator token can access.

GET /usage

Returns current-month character, request, and language-detection usage for a workspace the operator token can access.

Request

GET /api/v1/usage?workspace=my-workspace
Authorization: Bearer opt_your-token

Query Parameters

FieldTypeRequiredDescription
workspacestringNoWorkspace slug or id. Required when the token can access multiple workspaces.
project_slugstringNoProject slug used to infer the workspace.
project_idstringNoDeprecated: use project_slug. Project ID used to infer the workspace.

Response (200)

{
  "monthlyCharacters": 12450,
  "monthlyRequests": 342,
  "monthlyDetections": 1280,
  "workspace": {
    "id": "org_abc123",
    "slug": "my-workspace",
    "name": "My Workspace"
  }
}

Response Fields

FieldTypeDescription
monthlyCharactersnumberCharacters translated this month
monthlyRequestsnumberTranslation requests this month
monthlyDetectionsnumberTexts language-detected this month (a batch counts each text); not quota-metered
workspaceobjectResolved workspace (id, slug, name)

Example

curl "https://your-domain.com/api/v1/usage?workspace=my-workspace" \
  -H "Authorization: Bearer opt_your-token"

Notes

  • Usage resets at the start of each month
  • Quotas are workspace-wide; every operator token in a workspace shares the same quota
  • Any workspace member can read usage with an operator token
  • Check usage programmatically to avoid hitting quota limits

On this page