Skip to content

Commit 54acc8d

Browse files
feat: improve api schemas for /keys and /key
1 parent 0f9a403 commit 54acc8d

5 files changed

Lines changed: 68 additions & 28 deletions

File tree

‎docs/api-references/service-endpoints/key-get.json‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,20 @@
4343
"scopes": {
4444
"type": "array",
4545
"nullable": true,
46-
"description": "Effective scopes assigned to the key.",
46+
"description": "List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.",
4747
"items": {
48-
"type": "string"
49-
},
50-
"example": null
48+
"type": "string",
49+
"enum": [
50+
"model:chat",
51+
"model:image",
52+
"model:audio",
53+
"model:video",
54+
"model:embeddings",
55+
"model:responses",
56+
"model:speech",
57+
"model:ocr"
58+
]
59+
}
5160
},
5261
"limit": {
5362
"nullable": true,

‎docs/api-references/service-endpoints/keys-get.json‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,21 @@
4444
},
4545
"scopes": {
4646
"type": "array",
47-
"description": "Effective scopes assigned to the key.",
47+
"nullable": true,
48+
"description": "List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.",
4849
"items": {
49-
"type": "string"
50-
},
51-
"example": [
52-
"model:chat",
53-
"model:responses"
54-
]
50+
"type": "string",
51+
"enum": [
52+
"model:chat",
53+
"model:image",
54+
"model:audio",
55+
"model:video",
56+
"model:embeddings",
57+
"model:responses",
58+
"model:speech",
59+
"model:ocr"
60+
]
61+
}
5562
},
5663
"limit": {
5764
"nullable": true,

‎docs/api-references/service-endpoints/keys-patch.json‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,21 @@
7171
},
7272
"scopes": {
7373
"type": "array",
74-
"description": "Effective scopes assigned to the key.",
74+
"nullable": true,
75+
"description": "List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.",
7576
"items": {
76-
"type": "string"
77-
},
78-
"example": [
79-
"model:chat",
80-
"model:responses"
81-
]
77+
"type": "string",
78+
"enum": [
79+
"model:chat",
80+
"model:image",
81+
"model:audio",
82+
"model:video",
83+
"model:embeddings",
84+
"model:responses",
85+
"model:speech",
86+
"model:ocr"
87+
]
88+
}
8289
},
8390
"limit": {
8491
"nullable": true,

‎docs/api-references/service-endpoints/keys-post.json‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,21 @@
9393
},
9494
"scopes": {
9595
"type": "array",
96-
"description": "Effective scopes assigned to the key.",
96+
"nullable": true,
97+
"description": "List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.",
9798
"items": {
98-
"type": "string"
99-
},
100-
"example": [
101-
"model:chat",
102-
"model:responses"
103-
]
99+
"type": "string",
100+
"enum": [
101+
"model:chat",
102+
"model:image",
103+
"model:audio",
104+
"model:video",
105+
"model:embeddings",
106+
"model:responses",
107+
"model:speech",
108+
"model:ocr"
109+
]
110+
}
104111
},
105112
"limit": {
106113
"type": "object",
@@ -136,7 +143,7 @@
136143
"key": {
137144
"type": "string",
138145
"description": "Full API key value (returned only at creation time).",
139-
"example": "0123456789abcdef0123456789abcdef0"
146+
"example": "b747e891847f4c3fa0f6cce1cfd79bf9"
140147
}
141148
},
142149
"required": [

‎docs/api-references/service-endpoints/keys-put.json‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,19 @@
4545
"scopes": {
4646
"type": "array",
4747
"nullable": true,
48-
"description": "List of scopes assigned to the key.",
48+
"description": "List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.",
4949
"items": {
50-
"type": "string"
50+
"type": "string",
51+
"enum": [
52+
"model:chat",
53+
"model:image",
54+
"model:audio",
55+
"model:video",
56+
"model:embeddings",
57+
"model:responses",
58+
"model:speech",
59+
"model:ocr"
60+
]
5161
}
5262
},
5363
"limit": {

0 commit comments

Comments
 (0)