You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openapi.yaml
+143Lines changed: 143 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17362,6 +17362,31 @@ paths:
17362
17362
application/json:
17363
17363
schema:
17364
17364
$ref: "#/components/schemas/CreateApiKeyObject"
17365
+
examples:
17366
+
create_basic:
17367
+
summary: Create a basic service API key
17368
+
value:
17369
+
name: "API_KEY_NAME_0909"
17370
+
scopes: ["completions.write"]
17371
+
create_with_rotation:
17372
+
summary: Create an API key with automatic monthly rotation
17373
+
value:
17374
+
name: "Auto-rotating Key"
17375
+
scopes: ["completions.write"]
17376
+
rotation_policy:
17377
+
rotation_period: "monthly"
17378
+
key_transition_period_ms: 3600000
17379
+
create_with_usage_limits:
17380
+
summary: Create an API key with usage limits and alert emails
17381
+
value:
17382
+
name: "Budget-limited Key"
17383
+
scopes: ["completions.write"]
17384
+
usage_limits:
17385
+
type: "cost"
17386
+
credit_limit: 100
17387
+
alert_threshold: 80
17388
+
periodic_reset: "monthly"
17389
+
alert_emails: ["admin@example.com"]
17365
17390
responses:
17366
17391
"200":
17367
17392
description: OK
@@ -17771,6 +17796,21 @@ paths:
17771
17796
summary: Reset accumulated usage for this key
17772
17797
value:
17773
17798
reset_usage: true
17799
+
set_rotation_policy:
17800
+
summary: Set automatic monthly rotation on an existing key
17801
+
value:
17802
+
rotation_policy:
17803
+
rotation_period: "monthly"
17804
+
key_transition_period_ms: 3600000
17805
+
update_usage_limits:
17806
+
summary: Update usage limits and alert emails
17807
+
value:
17808
+
usage_limits:
17809
+
type: "cost"
17810
+
credit_limit: 100
17811
+
alert_threshold: 80
17812
+
periodic_reset: "monthly"
17813
+
alert_emails: ["admin@example.com"]
17774
17814
parameters:
17775
17815
- name: id
17776
17816
in: path
@@ -31809,6 +31849,21 @@ components:
31809
31849
type: string
31810
31850
description: Reset the usage periodically.
31811
31851
enum: ["monthly", "weekly"]
31852
+
nullable: true
31853
+
example: "monthly"
31854
+
periodic_reset_days:
31855
+
type: integer
31856
+
description: Reset the usage counter every N days (1-365). Mutually exclusive with periodic_reset.
31857
+
minimum: 1
31858
+
maximum: 365
31859
+
nullable: true
31860
+
example: 30
31861
+
next_usage_reset_at:
31862
+
type: string
31863
+
format: date-time
31864
+
description: ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided.
31865
+
nullable: true
31866
+
example: "2026-05-01T00:00:00Z"
31812
31867
example:
31813
31868
credit_limit: 10
31814
31869
periodic_reset: monthly
@@ -34447,6 +34502,11 @@ components:
34447
34502
description:
34448
34503
type: string
34449
34504
example: "API key for development environment"
34505
+
organisation_id:
34506
+
type: string
34507
+
format: uuid
34508
+
description: Organisation ID. Optional when calling via an org-level API key (picked from auth context).
34509
+
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
34450
34510
workspace_id:
34451
34511
type: string
34452
34512
example: "ws-myworkspace"
@@ -34457,17 +34517,26 @@ components:
34457
34517
example: "c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f"
34458
34518
rate_limits:
34459
34519
type: array
34520
+
nullable: true
34460
34521
items:
34461
34522
type: object
34523
+
required:
34524
+
- type
34525
+
- unit
34526
+
- value
34462
34527
properties:
34463
34528
type:
34464
34529
type: string
34530
+
enum: ["requests", "tokens"]
34465
34531
example: "requests"
34466
34532
unit:
34467
34533
type: string
34534
+
enum: ["rpd", "rph", "rpm", "rps", "rpw"]
34535
+
description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week."
34468
34536
example: "rpm"
34469
34537
value:
34470
34538
type: integer
34539
+
minimum: 0
34471
34540
example: 100
34472
34541
usage_limits:
34473
34542
$ref: "#/components/schemas/UsageLimits"
@@ -34488,6 +34557,11 @@ components:
34488
34557
config_id:
34489
34558
type: string
34490
34559
example: config-abc
34560
+
allow_config_override:
34561
+
type: boolean
34562
+
default: true
34563
+
description: When false, the pinned config_id cannot be overridden at request time.
34564
+
example: false
34491
34565
alert_emails:
34492
34566
type: array
34493
34567
items:
@@ -34497,6 +34571,31 @@ components:
34497
34571
expires_at:
34498
34572
type: string
34499
34573
format: date-time
34574
+
nullable: true
34575
+
description: ISO 8601 datetime at which this key expires. Must not exceed the org/workspace maximum TTL if configured.
34576
+
example: "2026-12-31T23:59:59Z"
34577
+
rotation_policy:
34578
+
type: object
34579
+
nullable: true
34580
+
description: Automatic key rotation configuration. Requires either rotation_period or next_rotation_at.
34581
+
properties:
34582
+
rotation_period:
34583
+
type: string
34584
+
enum: ["weekly", "monthly"]
34585
+
nullable: true
34586
+
description: How often to automatically rotate the key.
34587
+
example: "monthly"
34588
+
next_rotation_at:
34589
+
type: string
34590
+
format: date-time
34591
+
nullable: true
34592
+
description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period.
34593
+
example: "2026-06-01T00:00:00Z"
34594
+
key_transition_period_ms:
34595
+
type: integer
34596
+
minimum: 1800000
34597
+
description: Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period.
34598
+
example: 3600000
34500
34599
34501
34600
UpdateApiKeyObject:
34502
34601
type: object
@@ -34509,17 +34608,26 @@ components:
34509
34608
example: "API key for development environment"
34510
34609
rate_limits:
34511
34610
type: array
34611
+
nullable: true
34512
34612
items:
34513
34613
type: object
34614
+
required:
34615
+
- type
34616
+
- unit
34617
+
- value
34514
34618
properties:
34515
34619
type:
34516
34620
type: string
34621
+
enum: ["requests", "tokens"]
34517
34622
example: "requests"
34518
34623
unit:
34519
34624
type: string
34625
+
enum: ["rpd", "rph", "rpm", "rps", "rpw"]
34626
+
description: "Rate limit unit: requests/tokens per day, hour, minute, second, or week."
34520
34627
example: "rpm"
34521
34628
value:
34522
34629
type: integer
34630
+
minimum: 0
34523
34631
example: 100
34524
34632
usage_limits:
34525
34633
$ref: "#/components/schemas/UsageLimits"
@@ -34544,12 +34652,45 @@ components:
34544
34652
config_id:
34545
34653
type: string
34546
34654
example: config-abc
34655
+
allow_config_override:
34656
+
type: boolean
34657
+
default: true
34658
+
description: When false, the pinned config_id cannot be overridden at request time.
34659
+
example: false
34547
34660
alert_emails:
34548
34661
type: array
34549
34662
items:
34550
34663
type: string
34551
34664
format: email
34552
34665
example: "foo@bar.com"
34666
+
expires_at:
34667
+
type: string
34668
+
format: date-time
34669
+
nullable: true
34670
+
description: ISO 8601 datetime at which this key expires.
34671
+
example: "2026-12-31T23:59:59Z"
34672
+
rotation_policy:
34673
+
type: object
34674
+
nullable: true
34675
+
description: Update or replace the automatic key rotation configuration. Requires either rotation_period or next_rotation_at.
34676
+
properties:
34677
+
rotation_period:
34678
+
type: string
34679
+
enum: ["weekly", "monthly"]
34680
+
nullable: true
34681
+
description: How often to automatically rotate the key.
34682
+
example: "monthly"
34683
+
next_rotation_at:
34684
+
type: string
34685
+
format: date-time
34686
+
nullable: true
34687
+
description: Explicit datetime for the next rotation. Mutually exclusive with rotation_period.
34688
+
example: "2026-06-01T00:00:00Z"
34689
+
key_transition_period_ms:
34690
+
type: integer
34691
+
minimum: 1800000
34692
+
description: Duration in milliseconds during which the previous key remains valid after rotation. Minimum 30 minutes (1800000). Must be less than the full rotation period.
34693
+
example: 3600000
34553
34694
34554
34695
RotateApiKeyRequest:
34555
34696
type: object
@@ -35838,6 +35979,8 @@ components:
35838
35979
description: Inference endpoint
35839
35980
metadata:
35840
35981
description: metadata related for the batch job
35982
+
type: object
35983
+
additionalProperties: true
35841
35984
nullable: true
35842
35985
description: Gateway supported body params for OpenAI, Azure OpenAI and VertexAI.
0 commit comments