AI Studio usage API

AiStudioRun

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
ruleobjectThe rule (automation) that ran, as a compact reference. The Rules API is not yet public, so this is not dereferenceable today, but the shape is forward-compatible (consumers can key off rule.gid).
rule.gidstring
rule.resource_typestring
rule.namestring
rule_ownerobjectThe user who owns the rule.
rule_owner.gidstringGlobally unique identifier of the resource, as a string.
rule_owner.resource_typestringThe base type of this resource.
rule_owner.namestringRead-only except when same user as requester. The user's name.
rule_owner.emailstring
triggered_byobjectThe user the run executed as, and to whom the credits are attributed. Usually the same as rule_owner, but can differ for chained or AI-teammate-triggered runs.
triggered_by.gidstringGlobally unique identifier of the resource, as a string.
triggered_by.resource_typestringThe base type of this resource.
triggered_by.namestringRead-only except when same user as requester. The user's name.
triggered_by.emailstring
triggering_containerobjectThe object the rule lives in (its container) — a project or portfolio — as a compact reference. null if the container is unavailable.
triggering_container.gidstring
triggering_container.resource_typestring
Click to show all enum values
  • portfolio
  • project
divisionobjectThe division the actor belonged to at the time of the run, as a compact reference. null when division metering is not enabled for the domain. Not dereferenceable yet (no public Division API); name reflects the division's current state.
division.gidstring
division.resource_typestring
division.namestring
run_started_atstring (date-time)When the run was triggered.
run_completed_atstring (date-time)When the run finished. null for runs that did not complete (e.g. cancelled). Runs still in progress don't appear in this endpoint (a usage record exists only once a run is metered), so this is non-null for every success/failed run.
statusstringThe outcome of the run.
Click to show all enum values
  • cancelled
  • failed
  • success
modelstringThe LLM model used for the run.
credits_usednumberThe number of credits consumed by the run.
credit_sourcestringWhether the credits were drawn from a paid or free balance.
Click to show all enum values
  • free
  • paid

Example JSON for AiStudioRun:

{
  "gid": "12345",
  "resource_type": "ai_studio_run",
  "rule": {
    "gid": "1208111111111111",
    "resource_type": "rule",
    "name": "Auto-summarize incoming requests"
  },
  "rule_owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez",
    "email": "[email protected]"
  },
  "triggered_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez",
    "email": "[email protected]"
  },
  "triggering_container": {
    "gid": "1206000000000001",
    "resource_type": "project"
  },
  "division": {
    "gid": "1205000000000003",
    "resource_type": "division",
    "name": "Engineering"
  },
  "run_started_at": "2026-05-01T14:03:12.000Z",
  "run_completed_at": "2026-05-01T14:03:15.220Z",
  "status": "example string",
  "model": "claude-sonnet-4-6",
  "credits_used": 12,
  "credit_source": "example string"
}

AiStudioSeat

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
userobjectThe user who holds the seat.
user.gidstringGlobally unique identifier of the resource, as a string.
user.resource_typestringThe base type of this resource.
user.namestringRead-only except when same user as requester. The user's name.
user.emailstring
licensestringThe user's effective AI Studio license tier. /seats returns only paid seats, so the free tier is not included.
Click to show all enum values
  • ai_studio_max
  • ai_studio_plus
  • ai_studio_pro
statestringThe state of the seat.
Click to show all enum values
  • active
  • expired
  • revoked
assigned_atstring (date-time)When the seat was granted/assigned.
revoked_atstring (date-time)When the seat was revoked or expired. null for active seats.
assigned_byobjectThe user who assigned the seat. null when assigned by the system.
assigned_by.gidstringGlobally unique identifier of the resource, as a string.
assigned_by.resource_typestringThe base type of this resource.
assigned_by.namestringRead-only except when same user as requester. The user's name.

Example JSON for AiStudioSeat:

{
  "gid": "12345",
  "resource_type": "ai_studio_seat",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez",
    "email": "[email protected]"
  },
  "license": "example string",
  "state": "example string",
  "assigned_at": "2026-03-01T00:00:00.000Z",
  "revoked_at": "example string",
  "assigned_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}