@opusdns/api 1.69.0 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "@opusdns/api-spec-ts-generator": "^1.2.0"
4
4
  },
5
5
  "name": "@opusdns/api",
6
- "version": "1.69.0",
6
+ "version": "1.71.0",
7
7
  "description": "TypeScript types for the OpusDNS OpenAPI specification",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ AiUsageGranularity,
2
3
  AllocationMethodType,
3
4
  AssignablePublicRole,
4
5
  AttributeType,
@@ -116,6 +117,18 @@ import type {
116
117
  ZoneSortField,
117
118
  } from './schemas';
118
119
 
120
+ export const AI_USAGE_GRANULARITY = {
121
+ DAY: "day",
122
+ WEEK: "week",
123
+ MONTH: "month",
124
+ } as const satisfies Record<string, AiUsageGranularity>;
125
+
126
+ export const AI_USAGE_GRANULARITY_VALUES = [
127
+ 'day',
128
+ 'week',
129
+ 'month',
130
+ ] as const satisfies ReadonlyArray<AiUsageGranularity>;
131
+
119
132
  export const ALLOCATION_METHOD_TYPE = {
120
133
  FCFS: "fcfs",
121
134
  AUCTION: "auction",
@@ -1,4 +1,8 @@
1
1
  import type {
2
+ AiUsageModelBreakdown,
3
+ AiUsageSeries,
4
+ AiUsageSummary,
5
+ AiUsageTimeBucket,
2
6
  AllowedNumberOfNameserverBase,
3
7
  AttributeCondition,
4
8
  BillingMetadata,
@@ -418,6 +422,52 @@ import type {
418
422
  DomainAvailabilityCheck,
419
423
  } from './schemas';
420
424
 
425
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_READ_TOKENS = 'cache_read_tokens' satisfies keyof AiUsageModelBreakdown;
426
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_WRITE_TOKENS = 'cache_write_tokens' satisfies keyof AiUsageModelBreakdown;
427
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_INPUT_TOKENS = 'input_tokens' satisfies keyof AiUsageModelBreakdown;
428
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_MODEL = 'model' satisfies keyof AiUsageModelBreakdown;
429
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_OUTPUT_TOKENS = 'output_tokens' satisfies keyof AiUsageModelBreakdown;
430
+ export const KEY_AI_USAGE_MODEL_BREAKDOWN_REQUEST_COUNT = 'request_count' satisfies keyof AiUsageModelBreakdown;
431
+
432
+ export const KEYS_AI_USAGE_MODEL_BREAKDOWN = [
433
+ KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_READ_TOKENS,
434
+ KEY_AI_USAGE_MODEL_BREAKDOWN_CACHE_WRITE_TOKENS,
435
+ KEY_AI_USAGE_MODEL_BREAKDOWN_INPUT_TOKENS,
436
+ KEY_AI_USAGE_MODEL_BREAKDOWN_MODEL,
437
+ KEY_AI_USAGE_MODEL_BREAKDOWN_OUTPUT_TOKENS,
438
+ KEY_AI_USAGE_MODEL_BREAKDOWN_REQUEST_COUNT,
439
+ ] as const satisfies (keyof AiUsageModelBreakdown)[];
440
+
441
+ export const KEY_AI_USAGE_SERIES_BUCKETS = 'buckets' satisfies keyof AiUsageSeries;
442
+ export const KEY_AI_USAGE_SERIES_END_DATE = 'end_date' satisfies keyof AiUsageSeries;
443
+ export const KEY_AI_USAGE_SERIES_GRANULARITY = 'granularity' satisfies keyof AiUsageSeries;
444
+ export const KEY_AI_USAGE_SERIES_START_DATE = 'start_date' satisfies keyof AiUsageSeries;
445
+
446
+ export const KEYS_AI_USAGE_SERIES = [
447
+ KEY_AI_USAGE_SERIES_BUCKETS,
448
+ KEY_AI_USAGE_SERIES_END_DATE,
449
+ KEY_AI_USAGE_SERIES_GRANULARITY,
450
+ KEY_AI_USAGE_SERIES_START_DATE,
451
+ ] as const satisfies (keyof AiUsageSeries)[];
452
+
453
+ export const KEY_AI_USAGE_SUMMARY_BY_MODEL = 'by_model' satisfies keyof AiUsageSummary;
454
+ export const KEY_AI_USAGE_SUMMARY_END_DATE = 'end_date' satisfies keyof AiUsageSummary;
455
+ export const KEY_AI_USAGE_SUMMARY_START_DATE = 'start_date' satisfies keyof AiUsageSummary;
456
+
457
+ export const KEYS_AI_USAGE_SUMMARY = [
458
+ KEY_AI_USAGE_SUMMARY_BY_MODEL,
459
+ KEY_AI_USAGE_SUMMARY_END_DATE,
460
+ KEY_AI_USAGE_SUMMARY_START_DATE,
461
+ ] as const satisfies (keyof AiUsageSummary)[];
462
+
463
+ export const KEY_AI_USAGE_TIME_BUCKET_BY_MODEL = 'by_model' satisfies keyof AiUsageTimeBucket;
464
+ export const KEY_AI_USAGE_TIME_BUCKET_PERIOD_START = 'period_start' satisfies keyof AiUsageTimeBucket;
465
+
466
+ export const KEYS_AI_USAGE_TIME_BUCKET = [
467
+ KEY_AI_USAGE_TIME_BUCKET_BY_MODEL,
468
+ KEY_AI_USAGE_TIME_BUCKET_PERIOD_START,
469
+ ] as const satisfies (keyof AiUsageTimeBucket)[];
470
+
421
471
  export const KEY_ALLOWED_NUMBER_OF_NAMESERVER_BASE_MAX = 'max' satisfies keyof AllowedNumberOfNameserverBase;
422
472
  export const KEY_ALLOWED_NUMBER_OF_NAMESERVER_BASE_MIN = 'min' satisfies keyof AllowedNumberOfNameserverBase;
423
473
 
@@ -2270,6 +2320,7 @@ export const KEY_DOMAIN_LIFECYCLE_BASE_REGISTRY_AUTO_RENEW = 'registry_auto_rene
2270
2320
  export const KEY_DOMAIN_LIFECYCLE_BASE_RENEWAL_PERIODS = 'renewal_periods' satisfies keyof DomainLifecycleBase;
2271
2321
  export const KEY_DOMAIN_LIFECYCLE_BASE_RGP_OPERATIONS = 'rgp_operations' satisfies keyof DomainLifecycleBase;
2272
2322
  export const KEY_DOMAIN_LIFECYCLE_BASE_SYNC_AFTER_OPERATIONS = 'sync_after_operations' satisfies keyof DomainLifecycleBase;
2323
+ export const KEY_DOMAIN_LIFECYCLE_BASE_TRANSFER_GRACE_PERIOD = 'transfer_grace_period' satisfies keyof DomainLifecycleBase;
2273
2324
  export const KEY_DOMAIN_LIFECYCLE_BASE_TRANSFER_RENEWAL_PERIODS = 'transfer_renewal_periods' satisfies keyof DomainLifecycleBase;
2274
2325
 
2275
2326
  export const KEYS_DOMAIN_LIFECYCLE_BASE = [
@@ -2287,6 +2338,7 @@ export const KEYS_DOMAIN_LIFECYCLE_BASE = [
2287
2338
  KEY_DOMAIN_LIFECYCLE_BASE_RENEWAL_PERIODS,
2288
2339
  KEY_DOMAIN_LIFECYCLE_BASE_RGP_OPERATIONS,
2289
2340
  KEY_DOMAIN_LIFECYCLE_BASE_SYNC_AFTER_OPERATIONS,
2341
+ KEY_DOMAIN_LIFECYCLE_BASE_TRANSFER_GRACE_PERIOD,
2290
2342
  KEY_DOMAIN_LIFECYCLE_BASE_TRANSFER_RENEWAL_PERIODS,
2291
2343
  ] as const satisfies (keyof DomainLifecycleBase)[];
2292
2344
 
@@ -798,6 +798,16 @@ export type POST_Organizations_Request = {
798
798
  };
799
799
  export type POST_Organizations_Request_Body = POST_Organizations_Request['requestBody'];
800
800
 
801
+ export type GET_OrganizationsAiUsage_Request = {
802
+ parameters: operations['get_ai_usage_series_v1_organizations_ai_usage_get']['parameters'];
803
+ };
804
+ export type GET_OrganizationsAiUsage_Request_Query = GET_OrganizationsAiUsage_Request['parameters']['query'];
805
+
806
+ export type GET_OrganizationsAiUsageSummary_Request = {
807
+ parameters: operations['get_ai_usage_summary_v1_organizations_ai_usage_summary_get']['parameters'];
808
+ };
809
+ export type GET_OrganizationsAiUsageSummary_Request_Query = GET_OrganizationsAiUsageSummary_Request['parameters']['query'];
810
+
801
811
  export type GET_OrganizationsAttributes_Request = {
802
812
  parameters: operations['get_current_organization_attributes_v1_organizations_attributes_get']['parameters'];
803
813
  };
@@ -1,4 +1,6 @@
1
1
  import type {
2
+ AiUsageSeries,
3
+ AiUsageSummary,
2
4
  BillingTransaction,
3
5
  ClaimsNotices,
4
6
  ClearVanityNameserverSetDefaultRes,
@@ -643,6 +645,20 @@ export type GET_Organizations_Response_401 = Problem;
643
645
  export type GET_Organizations_Response_403 = Problem;
644
646
  export type GET_Organizations_Response_422 = HTTPValidationError;
645
647
 
648
+ export type GET_OrganizationsAiUsage_Response = GET_OrganizationsAiUsage_Response_200 | GET_OrganizationsAiUsage_Response_401 | GET_OrganizationsAiUsage_Response_403 | GET_OrganizationsAiUsage_Response_422;
649
+
650
+ export type GET_OrganizationsAiUsage_Response_200 = AiUsageSeries;
651
+ export type GET_OrganizationsAiUsage_Response_401 = Problem;
652
+ export type GET_OrganizationsAiUsage_Response_403 = Problem;
653
+ export type GET_OrganizationsAiUsage_Response_422 = HTTPValidationError;
654
+
655
+ export type GET_OrganizationsAiUsageSummary_Response = GET_OrganizationsAiUsageSummary_Response_200 | GET_OrganizationsAiUsageSummary_Response_401 | GET_OrganizationsAiUsageSummary_Response_403 | GET_OrganizationsAiUsageSummary_Response_422;
656
+
657
+ export type GET_OrganizationsAiUsageSummary_Response_200 = AiUsageSummary;
658
+ export type GET_OrganizationsAiUsageSummary_Response_401 = Problem;
659
+ export type GET_OrganizationsAiUsageSummary_Response_403 = Problem;
660
+ export type GET_OrganizationsAiUsageSummary_Response_422 = HTTPValidationError;
661
+
646
662
  export type GET_OrganizationsAttributes_Response = GET_OrganizationsAttributes_Response_200 | GET_OrganizationsAttributes_Response_401 | GET_OrganizationsAttributes_Response_403 | GET_OrganizationsAttributes_Response_422;
647
663
 
648
664
  export type GET_OrganizationsAttributes_Response_200 = OrganizationAttribute2[];
@@ -1,5 +1,10 @@
1
1
  import { components } from '../schema';
2
2
 
3
+ export type AiUsageGranularity = components['schemas']['AiUsageGranularity'];
4
+ export type AiUsageModelBreakdown = components['schemas']['AiUsageModelBreakdown'];
5
+ export type AiUsageSeries = components['schemas']['AiUsageSeriesResponse'];
6
+ export type AiUsageSummary = components['schemas']['AiUsageSummaryResponse'];
7
+ export type AiUsageTimeBucket = components['schemas']['AiUsageTimeBucket'];
3
8
  export type AllocationMethodType = components['schemas']['AllocationMethodType'];
4
9
  export type AllowedNumberOfNameserverBase = components['schemas']['AllowedNumberOfNameserverBase'];
5
10
  export type AssignablePublicRole = components['schemas']['AssignablePublicRole'];
package/src/openapi.yaml CHANGED
@@ -15,6 +15,106 @@ components:
15
15
  - rfc3339
16
16
  type: string
17
17
  schemas:
18
+ AiUsageGranularity:
19
+ enum:
20
+ - day
21
+ - week
22
+ - month
23
+ title: AiUsageGranularity
24
+ type: string
25
+ AiUsageModelBreakdown:
26
+ description: 'Public per-model AI token usage. Deliberately excludes billing-gateway''s
27
+
28
+ internal COGS fields (cost_amount, per-million rates, has_rate).'
29
+ properties:
30
+ cache_read_tokens:
31
+ title: Cache Read Tokens
32
+ type: integer
33
+ cache_write_tokens:
34
+ title: Cache Write Tokens
35
+ type: integer
36
+ input_tokens:
37
+ title: Input Tokens
38
+ type: integer
39
+ model:
40
+ title: Model
41
+ type: string
42
+ output_tokens:
43
+ title: Output Tokens
44
+ type: integer
45
+ request_count:
46
+ title: Request Count
47
+ type: integer
48
+ required:
49
+ - model
50
+ - input_tokens
51
+ - output_tokens
52
+ - cache_read_tokens
53
+ - cache_write_tokens
54
+ - request_count
55
+ title: AiUsageModelBreakdown
56
+ type: object
57
+ AiUsageSeriesResponse:
58
+ properties:
59
+ buckets:
60
+ items:
61
+ $ref: '#/components/schemas/AiUsageTimeBucket'
62
+ title: Buckets
63
+ type: array
64
+ end_date:
65
+ format: date
66
+ title: End Date
67
+ type: string
68
+ granularity:
69
+ $ref: '#/components/schemas/AiUsageGranularity'
70
+ start_date:
71
+ format: date
72
+ title: Start Date
73
+ type: string
74
+ required:
75
+ - granularity
76
+ - start_date
77
+ - end_date
78
+ - buckets
79
+ title: AiUsageSeriesResponse
80
+ type: object
81
+ AiUsageSummaryResponse:
82
+ properties:
83
+ by_model:
84
+ items:
85
+ $ref: '#/components/schemas/AiUsageModelBreakdown'
86
+ title: By Model
87
+ type: array
88
+ end_date:
89
+ format: date
90
+ title: End Date
91
+ type: string
92
+ start_date:
93
+ format: date
94
+ title: Start Date
95
+ type: string
96
+ required:
97
+ - start_date
98
+ - end_date
99
+ - by_model
100
+ title: AiUsageSummaryResponse
101
+ type: object
102
+ AiUsageTimeBucket:
103
+ properties:
104
+ by_model:
105
+ items:
106
+ $ref: '#/components/schemas/AiUsageModelBreakdown'
107
+ title: By Model
108
+ type: array
109
+ period_start:
110
+ format: date
111
+ title: Period Start
112
+ type: string
113
+ required:
114
+ - period_start
115
+ - by_model
116
+ title: AiUsageTimeBucket
117
+ type: object
18
118
  AllocationMethodType:
19
119
  enum:
20
120
  - fcfs
@@ -4857,6 +4957,17 @@ components:
4857
4957
  - type: 'null'
4858
4958
  description: Operations that trigger a sync with the registry
4859
4959
  title: Sync After Operations
4960
+ transfer_grace_period:
4961
+ anyOf:
4962
+ - examples:
4963
+ - P5D
4964
+ - P1Y
4965
+ pattern: ^\-?P?(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$
4966
+ type: string
4967
+ - type: 'null'
4968
+ description: Transfer grace period after a transfer in ISO 8601 format (e.g.,
4969
+ 5D, 3D)
4970
+ title: Transfer Grace Period
4860
4971
  transfer_renewal_periods:
4861
4972
  $ref: '#/components/schemas/PeriodList'
4862
4973
  description: List of allowed transfer renewal periods (eg. '1y')
@@ -14137,7 +14248,7 @@ info:
14137
14248
  \n\n"
14138
14249
  summary: OpusDNS - your gateway to a seamless domain management experience.
14139
14250
  title: OpusDNS API
14140
- version: 2026-07-20-111052
14251
+ version: 2026-07-21-132323
14141
14252
  x-logo:
14142
14253
  altText: OpusDNS API Reference
14143
14254
  url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
@@ -26800,6 +26911,164 @@ paths:
26800
26911
  summary: Create an organization
26801
26912
  tags:
26802
26913
  - organization
26914
+ /v1/organizations/ai-usage:
26915
+ get:
26916
+ description: Retrieves the current organization's AI token usage as a time series,
26917
+ bucketed by the requested granularity and broken down per model. Reports token
26918
+ counts and request volumes only.
26919
+ operationId: get_ai_usage_series_v1_organizations_ai_usage_get
26920
+ parameters:
26921
+ - in: query
26922
+ name: start_date
26923
+ required: true
26924
+ schema:
26925
+ format: date
26926
+ title: Start Date
26927
+ type: string
26928
+ - in: query
26929
+ name: end_date
26930
+ required: true
26931
+ schema:
26932
+ format: date
26933
+ title: End Date
26934
+ type: string
26935
+ - in: query
26936
+ name: model
26937
+ required: false
26938
+ schema:
26939
+ anyOf:
26940
+ - type: string
26941
+ - type: 'null'
26942
+ title: Model
26943
+ - in: query
26944
+ name: granularity
26945
+ required: false
26946
+ schema:
26947
+ $ref: '#/components/schemas/AiUsageGranularity'
26948
+ default: day
26949
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
26950
+ responses:
26951
+ '200':
26952
+ content:
26953
+ application/json:
26954
+ schema:
26955
+ $ref: '#/components/schemas/AiUsageSeriesResponse'
26956
+ description: Successful Response
26957
+ '401':
26958
+ content:
26959
+ application/problem+json:
26960
+ example:
26961
+ code: ERROR_AUTHENTICATION
26962
+ detail: Additional error context.
26963
+ status: 401
26964
+ title: Authentication Error
26965
+ type: authentication
26966
+ schema:
26967
+ $ref: '#/components/schemas/Problem'
26968
+ description: Unauthorized
26969
+ '403':
26970
+ content:
26971
+ application/problem+json:
26972
+ example:
26973
+ code: ERROR_PERMISSION_DENIED
26974
+ detail: Insufficient permissions to perform this action
26975
+ status: 403
26976
+ title: Permission Denied
26977
+ type: permission-denied
26978
+ schema:
26979
+ $ref: '#/components/schemas/Problem'
26980
+ description: Forbidden
26981
+ '422':
26982
+ content:
26983
+ application/problem+json:
26984
+ schema:
26985
+ $ref: '#/components/schemas/HTTPValidationError'
26986
+ description: Validation Error
26987
+ security:
26988
+ - OAuth2PasswordBearer: []
26989
+ - APIKeyHeader: []
26990
+ summary: AI usage over time
26991
+ tags:
26992
+ - organization
26993
+ - ai_usage
26994
+ x-required-permissions:
26995
+ - organization:read
26996
+ /v1/organizations/ai-usage/summary:
26997
+ get:
26998
+ description: Retrieves the current organization's total AI token usage over
26999
+ a date range, broken down per model. Reports token counts and request volumes
27000
+ only.
27001
+ operationId: get_ai_usage_summary_v1_organizations_ai_usage_summary_get
27002
+ parameters:
27003
+ - in: query
27004
+ name: start_date
27005
+ required: true
27006
+ schema:
27007
+ format: date
27008
+ title: Start Date
27009
+ type: string
27010
+ - in: query
27011
+ name: end_date
27012
+ required: true
27013
+ schema:
27014
+ format: date
27015
+ title: End Date
27016
+ type: string
27017
+ - in: query
27018
+ name: model
27019
+ required: false
27020
+ schema:
27021
+ anyOf:
27022
+ - type: string
27023
+ - type: 'null'
27024
+ title: Model
27025
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
27026
+ responses:
27027
+ '200':
27028
+ content:
27029
+ application/json:
27030
+ schema:
27031
+ $ref: '#/components/schemas/AiUsageSummaryResponse'
27032
+ description: Successful Response
27033
+ '401':
27034
+ content:
27035
+ application/problem+json:
27036
+ example:
27037
+ code: ERROR_AUTHENTICATION
27038
+ detail: Additional error context.
27039
+ status: 401
27040
+ title: Authentication Error
27041
+ type: authentication
27042
+ schema:
27043
+ $ref: '#/components/schemas/Problem'
27044
+ description: Unauthorized
27045
+ '403':
27046
+ content:
27047
+ application/problem+json:
27048
+ example:
27049
+ code: ERROR_PERMISSION_DENIED
27050
+ detail: Insufficient permissions to perform this action
27051
+ status: 403
27052
+ title: Permission Denied
27053
+ type: permission-denied
27054
+ schema:
27055
+ $ref: '#/components/schemas/Problem'
27056
+ description: Forbidden
27057
+ '422':
27058
+ content:
27059
+ application/problem+json:
27060
+ schema:
27061
+ $ref: '#/components/schemas/HTTPValidationError'
27062
+ description: Validation Error
27063
+ security:
27064
+ - OAuth2PasswordBearer: []
27065
+ - APIKeyHeader: []
27066
+ summary: AI usage summary
27067
+ tags:
27068
+ - organization
27069
+ - ai_usage
27070
+ x-required-permissions:
27071
+ - organization:read
26803
27072
  /v1/organizations/attributes:
26804
27073
  get:
26805
27074
  description: Retrieves a list of organization attributes for the current organization
@@ -31042,12 +31311,89 @@ tags:
31042
31311
  - description: Endpoints for creating new Tags
31043
31312
  name: tag
31044
31313
  x-displayName: Tags
31314
+ - description: 'Endpoints for reporting your organization''s AI usage.
31315
+
31316
+
31317
+ These endpoints expose the AI token consumption incurred by your organization''s
31318
+ use of OpusDNS AI features, so you can monitor usage over time and per model.
31319
+ Usage is reported as token counts and request volumes only.
31320
+
31321
+
31322
+ ### Endpoints
31323
+
31324
+
31325
+ | Method | Path | Description |
31326
+
31327
+ |--------|------|-------------|
31328
+
31329
+ | `GET` | `/v1/organizations/ai-usage` | Token usage as a time series, bucketed
31330
+ by granularity and broken down per model |
31331
+
31332
+ | `GET` | `/v1/organizations/ai-usage/summary` | Token usage totals over a date
31333
+ range, broken down per model |
31334
+
31335
+
31336
+ The reporting organization is taken from the authentication token; usage is always
31337
+ scoped to the calling organization.
31338
+
31339
+
31340
+ ### Query Parameters
31341
+
31342
+
31343
+ | Parameter | Description |
31344
+
31345
+ |-----------|-------------|
31346
+
31347
+ | `start_date` | Inclusive start date (`YYYY-MM-DD`) |
31348
+
31349
+ | `end_date` | Inclusive end date (`YYYY-MM-DD`) |
31350
+
31351
+ | `granularity` | Time-bucket size for the series endpoint: `day` (default), `week`,
31352
+ or `month` |
31353
+
31354
+ | `model` | Optional filter to a single model |
31355
+
31356
+
31357
+ `start_date` must be on or before `end_date`, otherwise the request is rejected
31358
+ with `422 Unprocessable Content`.
31359
+
31360
+
31361
+ ### Reported Metrics
31362
+
31363
+
31364
+ Each per-model breakdown reports token counts and request volume:
31365
+
31366
+
31367
+ | Field | Description |
31368
+
31369
+ |-------|-------------|
31370
+
31371
+ | `model` | The AI model the usage was recorded against |
31372
+
31373
+ | `input_tokens` | Prompt (input) tokens consumed |
31374
+
31375
+ | `output_tokens` | Generated (output) tokens |
31376
+
31377
+ | `cache_read_tokens` | Tokens served from prompt cache |
31378
+
31379
+ | `cache_write_tokens` | Tokens written to prompt cache |
31380
+
31381
+ | `request_count` | Number of requests |
31382
+
31383
+
31384
+ Usage is scoped to your billing organization and requires the organization `view`
31385
+ permission.
31386
+
31387
+ '
31388
+ name: ai_usage
31389
+ x-displayName: AI usage
31045
31390
  x-tagGroups:
31046
31391
  - name: Account management
31047
31392
  tags:
31048
31393
  - authentication
31049
31394
  - user
31050
31395
  - organization
31396
+ - ai_usage
31051
31397
  - name: Domains
31052
31398
  tags:
31053
31399
  - domain
package/src/schema.d.ts CHANGED
@@ -1925,6 +1925,46 @@ export interface paths {
1925
1925
  patch?: never;
1926
1926
  trace?: never;
1927
1927
  };
1928
+ "/v1/organizations/ai-usage": {
1929
+ parameters: {
1930
+ query?: never;
1931
+ header?: never;
1932
+ path?: never;
1933
+ cookie?: never;
1934
+ };
1935
+ /**
1936
+ * AI usage over time
1937
+ * @description Retrieves the current organization's AI token usage as a time series, bucketed by the requested granularity and broken down per model. Reports token counts and request volumes only.
1938
+ */
1939
+ get: operations["get_ai_usage_series_v1_organizations_ai_usage_get"];
1940
+ put?: never;
1941
+ post?: never;
1942
+ delete?: never;
1943
+ options?: never;
1944
+ head?: never;
1945
+ patch?: never;
1946
+ trace?: never;
1947
+ };
1948
+ "/v1/organizations/ai-usage/summary": {
1949
+ parameters: {
1950
+ query?: never;
1951
+ header?: never;
1952
+ path?: never;
1953
+ cookie?: never;
1954
+ };
1955
+ /**
1956
+ * AI usage summary
1957
+ * @description Retrieves the current organization's total AI token usage over a date range, broken down per model. Reports token counts and request volumes only.
1958
+ */
1959
+ get: operations["get_ai_usage_summary_v1_organizations_ai_usage_summary_get"];
1960
+ put?: never;
1961
+ post?: never;
1962
+ delete?: never;
1963
+ options?: never;
1964
+ head?: never;
1965
+ patch?: never;
1966
+ trace?: never;
1967
+ };
1928
1968
  "/v1/organizations/attributes": {
1929
1969
  parameters: {
1930
1970
  query?: never;
@@ -2832,6 +2872,71 @@ export interface paths {
2832
2872
  export type webhooks = Record<string, never>;
2833
2873
  export interface components {
2834
2874
  schemas: {
2875
+ /**
2876
+ * AiUsageGranularity
2877
+ * @enum {string}
2878
+ */
2879
+ AiUsageGranularity: "day" | "week" | "month";
2880
+ /**
2881
+ * AiUsageModelBreakdown
2882
+ * @description Public per-model AI token usage. Deliberately excludes billing-gateway's
2883
+ * internal COGS fields (cost_amount, per-million rates, has_rate).
2884
+ */
2885
+ AiUsageModelBreakdown: {
2886
+ /** Cache Read Tokens */
2887
+ cache_read_tokens: number;
2888
+ /** Cache Write Tokens */
2889
+ cache_write_tokens: number;
2890
+ /** Input Tokens */
2891
+ input_tokens: number;
2892
+ /** Model */
2893
+ model: string;
2894
+ /** Output Tokens */
2895
+ output_tokens: number;
2896
+ /** Request Count */
2897
+ request_count: number;
2898
+ };
2899
+ /** AiUsageSeriesResponse */
2900
+ AiUsageSeriesResponse: {
2901
+ /** Buckets */
2902
+ buckets: components["schemas"]["AiUsageTimeBucket"][];
2903
+ /**
2904
+ * End Date
2905
+ * Format: date
2906
+ */
2907
+ end_date: string;
2908
+ granularity: components["schemas"]["AiUsageGranularity"];
2909
+ /**
2910
+ * Start Date
2911
+ * Format: date
2912
+ */
2913
+ start_date: string;
2914
+ };
2915
+ /** AiUsageSummaryResponse */
2916
+ AiUsageSummaryResponse: {
2917
+ /** By Model */
2918
+ by_model: components["schemas"]["AiUsageModelBreakdown"][];
2919
+ /**
2920
+ * End Date
2921
+ * Format: date
2922
+ */
2923
+ end_date: string;
2924
+ /**
2925
+ * Start Date
2926
+ * Format: date
2927
+ */
2928
+ start_date: string;
2929
+ };
2930
+ /** AiUsageTimeBucket */
2931
+ AiUsageTimeBucket: {
2932
+ /** By Model */
2933
+ by_model: components["schemas"]["AiUsageModelBreakdown"][];
2934
+ /**
2935
+ * Period Start
2936
+ * Format: date
2937
+ */
2938
+ period_start: string;
2939
+ };
2835
2940
  /**
2836
2941
  * AllocationMethodType
2837
2942
  * @enum {string}
@@ -5960,6 +6065,11 @@ export interface components {
5960
6065
  * @description Operations that trigger a sync with the registry
5961
6066
  */
5962
6067
  sync_after_operations?: components["schemas"]["SyncOperationType"][] | null;
6068
+ /**
6069
+ * Transfer Grace Period
6070
+ * @description Transfer grace period after a transfer in ISO 8601 format (e.g., 5D, 3D)
6071
+ */
6072
+ transfer_grace_period?: string | null;
5963
6073
  /** @description List of allowed transfer renewal periods (eg. '1y') */
5964
6074
  transfer_renewal_periods?: components["schemas"]["PeriodList"];
5965
6075
  };
@@ -22077,6 +22187,149 @@ export interface operations {
22077
22187
  };
22078
22188
  };
22079
22189
  };
22190
+ get_ai_usage_series_v1_organizations_ai_usage_get: {
22191
+ parameters: {
22192
+ query: {
22193
+ start_date: string;
22194
+ end_date: string;
22195
+ model?: string | null;
22196
+ granularity?: components["schemas"]["AiUsageGranularity"];
22197
+ };
22198
+ header?: {
22199
+ /**
22200
+ * @description Opt in to RFC 3339 datetime serialization. When set to `rfc3339`, response datetimes are normalized to UTC and serialized with a `Z` suffix. This is opt-in until the announced default cutover date, after which RFC 3339 becomes the default and this header is accepted as a no-op. Any other value or omission uses the current default serialization.
22201
+ * @example rfc3339
22202
+ */
22203
+ "X-Datetime-Format"?: components["parameters"]["DatetimeFormatHeader"];
22204
+ };
22205
+ path?: never;
22206
+ cookie?: never;
22207
+ };
22208
+ requestBody?: never;
22209
+ responses: {
22210
+ /** @description Successful Response */
22211
+ 200: {
22212
+ headers: {
22213
+ [name: string]: unknown;
22214
+ };
22215
+ content: {
22216
+ "application/json": components["schemas"]["AiUsageSeriesResponse"];
22217
+ };
22218
+ };
22219
+ /** @description Unauthorized */
22220
+ 401: {
22221
+ headers: {
22222
+ [name: string]: unknown;
22223
+ };
22224
+ content: {
22225
+ /** @example {
22226
+ * "code": "ERROR_AUTHENTICATION",
22227
+ * "detail": "Additional error context.",
22228
+ * "status": 401,
22229
+ * "title": "Authentication Error",
22230
+ * "type": "authentication"
22231
+ * } */
22232
+ "application/problem+json": components["schemas"]["Problem"];
22233
+ };
22234
+ };
22235
+ /** @description Forbidden */
22236
+ 403: {
22237
+ headers: {
22238
+ [name: string]: unknown;
22239
+ };
22240
+ content: {
22241
+ /** @example {
22242
+ * "code": "ERROR_PERMISSION_DENIED",
22243
+ * "detail": "Insufficient permissions to perform this action",
22244
+ * "status": 403,
22245
+ * "title": "Permission Denied",
22246
+ * "type": "permission-denied"
22247
+ * } */
22248
+ "application/problem+json": components["schemas"]["Problem"];
22249
+ };
22250
+ };
22251
+ /** @description Validation Error */
22252
+ 422: {
22253
+ headers: {
22254
+ [name: string]: unknown;
22255
+ };
22256
+ content: {
22257
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
22258
+ };
22259
+ };
22260
+ };
22261
+ };
22262
+ get_ai_usage_summary_v1_organizations_ai_usage_summary_get: {
22263
+ parameters: {
22264
+ query: {
22265
+ start_date: string;
22266
+ end_date: string;
22267
+ model?: string | null;
22268
+ };
22269
+ header?: {
22270
+ /**
22271
+ * @description Opt in to RFC 3339 datetime serialization. When set to `rfc3339`, response datetimes are normalized to UTC and serialized with a `Z` suffix. This is opt-in until the announced default cutover date, after which RFC 3339 becomes the default and this header is accepted as a no-op. Any other value or omission uses the current default serialization.
22272
+ * @example rfc3339
22273
+ */
22274
+ "X-Datetime-Format"?: components["parameters"]["DatetimeFormatHeader"];
22275
+ };
22276
+ path?: never;
22277
+ cookie?: never;
22278
+ };
22279
+ requestBody?: never;
22280
+ responses: {
22281
+ /** @description Successful Response */
22282
+ 200: {
22283
+ headers: {
22284
+ [name: string]: unknown;
22285
+ };
22286
+ content: {
22287
+ "application/json": components["schemas"]["AiUsageSummaryResponse"];
22288
+ };
22289
+ };
22290
+ /** @description Unauthorized */
22291
+ 401: {
22292
+ headers: {
22293
+ [name: string]: unknown;
22294
+ };
22295
+ content: {
22296
+ /** @example {
22297
+ * "code": "ERROR_AUTHENTICATION",
22298
+ * "detail": "Additional error context.",
22299
+ * "status": 401,
22300
+ * "title": "Authentication Error",
22301
+ * "type": "authentication"
22302
+ * } */
22303
+ "application/problem+json": components["schemas"]["Problem"];
22304
+ };
22305
+ };
22306
+ /** @description Forbidden */
22307
+ 403: {
22308
+ headers: {
22309
+ [name: string]: unknown;
22310
+ };
22311
+ content: {
22312
+ /** @example {
22313
+ * "code": "ERROR_PERMISSION_DENIED",
22314
+ * "detail": "Insufficient permissions to perform this action",
22315
+ * "status": 403,
22316
+ * "title": "Permission Denied",
22317
+ * "type": "permission-denied"
22318
+ * } */
22319
+ "application/problem+json": components["schemas"]["Problem"];
22320
+ };
22321
+ };
22322
+ /** @description Validation Error */
22323
+ 422: {
22324
+ headers: {
22325
+ [name: string]: unknown;
22326
+ };
22327
+ content: {
22328
+ "application/problem+json": components["schemas"]["HTTPValidationError"];
22329
+ };
22330
+ };
22331
+ };
22332
+ };
22080
22333
  get_current_organization_attributes_v1_organizations_attributes_get: {
22081
22334
  parameters: {
22082
22335
  query?: {