# Console and organization management

Organization and project quotas, actual usage, billing profiles, session security, and administrator review.

## Login and organizations [#login-and-organizations]

[Sign in](/login) with your existing account to open the [console](/console). Developer registration is currently closed. [Contact our team](/en/contact) about access. For administrator initialization and delegation, see [Platform administration](/en/docs/admin).

Projects, keys, quotas, and usage belong to the current organization. Switching organizations reloads that organization's data. The server independently verifies membership; changing a URL or project ID cannot grant access to another organization's resources.

Organization roles and platform-administrator roles are managed separately:

| Operation                                                | owner | developer | viewer |
| -------------------------------------------------------- | ----- | --------- | ------ |
| View usage and quotas for your organization and projects | Yes   | Yes       | Yes    |
| Edit organization information and billing profile        | Yes   | No        | No     |
| Change quotas and request quota increases                | Yes   | No        | No     |
| Edit project name and description                        | Yes   | Yes       | No     |
| View and revoke your own other sessions                  | Yes   | Yes       | Yes    |

## Organization and project settings [#organization-and-project-settings]

[Organization settings](/console/organization) lets you edit the organization name and billing contact email. Names have an 80-character limit; email may be empty. The organization ID cannot be changed.

Project settings lets you edit the name and a description of up to 1,000 characters. The project ID remains unchanged. The region is shown as “Default deployment region,” determined by the actual deployment. It cannot be switched on this page and does not imply cross-region redundancy or a data-residency commitment.

The organization's billing contact email is part of its profile. The billing page can use it as an initial value on first read. Once a separate billing profile is saved, its email is maintained independently. There is currently no billing-email service.

## Organization and project quotas [#organization-and-project-quotas]

[Organization quotas](/console/limits) shows this month's actual character usage, the current per-minute request allowance, and request history. Project quotas show the corresponding project statistics. Every real inference request is subject to both organization and project quotas.

- Requests per minute are enforced over a rolling 60-second window. Requests that were sent but failed upstream still consume this allowance.
- Monthly character quotas count input characters from successful requests in the UTC calendar month. In-flight requests reserve quota to prevent concurrent overuse.
- Monthly usage records contain successful usage only. In-flight reservations are not shown as completed consumption.
- Quota changes cannot exceed deployment limits or use zero, negative, or fractional values.
- When quota is insufficient, the server returns `429`. Wait for the window to reset, or ask the organization owner to adjust the quota.

A quota-increase request may exceed the currently configurable maximum. Only one request can be pending per organization or project scope; a duplicate returns `409`. Submission does not immediately change the quota.

Platform administrators approve or reject requests in [Quota review](/admin/limits) and provide a review note. Approval immediately updates the relevant scope. It remains subject to deployment limits: administrators cannot bypass capacity limits through the website. Deployment operators must adjust configuration before additional capacity can be granted. Processed requests cannot be reviewed again.

Deployment limits use these positive-integer environment variables:

| Variable                               |   Default | Meaning                                  |
| -------------------------------------- | --------: | ---------------------------------------- |
| `ELEJO_ORG_RPM_CAP`                    |        60 | Organization requests-per-minute maximum |
| `ELEJO_ORG_MONTHLY_CHARACTERS_CAP`     | 1,000,000 | Organization monthly-character maximum   |
| `ELEJO_PROJECT_RPM_CAP`                |        30 | Project requests-per-minute maximum      |
| `ELEJO_PROJECT_MONTHLY_CHARACTERS_CAP` |   500,000 | Project monthly-character maximum        |

These are deployment configuration limits, not purchased plans, account balances, or payment commitments. The safety ceiling is 1,000,000 requests per minute and 1,000,000,000,000 characters per month.

## Usage analytics [#usage-analytics]

[Usage analytics](/console/usage) covers the last 7, 30, or 90 days and can be filtered by organization or project. It includes request counts, input characters from successful calls, success rate, failed requests, daily trends, and product breakdowns.

Data comes from actual usage records written by the server. HTTP 2xx responses count as successes; other statuses count as failures. Failed requests have zero character usage. Speech recognition records request count but currently has no audio-duration or audio-character billing; its character usage is zero. When the selected scope has no records, the page shows real zero values and empty states, with “—” for success rate.

Charts aggregate by UTC date and fill empty dates with zeros. Expand “View daily details” to read the table. The recent-requests table displays at most 100 records; summary cards report the full total. Analytics cover only integrated requests recorded by the platform, not unreported offline SDK usage on devices.

## Billing profiles and payment scope [#billing-profiles-and-payment-scope]

The [billing page](/console/billing) allows organization owners to save a legal name, billing email, address, and tax identifier.

Billing data is read through a server-side adapter. When unconfigured, it returns `configured: false`, `available: false`, `balance: null`, and an empty invoice list. When configured but unreadable, it returns `configured: true`, `available: false`. `available: true` means data was successfully read; `billingEnabled` indicates whether billing is enabled for that organization. Neither is equivalent to merely being configured.

