AI Workforce OneHQDocs

Billing

Your plan, this period's usage and your invoices. Read only.

Get this period's usage

GET/v1/usage
Permission billing:read

Running minutes, data transfer and storage, per AI team, for the current period.

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

Agency keys only: the slug of the client organization this request acts for. Required with an agency key, refused with 400 invalid_request on any other credential. A slug that is not one of your agency's current clients is 404 not_found. An agency key is limited to 600 requests a minute per key on EACH API server (the cap is per replica), plus its own budget per client (limit_scope: agency_client), separate from the client's own keys.

Returns a Usage object.

Responses
200

The usage.

Other

An RFC 9457 problem.

Get your subscription

GET/v1/billing/subscription
Permission billing:read
Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

Agency keys only: the slug of the client organization this request acts for. Required with an agency key, refused with 400 invalid_request on any other credential. A slug that is not one of your agency's current clients is 404 not_found. An agency key is limited to 600 requests a minute per key on EACH API server (the cap is per replica), plus its own budget per client (limit_scope: agency_client), separate from the client's own keys.

Returns a Subscription object.

Responses
200

The subscription.

Other

An RFC 9457 problem.

List invoices

GET/v1/billing/invoices
Permission billing:read

Newest first. Pages forward with starting_after (an invoice id). Download links are not included: open invoices from Billing in HQ.

Query parameters
limitinteger

How many objects to return, 1 to 100. Default 20.

starting_afterstring

Return invoices older than this invoice id.

Headers
HQ-Versionstring (date)

A dated API version. Defaults to the version the key was created with.

HQ-Accountstring

Agency keys only: the slug of the client organization this request acts for. Required with an agency key, refused with 400 invalid_request on any other credential. A slug that is not one of your agency's current clients is 404 not_found. An agency key is limited to 600 requests a minute per key on EACH API server (the cap is per replica), plus its own budget per client (limit_scope: agency_client), separate from the client's own keys.

Returns a list of Invoice objects.

Responses
200

A page of invoices.

Other

An RFC 9457 problem.

Objects

Usage

Attributes
objectstring
periodobject
measured_atstring or null
egressobject
storageobject
teamsarray of object
totalsobject

Subscription

Attributes
objectstring
planstring
statusstring
trial_ends_atstring or null
current_period_endstring or null
cancel_at_period_endboolean

Invoice

Attributes
objectstring
idstring
numberstring or null
statusstring
amount_dueinteger

In the smallest currency unit.

amount_paidinteger
currencystring
descriptionstring or null
period_startstring (date-time)
period_endstring (date-time)
created_atstring (date-time)