> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取服务用户每日使用量

> 获取特定服务用户的每日 ACU 使用量。

返回该服务用户创建的会话按日汇总的 ACU 总用量，以及按日期拆分的使用明细。

**时区行为**：计费周期以太平洋标准时间（PST）午夜作为日期边界，对应于 UTC 时间 08:00:00。若要与 Devin 控制台中显示的使用数据保持一致，请传入与此时区偏移对齐的 Unix 时间戳（例如，2025 年 12 月 5 日 PST 午夜对应的 1733385600）。

<div id="permissions">
  ## 权限
</div>

需要使用在企业级别拥有 `ViewAccountConsumption` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/enterprise/consumption/daily/service-users/{service_user_id}
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/consumption/daily/service-users/{service_user_id}:
    get:
      tags:
        - consumption
      summary: 获取服务用户每日使用量
      description: >-
        获取特定服务用户的每日 ACU 使用量。


        返回该服务用户创建的会话按日汇总的 ACU 总用量，以及按日期拆分的使用明细。


        **时区行为**：计费周期以太平洋标准时间（PST）午夜作为日期边界，对应于 UTC 时间 08:00:00。若要与 Devin
        控制台中显示的使用数据保持一致，请传入与此时区偏移对齐的 Unix 时间戳（例如，2025 年 12 月 5 日 PST 午夜对应的
        1733385600）。
      operationId: >-
        handle_get_service_user_consumption_daily_v3_enterprise_consumption_daily_service_users__service_user_id__get
      parameters:
        - description: 服务用户 ID（前缀：service-user-）
          in: path
          name: service_user_id
          required: true
          schema:
            example: service-user-abc123def456
            title: Service User Id
            type: string
        - in: query
          name: time_before
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time Before
        - in: query
          name: time_after
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: 成功的响应
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未找到
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 冲突
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 无法处理的内容
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 请求过多
components:
  schemas:
    ConsumptionResponse:
      properties:
        consumption_by_date:
          items:
            $ref: '#/components/schemas/ConsumptionByDateResponse'
          title: Consumption By Date
          type: array
        total_acus:
          title: Total Acus
          type: number
      required:
        - total_acus
        - consumption_by_date
      title: ConsumptionResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 的 RFC 9457 application/problem+json 错误响应体。


        detail 沿用自旧版 {"detail": ...} 响应体，以保持向后兼容；其他成员字段为新增字段。errors
        包含字段级验证失败信息（仅 422）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: 针对此次具体情况的、便于人理解的说明。
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: 字段级验证错误（仅适用于 422 响应）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: 此次出现对应的 URI 引用（请求路径）。
          title: Instance
        status:
          description: HTTP 状态码。
          title: Status
          type: integer
        title:
          description: 对问题类型的简短、便于理解的概述。
          title: Title
          type: string
        type:
          default: about:blank
          description: 用于标识问题类型的 URI 引用。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    ConsumptionByDateResponse:
      properties:
        acus:
          title: Acus
          type: number
        acus_by_product:
          $ref: '#/components/schemas/AcusByProduct'
        date:
          title: Date
          type: integer
      required:
        - date
        - acus
        - acus_by_product
      title: ConsumptionByDateResponse
      type: object
    AcusByProduct:
      properties:
        cascade:
          title: Cascade
          type: number
        devin:
          title: Devin
          type: number
        review:
          anyOf:
            - type: number
            - type: 'null'
          title: Review
        terminal:
          title: Terminal
          type: number
      required:
        - devin
        - cascade
        - terminal
      title: AcusByProduct
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````