Deployment administrators set `BILLING_UPSTREAM_URL` and `BILLING_UPSTREAM_TOKEN`. The platform sends `POST { "workspaceId": "organization UUID" }` with a Bearer token to a trusted HTTPS endpoint. This POST only reads billing data; it does not create a transaction. Example upstream response, with illustrative values only:

```json
{
  "workspaceId": "11111111-1111-4111-8111-111111111111",
  "billingEnabled": true,
  "balanceMinor": 1250,
  "currency": "USD",
  "invoices": [
    {
      "id": "invoice-example",
      "number": "INV-EXAMPLE",
      "status": "paid",
      "amountMinor": 500,
      "currency": "USD",
      "issuedAt": "2026-10-01T00:00:00.000Z"
    }
  ]
}
```

The returned organization must match the requested organization, and invoice IDs must be unique. The upstream sends amounts as integer minor units; the platform converts `balance` / `amount` to major currency units. The example represents a USD 12.50 balance and a USD 5.00 invoice. Supported currencies are USD, CNY, and EUR. Invoice statuses are `paid`, `open`, and `void`.

Adapter credentials are used only on the server; internal URLs and tokens are not returned to the browser. Queries time out after 5 seconds, reject redirects, and accept up to 128 KiB and 100 invoices. Results are cached by organization for 30 seconds. Invalid or cross-organization responses are shown as unavailable, without fabricated fallback balances.

Saving a billing profile only updates the platform database; it does not initiate a transaction. Top-ups, automatic charging, invoice issuance, callback-signature verification, payment idempotency, and automatic reconciliation are not implemented. The page displays real billing records while payment buttons remain disabled.

## Account security [#account-security]

The [security page](/console/security) lists the current account's active login sessions, including the current-device marker, creation and last-recorded times, expiry, and masked IP addresses. Device labels come from the request's browser information; they are not hardware attestation.

You can revoke only your own other sessions. End the current session by signing out. Revoking another user's session is denied. Session revocation does not affect API keys; revoke the relevant key in Key management to stop its calls. Repeating revocation for a session that no longer exists returns `404`, which the page displays as a server error.

Two-factor status reflects the account's actual configuration and is not automatically enabled. Authenticator setup is complete only after password confirmation, saving recovery codes, and verifying a code. Recovery codes are sensitive credentials and must be stored securely. Confirm activation using the refreshed account status.

Production deployment still requires HTTPS, alerts, backup and recovery, key rotation, and access-control acceptance checks. The security page does not imply third-party compliance certification. Confirm actual data-processing terms and deployment regions separately.

## API conventions [#api-conventions]

These endpoints use the current login session. The console specifies an organization using `x-workspace-id`, and the server revalidates access. Requests are JSON. Same-origin writes are protected by origin validation, and responses include `Cache-Control: no-store`.

| Method       | Path                                                    | Purpose                                                 |
| ------------ | ------------------------------------------------------- | ------------------------------------------------------- |
| `GET`        | `/api/platform/console/overview`                        | Quotas, billing state, endpoints, and security summary  |
| `GET`        | `/api/platform/console/limits?projectId=...`            | Quotas, deployment limits, monthly usage, and requests  |
| `POST`       | `/api/platform/console/limits`                          | Update organization or project quotas                   |
| `POST`       | `/api/platform/console/limits/request`                  | Submit a quota request                                  |
| `GET / POST` | `/api/platform/console/organization`                    | Read or update the organization profile                 |
| `GET`        | `/api/platform/console/projects/settings?projectId=...` | Project details and deployment region                   |
| `POST`       | `/api/platform/console/projects/update`                 | Update project name and description                     |
| `GET`        | `/api/platform/console/usage?days=30&projectId=...`     | Actual usage for the selected scope                     |
| `GET`        | `/api/platform/console/billing`                         | Billing profile and payment integration state           |
| `POST`       | `/api/platform/console/billing/profile`                 | Update the billing profile                              |
| `GET`        | `/api/platform/console/security`                        | Current account sessions and two-factor status          |
| `POST`       | `/api/platform/console/security/revoke-session`         | Revoke one of your own other sessions                   |
| `GET`        | `/api/platform/console/admin/limit-requests`            | Administrators: view the most recent 200 quota requests |
| `POST`       | `/api/platform/console/admin/limit-requests/review`     | Administrators: review a request                        |

Example quota update:

```json
{
  "scope": "project",
  "projectId": "your-project-id",
  "requestsPerMinute": 20,
  "monthlyCharacters": 200000
}
```

For organization quotas, use `scope: "organization"` and omit `projectId`. Quota requests add `reason` to the same structure. Review requests use `{ "id": "request-id", "decision": "approved", "reason": "Review note" }`; `decision` may also be `rejected`.

The API rejects unauthorized access, unknown fields, invalid projects or integers, overlong input, and duplicate reviews. Error statuses include `400` for invalid input, `403` for permission or deployment-limit violations, `404` for missing or inaccessible resources, `409` for state conflicts, and `429` for quotas or rate limits. After an error, pages retain an actionable retry path and do not report failures as successes.
