Skip to main content

ConsumptionComputeEvent

The compute a job was charged, listed beside the calls so the cost of the feed adds up to the expenses of the balance. It carries every key of a call event.

idstringrequired

compute:<jobId>, stable, one per job and organization.

requestIdnullrequired

Always null, a job is not an HTTP request.

calledAtstring<date-time>required

When the charge was booked, at the job's terminal transition (UTC). It is the instant invoices read.

user objectrequired

Who ran the job: the member, a pseudonym (no email or description) when the creator is not a member of the organization (a public agent run through the Responses API), null once the job is gone.

oneOf
id objectrequired

The user / service-account ID, the same id as in GET /organizations/{organization_id}/users. On a sponsored event, a pseudonym user- plus ten hexadecimal characters, stable for one person and one sponsor, not linkable across sponsors.

oneOf
integer
emailstring,null<email>nullablerequired

null on a sponsored event.

descriptionstring | nullnullablerequired

The service account's description, null for a human.

organizationIdintegerrequired

The organization charged.

kindstringrequired

Always compute.

Possible values: [compute]

actionstringrequired

processing for a document processing job, workflow for any other job, deleted once the job is gone.

Possible values: [processing, workflow, deleted]

sourceTypestringrequired

Always worker, jobs run on workers.

Possible values: [worker]

mcpSessionIdnullrequired

Always null.

jobIdintegerrequired

The job charged, also when it has since been deleted.

successbooleanrequired

true when the job completed, a failed job is charged when its failure is the caller's.

responseStatusnullrequired

Always null.

dataTokensintegerrequired

Always 0, no data was read.

resultCountnullrequired

Always null.

entryRefsnullrequired

Always null.

datasets object[]required

Always [].

  • Array [
  • idinteger | nullnullablerequired

    Platform dataset ID.

    namestring | nullnullablerequired

    Dataset name at read time.

    dataTokensintegerrequired

    Data tokens served from this dataset for this action.

    listPricenumberrequired

    List price of those tokens in the dataset's currency, 0 for an unpriced dataset. The amount actually charged is in cost.

  • ]
  • cost object[]required

    One ComputeCostLine, in the currency the job was charged (USD for some compute).

  • Array [
  • currencystringrequired

    ISO 4217 currency code this line is denominated in.

    Possible values: Value must match regular expression ^[A-Z]{3}$

    computenumberrequired

    Compute charged in this currency.

    totalnumberrequired

    Equal to compute, so a sum of total per currency covers every kind of event.

  • ]
  • sponsorednullrequired

    Always null, compute is never sponsored.

    ConsumptionComputeEvent
    {
    "id": "string",
    "requestId": "null",
    "calledAt": "2024-07-29T15:51:28.071Z",
    "user": {
    "id": 0,
    "email": "user@example.com",
    "description": "string"
    },
    "organizationId": 0,
    "kind": "compute",
    "action": "processing",
    "sourceType": "worker",
    "mcpSessionId": "null",
    "jobId": 0,
    "success": true,
    "responseStatus": "null",
    "dataTokens": 0,
    "resultCount": "null",
    "entryRefs": "null",
    "datasets": [
    {
    "id": 0,
    "name": "string",
    "dataTokens": 0,
    "listPrice": 0
    }
    ],
    "cost": [
    {
    "currency": "string",
    "compute": 0,
    "total": 0
    }
    ],
    "sponsored": "null"
    }