Skip to main content
This documentation is for the federal deployments of Devin. Back to Devin Docs
Federal enterprise administrators can programmatically query ACU consumption and manage groups, model availability, and ACU limits using a service-key API. A Python SDK wraps every endpoint described in this section. The group management and ACU cap endpoints are only available on self-hosted, multi-tenant federal deployments. They are not exposed on commercial deployments. The analytics endpoints (/Analytics, /UserPageAnalytics, and /CascadeAnalytics) also check the deployment’s analytics-access tier; a team without analytics access receives permission_denied.

Base URL

All requests are JSON POST requests to your deployment’s API server:
Replace <your-server> with the API domain of your federal deployment.

Authentication

Every request authenticates with a service key included in the request body:
To create a service key, log in to the federal portal as a team administrator and go to Settings → Service Keys, then create a key with the permissions required by the endpoints you plan to call.
Keep service keys secure. Never expose them in client-side code or commit them to repositories.

Required permissions

Team-scoped and group-scoped keys

Service keys are scoped when they are created:
  • Team-scoped keys can query team-wide data and manage every group in the team.
  • Group-scoped keys are limited to their assigned group. They can read the group’s aggregate ACU total and user rows, list and read only that group, and read or update ACU caps only for current members of that group. They cannot read team-wide totals or user rows, see other groups, or create groups.

Pagination

List groups, list group members, and per-user ACU rows are paginated:
  • page_size — optional; defaults to 100, maximum 1,000. Omitting it or passing 0 uses the default.
  • next_page_token — returned when more results exist. Pass it back as page_token with an otherwise identical request (including the same page_size) to fetch the next page.
Page tokens are opaque and encrypted. They expire after 24 hours. ACU-consumption tokens are bound to the endpoint, team, scope, period, group selection, and page size. Group-list and member-list tokens are bound to the endpoint, team, scope, and page size. Changing a bound value between pages returns an invalid_argument error.

Errors

Errors are returned as JSON with a code and message: