Skip to main content
Identities are entities used to tie metrics within the Orq.ai APIs. They can represent:
  • a User
  • a Team
  • a Project
  • a Client
Identities are created via the AI Studio, AI Gateway, or the API and then used as supplementary data to attribute metrics within any other call of the API. Identities list showing name, source tag, request count, cost in dollars, token count, and error rate columns. For the full set of ways to attach context to a request, including app name, threads, and custom metadata, see Request Metadata.

Creating an identity

Head to the Identities section and choose Create an Identity.The following panel opens:Create identity form with fields for External ID, Display Name, Email, and a Budget toggle set to Monthly $10.

Attaching an identity to a request

Every request can be attributed to a specific user, team, or client. The gateway checks each of the following sources in order and uses the first match found:
Pass an identity object on each Agent response or Deployment invocation to attribute the request to an Identity.
The identityId / identity_id constructor option was removed in SDK v4.10.0. Pass identity on each request instead.
Agents
Deployments

Retrieving an identity via the API

Once an identity is in use, you can fetch its full record at any time using its _id (ULID) or external_id.
The response returns the full identity record:
See the API Reference for the full parameter and response specification.

Listing identities with metrics

Pass include_metrics=true to the list endpoint to include 30-day usage metrics for each identity in the response. This is useful for auditing spend, spotting high error rates, or building identity-level dashboards.
Each identity in the response includes a metrics object with usage data for the last 30 days:
See the API Reference for the full list of query parameters including pagination, search, and tag filtering.

Budget control

Attach a spending limit to an identity to cap cost, token usage, or request rate for a specific customer or tenant. Navigate to Settings > Budgets, click Create, set Scope > Applies to to Identity, then select the target identity by external ID. See Budgets for the full list of configurable limits, reset periods, and alerts.

Identity field reference

Fields accepted on the identity object for any request:

Best practices

  • Consistent IDs: Use predictable identity ID patterns (e.g. user-{userId}, tenant-{orgId}-{userId}) across the application.
  • Essential metadata only: Include only relevant metadata fields to minimize payload size.
  • Tag strategy: Use tags for filtering and segmentation rather than storing detailed data.
  • Privacy compliance: Ensure identity data handling meets applicable privacy requirements.
  • Validation: Validate id format and length before sending requests.

Troubleshooting