@tokenlabai/mcp-server 0.6.25 → 0.6.26
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/README.md +2 -2
- package/contract/openapi.json +1372 -80
- package/generated/public-contract.json +3 -3
- package/generated/tools.json +1 -1
- package/package.json +1 -1
package/contract/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "TokenLab AI Gateway",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "TokenLab public AI API: model discovery, generation, files, cached content, asynchronous tasks, and management-token account reporting.",
|
|
6
6
|
"version": "1.0.0",
|
|
7
7
|
"termsOfService": "https://tokenlab.sh/tos",
|
|
8
8
|
"contact": {
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
{
|
|
76
76
|
"name": "Webhooks",
|
|
77
77
|
"description": "Workspace webhook management with Management Tokens (mt-...). Inference API keys do not grant management access."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "Gemini Resources",
|
|
81
|
+
"description": "Workspace-owned Gemini files, uploads, and cached content"
|
|
78
82
|
}
|
|
79
83
|
],
|
|
80
84
|
"security": [
|
|
@@ -8150,126 +8154,1247 @@
|
|
|
8150
8154
|
}
|
|
8151
8155
|
}
|
|
8152
8156
|
},
|
|
8153
|
-
"409": {
|
|
8154
|
-
"description": "Endpoint quota reached or endpoint paused",
|
|
8155
|
-
"content": {
|
|
8156
|
-
"application/json": {
|
|
8157
|
-
"schema": {
|
|
8158
|
-
"$ref": "#/components/schemas/ApiError"
|
|
8159
|
-
}
|
|
8157
|
+
"409": {
|
|
8158
|
+
"description": "Endpoint quota reached or endpoint paused",
|
|
8159
|
+
"content": {
|
|
8160
|
+
"application/json": {
|
|
8161
|
+
"schema": {
|
|
8162
|
+
"$ref": "#/components/schemas/ApiError"
|
|
8163
|
+
}
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
}
|
|
8167
|
+
},
|
|
8168
|
+
"x-mint": {
|
|
8169
|
+
"metadata": {
|
|
8170
|
+
"playground": "simple"
|
|
8171
|
+
}
|
|
8172
|
+
},
|
|
8173
|
+
"parameters": [
|
|
8174
|
+
{
|
|
8175
|
+
"name": "webhookId",
|
|
8176
|
+
"in": "path",
|
|
8177
|
+
"required": true,
|
|
8178
|
+
"schema": {
|
|
8179
|
+
"type": "string",
|
|
8180
|
+
"minLength": 1,
|
|
8181
|
+
"maxLength": 128
|
|
8182
|
+
}
|
|
8183
|
+
}
|
|
8184
|
+
]
|
|
8185
|
+
}
|
|
8186
|
+
},
|
|
8187
|
+
"/v1/management/webhooks/{webhookId}/deliveries": {
|
|
8188
|
+
"get": {
|
|
8189
|
+
"tags": [
|
|
8190
|
+
"Webhooks"
|
|
8191
|
+
],
|
|
8192
|
+
"summary": "List webhook deliveries",
|
|
8193
|
+
"description": "Requires a workspace Management Token (mt-...), created at Dashboard > API > Management Tokens. Send Authorization: Bearer mt-.... Inference API keys (sk-...) and webhook signing secrets (whsec_...) are not accepted. Only the token workspace is accessible. Returns cumulative attempts and latest outcome per event and endpoint. A previously confirmed delivery remains delivered even if a duplicate fails. History contains no payloads or signing secrets; no manual replay operation is provided.",
|
|
8194
|
+
"operationId": "listWebhookDeliveries",
|
|
8195
|
+
"security": [
|
|
8196
|
+
{
|
|
8197
|
+
"ManagementTokenAuth": []
|
|
8198
|
+
}
|
|
8199
|
+
],
|
|
8200
|
+
"responses": {
|
|
8201
|
+
"200": {
|
|
8202
|
+
"description": "List webhook deliveries result",
|
|
8203
|
+
"content": {
|
|
8204
|
+
"application/json": {
|
|
8205
|
+
"schema": {
|
|
8206
|
+
"$ref": "#/components/schemas/WebhookDeliveryList"
|
|
8207
|
+
}
|
|
8208
|
+
}
|
|
8209
|
+
}
|
|
8210
|
+
},
|
|
8211
|
+
"400": {
|
|
8212
|
+
"$ref": "#/components/responses/BadRequest"
|
|
8213
|
+
},
|
|
8214
|
+
"401": {
|
|
8215
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
8216
|
+
},
|
|
8217
|
+
"403": {
|
|
8218
|
+
"$ref": "#/components/responses/Forbidden"
|
|
8219
|
+
},
|
|
8220
|
+
"404": {
|
|
8221
|
+
"description": "Webhook not found in this workspace",
|
|
8222
|
+
"content": {
|
|
8223
|
+
"application/json": {
|
|
8224
|
+
"schema": {
|
|
8225
|
+
"$ref": "#/components/schemas/ApiError"
|
|
8226
|
+
}
|
|
8227
|
+
}
|
|
8228
|
+
}
|
|
8229
|
+
},
|
|
8230
|
+
"409": {
|
|
8231
|
+
"description": "Endpoint quota reached or endpoint paused",
|
|
8232
|
+
"content": {
|
|
8233
|
+
"application/json": {
|
|
8234
|
+
"schema": {
|
|
8235
|
+
"$ref": "#/components/schemas/ApiError"
|
|
8236
|
+
}
|
|
8237
|
+
}
|
|
8238
|
+
}
|
|
8239
|
+
}
|
|
8240
|
+
},
|
|
8241
|
+
"x-mint": {
|
|
8242
|
+
"metadata": {
|
|
8243
|
+
"playground": "simple"
|
|
8244
|
+
}
|
|
8245
|
+
},
|
|
8246
|
+
"parameters": [
|
|
8247
|
+
{
|
|
8248
|
+
"name": "webhookId",
|
|
8249
|
+
"in": "path",
|
|
8250
|
+
"required": true,
|
|
8251
|
+
"schema": {
|
|
8252
|
+
"type": "string",
|
|
8253
|
+
"minLength": 1,
|
|
8254
|
+
"maxLength": 128
|
|
8255
|
+
}
|
|
8256
|
+
},
|
|
8257
|
+
{
|
|
8258
|
+
"name": "page",
|
|
8259
|
+
"in": "query",
|
|
8260
|
+
"schema": {
|
|
8261
|
+
"type": "integer",
|
|
8262
|
+
"minimum": 1,
|
|
8263
|
+
"default": 1
|
|
8264
|
+
}
|
|
8265
|
+
},
|
|
8266
|
+
{
|
|
8267
|
+
"name": "limit",
|
|
8268
|
+
"in": "query",
|
|
8269
|
+
"schema": {
|
|
8270
|
+
"type": "integer",
|
|
8271
|
+
"minimum": 1,
|
|
8272
|
+
"maximum": 100,
|
|
8273
|
+
"default": 50
|
|
8274
|
+
}
|
|
8275
|
+
}
|
|
8276
|
+
]
|
|
8277
|
+
}
|
|
8278
|
+
},
|
|
8279
|
+
"/v1beta/files:register": {
|
|
8280
|
+
"post": {
|
|
8281
|
+
"tags": [
|
|
8282
|
+
"Gemini Resources"
|
|
8283
|
+
],
|
|
8284
|
+
"operationId": "geminiRegisterFiles",
|
|
8285
|
+
"summary": "Register Gemini files",
|
|
8286
|
+
"description": "Registers files from a supported source using Gemini JSON. The service validates the source and request fields. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8287
|
+
"security": [
|
|
8288
|
+
{
|
|
8289
|
+
"BearerAuth": []
|
|
8290
|
+
},
|
|
8291
|
+
{
|
|
8292
|
+
"GeminiApiKey": []
|
|
8293
|
+
}
|
|
8294
|
+
],
|
|
8295
|
+
"parameters": [
|
|
8296
|
+
{
|
|
8297
|
+
"name": "key",
|
|
8298
|
+
"in": "query",
|
|
8299
|
+
"required": false,
|
|
8300
|
+
"schema": {
|
|
8301
|
+
"type": "string"
|
|
8302
|
+
},
|
|
8303
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8304
|
+
},
|
|
8305
|
+
{
|
|
8306
|
+
"name": "Idempotency-Key",
|
|
8307
|
+
"in": "header",
|
|
8308
|
+
"required": false,
|
|
8309
|
+
"schema": {
|
|
8310
|
+
"type": "string"
|
|
8311
|
+
},
|
|
8312
|
+
"description": "Reuse the same key and request body when recovering a create response. A different body with the same key returns a conflict."
|
|
8313
|
+
}
|
|
8314
|
+
],
|
|
8315
|
+
"responses": {
|
|
8316
|
+
"200": {
|
|
8317
|
+
"description": "Success",
|
|
8318
|
+
"content": {
|
|
8319
|
+
"application/json": {
|
|
8320
|
+
"schema": {
|
|
8321
|
+
"anyOf": [
|
|
8322
|
+
{
|
|
8323
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8324
|
+
},
|
|
8325
|
+
{
|
|
8326
|
+
"type": "object",
|
|
8327
|
+
"properties": {
|
|
8328
|
+
"file": {
|
|
8329
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8330
|
+
},
|
|
8331
|
+
"files": {
|
|
8332
|
+
"type": "array",
|
|
8333
|
+
"items": {
|
|
8334
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8335
|
+
}
|
|
8336
|
+
}
|
|
8337
|
+
},
|
|
8338
|
+
"additionalProperties": true
|
|
8339
|
+
}
|
|
8340
|
+
]
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
}
|
|
8344
|
+
},
|
|
8345
|
+
"400": {
|
|
8346
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8347
|
+
},
|
|
8348
|
+
"401": {
|
|
8349
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8350
|
+
},
|
|
8351
|
+
"403": {
|
|
8352
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8353
|
+
},
|
|
8354
|
+
"404": {
|
|
8355
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8356
|
+
},
|
|
8357
|
+
"409": {
|
|
8358
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8359
|
+
},
|
|
8360
|
+
"429": {
|
|
8361
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8362
|
+
},
|
|
8363
|
+
"502": {
|
|
8364
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8365
|
+
},
|
|
8366
|
+
"503": {
|
|
8367
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8368
|
+
}
|
|
8369
|
+
},
|
|
8370
|
+
"requestBody": {
|
|
8371
|
+
"required": true,
|
|
8372
|
+
"content": {
|
|
8373
|
+
"application/json": {
|
|
8374
|
+
"schema": {
|
|
8375
|
+
"$ref": "#/components/schemas/GeminiFileRegisterRequest"
|
|
8376
|
+
}
|
|
8377
|
+
}
|
|
8378
|
+
}
|
|
8379
|
+
}
|
|
8380
|
+
}
|
|
8381
|
+
},
|
|
8382
|
+
"/v1beta/files": {
|
|
8383
|
+
"post": {
|
|
8384
|
+
"tags": [
|
|
8385
|
+
"Gemini Resources"
|
|
8386
|
+
],
|
|
8387
|
+
"operationId": "geminiCreateFile",
|
|
8388
|
+
"summary": "Create Gemini file metadata",
|
|
8389
|
+
"description": "Creates a Gemini file resource from JSON metadata. Upload file bytes through /upload/v1beta/files. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8390
|
+
"security": [
|
|
8391
|
+
{
|
|
8392
|
+
"BearerAuth": []
|
|
8393
|
+
},
|
|
8394
|
+
{
|
|
8395
|
+
"GeminiApiKey": []
|
|
8396
|
+
}
|
|
8397
|
+
],
|
|
8398
|
+
"parameters": [
|
|
8399
|
+
{
|
|
8400
|
+
"name": "key",
|
|
8401
|
+
"in": "query",
|
|
8402
|
+
"required": false,
|
|
8403
|
+
"schema": {
|
|
8404
|
+
"type": "string"
|
|
8405
|
+
},
|
|
8406
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8407
|
+
},
|
|
8408
|
+
{
|
|
8409
|
+
"name": "Idempotency-Key",
|
|
8410
|
+
"in": "header",
|
|
8411
|
+
"required": false,
|
|
8412
|
+
"schema": {
|
|
8413
|
+
"type": "string"
|
|
8414
|
+
},
|
|
8415
|
+
"description": "Reuse the same key and request body when recovering a create response. A different body with the same key returns a conflict."
|
|
8416
|
+
}
|
|
8417
|
+
],
|
|
8418
|
+
"responses": {
|
|
8419
|
+
"200": {
|
|
8420
|
+
"description": "Success",
|
|
8421
|
+
"content": {
|
|
8422
|
+
"application/json": {
|
|
8423
|
+
"schema": {
|
|
8424
|
+
"anyOf": [
|
|
8425
|
+
{
|
|
8426
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8427
|
+
},
|
|
8428
|
+
{
|
|
8429
|
+
"type": "object",
|
|
8430
|
+
"properties": {
|
|
8431
|
+
"file": {
|
|
8432
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8433
|
+
},
|
|
8434
|
+
"files": {
|
|
8435
|
+
"type": "array",
|
|
8436
|
+
"items": {
|
|
8437
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8438
|
+
}
|
|
8439
|
+
}
|
|
8440
|
+
},
|
|
8441
|
+
"additionalProperties": true
|
|
8442
|
+
}
|
|
8443
|
+
]
|
|
8444
|
+
}
|
|
8445
|
+
}
|
|
8446
|
+
}
|
|
8447
|
+
},
|
|
8448
|
+
"400": {
|
|
8449
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8450
|
+
},
|
|
8451
|
+
"401": {
|
|
8452
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8453
|
+
},
|
|
8454
|
+
"403": {
|
|
8455
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8456
|
+
},
|
|
8457
|
+
"404": {
|
|
8458
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8459
|
+
},
|
|
8460
|
+
"409": {
|
|
8461
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8462
|
+
},
|
|
8463
|
+
"429": {
|
|
8464
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8465
|
+
},
|
|
8466
|
+
"502": {
|
|
8467
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8468
|
+
},
|
|
8469
|
+
"503": {
|
|
8470
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8471
|
+
}
|
|
8472
|
+
},
|
|
8473
|
+
"requestBody": {
|
|
8474
|
+
"required": true,
|
|
8475
|
+
"content": {
|
|
8476
|
+
"application/json": {
|
|
8477
|
+
"schema": {
|
|
8478
|
+
"$ref": "#/components/schemas/GeminiFileCreateRequest"
|
|
8479
|
+
}
|
|
8480
|
+
}
|
|
8481
|
+
}
|
|
8482
|
+
}
|
|
8483
|
+
},
|
|
8484
|
+
"get": {
|
|
8485
|
+
"tags": [
|
|
8486
|
+
"Gemini Resources"
|
|
8487
|
+
],
|
|
8488
|
+
"operationId": "geminiListFiles",
|
|
8489
|
+
"summary": "List Gemini files",
|
|
8490
|
+
"description": "Lists files belonging to the current Workspace. Use nextPageToken to continue. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8491
|
+
"security": [
|
|
8492
|
+
{
|
|
8493
|
+
"BearerAuth": []
|
|
8494
|
+
},
|
|
8495
|
+
{
|
|
8496
|
+
"GeminiApiKey": []
|
|
8497
|
+
}
|
|
8498
|
+
],
|
|
8499
|
+
"parameters": [
|
|
8500
|
+
{
|
|
8501
|
+
"name": "key",
|
|
8502
|
+
"in": "query",
|
|
8503
|
+
"required": false,
|
|
8504
|
+
"schema": {
|
|
8505
|
+
"type": "string"
|
|
8506
|
+
},
|
|
8507
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8508
|
+
},
|
|
8509
|
+
{
|
|
8510
|
+
"name": "pageSize",
|
|
8511
|
+
"in": "query",
|
|
8512
|
+
"schema": {
|
|
8513
|
+
"type": "integer"
|
|
8514
|
+
},
|
|
8515
|
+
"description": "Requested page size; page_size is also accepted."
|
|
8516
|
+
},
|
|
8517
|
+
{
|
|
8518
|
+
"name": "pageToken",
|
|
8519
|
+
"in": "query",
|
|
8520
|
+
"required": false,
|
|
8521
|
+
"schema": {
|
|
8522
|
+
"type": "string"
|
|
8523
|
+
},
|
|
8524
|
+
"description": "Opaque nextPageToken from the previous response. page_token is also accepted."
|
|
8525
|
+
}
|
|
8526
|
+
],
|
|
8527
|
+
"responses": {
|
|
8528
|
+
"200": {
|
|
8529
|
+
"description": "Success",
|
|
8530
|
+
"content": {
|
|
8531
|
+
"application/json": {
|
|
8532
|
+
"schema": {
|
|
8533
|
+
"type": "object",
|
|
8534
|
+
"properties": {
|
|
8535
|
+
"files": {
|
|
8536
|
+
"type": "array",
|
|
8537
|
+
"items": {
|
|
8538
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8539
|
+
}
|
|
8540
|
+
},
|
|
8541
|
+
"nextPageToken": {
|
|
8542
|
+
"type": "string"
|
|
8543
|
+
}
|
|
8544
|
+
},
|
|
8545
|
+
"required": [
|
|
8546
|
+
"files"
|
|
8547
|
+
]
|
|
8548
|
+
}
|
|
8549
|
+
}
|
|
8550
|
+
}
|
|
8551
|
+
},
|
|
8552
|
+
"400": {
|
|
8553
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8554
|
+
},
|
|
8555
|
+
"401": {
|
|
8556
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8557
|
+
},
|
|
8558
|
+
"403": {
|
|
8559
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8560
|
+
},
|
|
8561
|
+
"404": {
|
|
8562
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8563
|
+
},
|
|
8564
|
+
"409": {
|
|
8565
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8566
|
+
},
|
|
8567
|
+
"429": {
|
|
8568
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8569
|
+
},
|
|
8570
|
+
"502": {
|
|
8571
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8572
|
+
},
|
|
8573
|
+
"503": {
|
|
8574
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8575
|
+
}
|
|
8576
|
+
}
|
|
8577
|
+
}
|
|
8578
|
+
},
|
|
8579
|
+
"/v1beta/files/{fileId}": {
|
|
8580
|
+
"get": {
|
|
8581
|
+
"tags": [
|
|
8582
|
+
"Gemini Resources"
|
|
8583
|
+
],
|
|
8584
|
+
"operationId": "geminiGetFile",
|
|
8585
|
+
"summary": "Get Gemini file",
|
|
8586
|
+
"description": "Reads metadata for a Gemini file. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8587
|
+
"security": [
|
|
8588
|
+
{
|
|
8589
|
+
"BearerAuth": []
|
|
8590
|
+
},
|
|
8591
|
+
{
|
|
8592
|
+
"GeminiApiKey": []
|
|
8593
|
+
}
|
|
8594
|
+
],
|
|
8595
|
+
"parameters": [
|
|
8596
|
+
{
|
|
8597
|
+
"name": "fileId",
|
|
8598
|
+
"in": "path",
|
|
8599
|
+
"required": true,
|
|
8600
|
+
"schema": {
|
|
8601
|
+
"type": "string"
|
|
8602
|
+
},
|
|
8603
|
+
"description": "Suffix of the returned files/{fileId} name."
|
|
8604
|
+
},
|
|
8605
|
+
{
|
|
8606
|
+
"name": "key",
|
|
8607
|
+
"in": "query",
|
|
8608
|
+
"required": false,
|
|
8609
|
+
"schema": {
|
|
8610
|
+
"type": "string"
|
|
8611
|
+
},
|
|
8612
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8613
|
+
}
|
|
8614
|
+
],
|
|
8615
|
+
"responses": {
|
|
8616
|
+
"200": {
|
|
8617
|
+
"description": "Success",
|
|
8618
|
+
"content": {
|
|
8619
|
+
"application/json": {
|
|
8620
|
+
"schema": {
|
|
8621
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
8622
|
+
}
|
|
8623
|
+
}
|
|
8624
|
+
}
|
|
8625
|
+
},
|
|
8626
|
+
"400": {
|
|
8627
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8628
|
+
},
|
|
8629
|
+
"401": {
|
|
8630
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8631
|
+
},
|
|
8632
|
+
"403": {
|
|
8633
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8634
|
+
},
|
|
8635
|
+
"404": {
|
|
8636
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8637
|
+
},
|
|
8638
|
+
"409": {
|
|
8639
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8640
|
+
},
|
|
8641
|
+
"429": {
|
|
8642
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8643
|
+
},
|
|
8644
|
+
"502": {
|
|
8645
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8646
|
+
},
|
|
8647
|
+
"503": {
|
|
8648
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8649
|
+
}
|
|
8650
|
+
}
|
|
8651
|
+
},
|
|
8652
|
+
"delete": {
|
|
8653
|
+
"tags": [
|
|
8654
|
+
"Gemini Resources"
|
|
8655
|
+
],
|
|
8656
|
+
"operationId": "geminiDeleteFile",
|
|
8657
|
+
"summary": "Delete Gemini file",
|
|
8658
|
+
"description": "Deletes a Gemini file. Save anything needed before deletion. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8659
|
+
"security": [
|
|
8660
|
+
{
|
|
8661
|
+
"BearerAuth": []
|
|
8662
|
+
},
|
|
8663
|
+
{
|
|
8664
|
+
"GeminiApiKey": []
|
|
8665
|
+
}
|
|
8666
|
+
],
|
|
8667
|
+
"parameters": [
|
|
8668
|
+
{
|
|
8669
|
+
"name": "fileId",
|
|
8670
|
+
"in": "path",
|
|
8671
|
+
"required": true,
|
|
8672
|
+
"schema": {
|
|
8673
|
+
"type": "string"
|
|
8674
|
+
}
|
|
8675
|
+
},
|
|
8676
|
+
{
|
|
8677
|
+
"name": "key",
|
|
8678
|
+
"in": "query",
|
|
8679
|
+
"required": false,
|
|
8680
|
+
"schema": {
|
|
8681
|
+
"type": "string"
|
|
8682
|
+
},
|
|
8683
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8684
|
+
}
|
|
8685
|
+
],
|
|
8686
|
+
"responses": {
|
|
8687
|
+
"200": {
|
|
8688
|
+
"description": "Success",
|
|
8689
|
+
"content": {
|
|
8690
|
+
"application/json": {
|
|
8691
|
+
"schema": {
|
|
8692
|
+
"type": "object",
|
|
8693
|
+
"additionalProperties": true
|
|
8694
|
+
}
|
|
8695
|
+
}
|
|
8696
|
+
}
|
|
8697
|
+
},
|
|
8698
|
+
"400": {
|
|
8699
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8700
|
+
},
|
|
8701
|
+
"401": {
|
|
8702
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8703
|
+
},
|
|
8704
|
+
"403": {
|
|
8705
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8706
|
+
},
|
|
8707
|
+
"404": {
|
|
8708
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8709
|
+
},
|
|
8710
|
+
"409": {
|
|
8711
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8712
|
+
},
|
|
8713
|
+
"429": {
|
|
8714
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8715
|
+
},
|
|
8716
|
+
"502": {
|
|
8717
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8718
|
+
},
|
|
8719
|
+
"503": {
|
|
8720
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8721
|
+
}
|
|
8722
|
+
}
|
|
8723
|
+
}
|
|
8724
|
+
},
|
|
8725
|
+
"/v1beta/cachedContents": {
|
|
8726
|
+
"post": {
|
|
8727
|
+
"tags": [
|
|
8728
|
+
"Gemini Resources"
|
|
8729
|
+
],
|
|
8730
|
+
"operationId": "geminiCreateCachedContent",
|
|
8731
|
+
"summary": "Create Gemini cached content",
|
|
8732
|
+
"description": "Creates cached content for a current TokenLab Gemini model. Supported fields, resource references, and lifetime depend on the service and model; lowerCamelCase and the corresponding proto snake_case names are accepted. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8733
|
+
"security": [
|
|
8734
|
+
{
|
|
8735
|
+
"BearerAuth": []
|
|
8736
|
+
},
|
|
8737
|
+
{
|
|
8738
|
+
"GeminiApiKey": []
|
|
8739
|
+
}
|
|
8740
|
+
],
|
|
8741
|
+
"parameters": [
|
|
8742
|
+
{
|
|
8743
|
+
"name": "key",
|
|
8744
|
+
"in": "query",
|
|
8745
|
+
"required": false,
|
|
8746
|
+
"schema": {
|
|
8747
|
+
"type": "string"
|
|
8748
|
+
},
|
|
8749
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8750
|
+
},
|
|
8751
|
+
{
|
|
8752
|
+
"name": "Idempotency-Key",
|
|
8753
|
+
"in": "header",
|
|
8754
|
+
"required": false,
|
|
8755
|
+
"schema": {
|
|
8756
|
+
"type": "string"
|
|
8757
|
+
},
|
|
8758
|
+
"description": "Reuse the same key and request body when recovering a create response. A different body with the same key returns a conflict."
|
|
8759
|
+
}
|
|
8760
|
+
],
|
|
8761
|
+
"responses": {
|
|
8762
|
+
"200": {
|
|
8763
|
+
"description": "Success",
|
|
8764
|
+
"content": {
|
|
8765
|
+
"application/json": {
|
|
8766
|
+
"schema": {
|
|
8767
|
+
"$ref": "#/components/schemas/GeminiCachedContentResource"
|
|
8768
|
+
}
|
|
8769
|
+
}
|
|
8770
|
+
}
|
|
8771
|
+
},
|
|
8772
|
+
"400": {
|
|
8773
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8774
|
+
},
|
|
8775
|
+
"401": {
|
|
8776
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8777
|
+
},
|
|
8778
|
+
"403": {
|
|
8779
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8780
|
+
},
|
|
8781
|
+
"404": {
|
|
8782
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8783
|
+
},
|
|
8784
|
+
"409": {
|
|
8785
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8786
|
+
},
|
|
8787
|
+
"429": {
|
|
8788
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8789
|
+
},
|
|
8790
|
+
"502": {
|
|
8791
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8792
|
+
},
|
|
8793
|
+
"503": {
|
|
8794
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8795
|
+
}
|
|
8796
|
+
},
|
|
8797
|
+
"requestBody": {
|
|
8798
|
+
"required": true,
|
|
8799
|
+
"content": {
|
|
8800
|
+
"application/json": {
|
|
8801
|
+
"schema": {
|
|
8802
|
+
"$ref": "#/components/schemas/GeminiCachedContentRequest"
|
|
8803
|
+
}
|
|
8804
|
+
}
|
|
8805
|
+
}
|
|
8806
|
+
}
|
|
8807
|
+
},
|
|
8808
|
+
"get": {
|
|
8809
|
+
"tags": [
|
|
8810
|
+
"Gemini Resources"
|
|
8811
|
+
],
|
|
8812
|
+
"operationId": "geminiListCachedContents",
|
|
8813
|
+
"summary": "List Gemini cached content",
|
|
8814
|
+
"description": "Lists cached content belonging to the current Workspace. Use nextPageToken to continue. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8815
|
+
"security": [
|
|
8816
|
+
{
|
|
8817
|
+
"BearerAuth": []
|
|
8818
|
+
},
|
|
8819
|
+
{
|
|
8820
|
+
"GeminiApiKey": []
|
|
8821
|
+
}
|
|
8822
|
+
],
|
|
8823
|
+
"parameters": [
|
|
8824
|
+
{
|
|
8825
|
+
"name": "key",
|
|
8826
|
+
"in": "query",
|
|
8827
|
+
"required": false,
|
|
8828
|
+
"schema": {
|
|
8829
|
+
"type": "string"
|
|
8830
|
+
},
|
|
8831
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8832
|
+
},
|
|
8833
|
+
{
|
|
8834
|
+
"name": "pageSize",
|
|
8835
|
+
"in": "query",
|
|
8836
|
+
"schema": {
|
|
8837
|
+
"type": "integer"
|
|
8838
|
+
},
|
|
8839
|
+
"description": "Requested page size; page_size is also accepted."
|
|
8840
|
+
},
|
|
8841
|
+
{
|
|
8842
|
+
"name": "pageToken",
|
|
8843
|
+
"in": "query",
|
|
8844
|
+
"required": false,
|
|
8845
|
+
"schema": {
|
|
8846
|
+
"type": "string"
|
|
8847
|
+
},
|
|
8848
|
+
"description": "Opaque nextPageToken from the previous response. page_token is also accepted."
|
|
8849
|
+
}
|
|
8850
|
+
],
|
|
8851
|
+
"responses": {
|
|
8852
|
+
"200": {
|
|
8853
|
+
"description": "Success",
|
|
8854
|
+
"content": {
|
|
8855
|
+
"application/json": {
|
|
8856
|
+
"schema": {
|
|
8857
|
+
"type": "object",
|
|
8858
|
+
"required": [
|
|
8859
|
+
"cachedContents"
|
|
8860
|
+
],
|
|
8861
|
+
"properties": {
|
|
8862
|
+
"cachedContents": {
|
|
8863
|
+
"type": "array",
|
|
8864
|
+
"items": {
|
|
8865
|
+
"$ref": "#/components/schemas/GeminiCachedContentResource"
|
|
8866
|
+
}
|
|
8867
|
+
},
|
|
8868
|
+
"nextPageToken": {
|
|
8869
|
+
"type": "string"
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
}
|
|
8873
|
+
}
|
|
8874
|
+
}
|
|
8875
|
+
},
|
|
8876
|
+
"400": {
|
|
8877
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8878
|
+
},
|
|
8879
|
+
"401": {
|
|
8880
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8881
|
+
},
|
|
8882
|
+
"403": {
|
|
8883
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8884
|
+
},
|
|
8885
|
+
"404": {
|
|
8886
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8887
|
+
},
|
|
8888
|
+
"409": {
|
|
8889
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8890
|
+
},
|
|
8891
|
+
"429": {
|
|
8892
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8893
|
+
},
|
|
8894
|
+
"502": {
|
|
8895
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8896
|
+
},
|
|
8897
|
+
"503": {
|
|
8898
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8899
|
+
}
|
|
8900
|
+
}
|
|
8901
|
+
}
|
|
8902
|
+
},
|
|
8903
|
+
"/v1beta/cachedContents/{cacheId}": {
|
|
8904
|
+
"get": {
|
|
8905
|
+
"tags": [
|
|
8906
|
+
"Gemini Resources"
|
|
8907
|
+
],
|
|
8908
|
+
"operationId": "geminiGetCachedContent",
|
|
8909
|
+
"summary": "Get Gemini cached content",
|
|
8910
|
+
"description": "Reads cached content metadata. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8911
|
+
"security": [
|
|
8912
|
+
{
|
|
8913
|
+
"BearerAuth": []
|
|
8914
|
+
},
|
|
8915
|
+
{
|
|
8916
|
+
"GeminiApiKey": []
|
|
8917
|
+
}
|
|
8918
|
+
],
|
|
8919
|
+
"parameters": [
|
|
8920
|
+
{
|
|
8921
|
+
"name": "cacheId",
|
|
8922
|
+
"in": "path",
|
|
8923
|
+
"required": true,
|
|
8924
|
+
"schema": {
|
|
8925
|
+
"type": "string"
|
|
8926
|
+
},
|
|
8927
|
+
"description": "Suffix of the returned cachedContents/{cacheId} name."
|
|
8928
|
+
},
|
|
8929
|
+
{
|
|
8930
|
+
"name": "key",
|
|
8931
|
+
"in": "query",
|
|
8932
|
+
"required": false,
|
|
8933
|
+
"schema": {
|
|
8934
|
+
"type": "string"
|
|
8935
|
+
},
|
|
8936
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
8937
|
+
}
|
|
8938
|
+
],
|
|
8939
|
+
"responses": {
|
|
8940
|
+
"200": {
|
|
8941
|
+
"description": "Success",
|
|
8942
|
+
"content": {
|
|
8943
|
+
"application/json": {
|
|
8944
|
+
"schema": {
|
|
8945
|
+
"$ref": "#/components/schemas/GeminiCachedContentResource"
|
|
8946
|
+
}
|
|
8947
|
+
}
|
|
8948
|
+
}
|
|
8949
|
+
},
|
|
8950
|
+
"400": {
|
|
8951
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8952
|
+
},
|
|
8953
|
+
"401": {
|
|
8954
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8955
|
+
},
|
|
8956
|
+
"403": {
|
|
8957
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8958
|
+
},
|
|
8959
|
+
"404": {
|
|
8960
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8961
|
+
},
|
|
8962
|
+
"409": {
|
|
8963
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8964
|
+
},
|
|
8965
|
+
"429": {
|
|
8966
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8967
|
+
},
|
|
8968
|
+
"502": {
|
|
8969
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8970
|
+
},
|
|
8971
|
+
"503": {
|
|
8972
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8973
|
+
}
|
|
8974
|
+
}
|
|
8975
|
+
},
|
|
8976
|
+
"patch": {
|
|
8977
|
+
"tags": [
|
|
8978
|
+
"Gemini Resources"
|
|
8979
|
+
],
|
|
8980
|
+
"operationId": "geminiUpdateCachedContent",
|
|
8981
|
+
"summary": "Update Gemini cached content",
|
|
8982
|
+
"description": "Updates the cache lifetime. Invalid lifetime or unsupported fields return a Gemini-format error. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
8983
|
+
"security": [
|
|
8984
|
+
{
|
|
8985
|
+
"BearerAuth": []
|
|
8986
|
+
},
|
|
8987
|
+
{
|
|
8988
|
+
"GeminiApiKey": []
|
|
8989
|
+
}
|
|
8990
|
+
],
|
|
8991
|
+
"parameters": [
|
|
8992
|
+
{
|
|
8993
|
+
"name": "cacheId",
|
|
8994
|
+
"in": "path",
|
|
8995
|
+
"required": true,
|
|
8996
|
+
"schema": {
|
|
8997
|
+
"type": "string"
|
|
8998
|
+
}
|
|
8999
|
+
},
|
|
9000
|
+
{
|
|
9001
|
+
"name": "key",
|
|
9002
|
+
"in": "query",
|
|
9003
|
+
"required": false,
|
|
9004
|
+
"schema": {
|
|
9005
|
+
"type": "string"
|
|
9006
|
+
},
|
|
9007
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
9008
|
+
},
|
|
9009
|
+
{
|
|
9010
|
+
"name": "updateMask",
|
|
9011
|
+
"in": "query",
|
|
9012
|
+
"required": false,
|
|
9013
|
+
"schema": {
|
|
9014
|
+
"type": "string"
|
|
9015
|
+
},
|
|
9016
|
+
"description": "Gemini field mask when required by the service."
|
|
9017
|
+
}
|
|
9018
|
+
],
|
|
9019
|
+
"responses": {
|
|
9020
|
+
"200": {
|
|
9021
|
+
"description": "Success",
|
|
9022
|
+
"content": {
|
|
9023
|
+
"application/json": {
|
|
9024
|
+
"schema": {
|
|
9025
|
+
"$ref": "#/components/schemas/GeminiCachedContentResource"
|
|
9026
|
+
}
|
|
9027
|
+
}
|
|
9028
|
+
}
|
|
9029
|
+
},
|
|
9030
|
+
"400": {
|
|
9031
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9032
|
+
},
|
|
9033
|
+
"401": {
|
|
9034
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9035
|
+
},
|
|
9036
|
+
"403": {
|
|
9037
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9038
|
+
},
|
|
9039
|
+
"404": {
|
|
9040
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9041
|
+
},
|
|
9042
|
+
"409": {
|
|
9043
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9044
|
+
},
|
|
9045
|
+
"429": {
|
|
9046
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9047
|
+
},
|
|
9048
|
+
"502": {
|
|
9049
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9050
|
+
},
|
|
9051
|
+
"503": {
|
|
9052
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9053
|
+
}
|
|
9054
|
+
},
|
|
9055
|
+
"requestBody": {
|
|
9056
|
+
"required": true,
|
|
9057
|
+
"content": {
|
|
9058
|
+
"application/json": {
|
|
9059
|
+
"schema": {
|
|
9060
|
+
"$ref": "#/components/schemas/GeminiCachedContentUpdateRequest"
|
|
9061
|
+
}
|
|
9062
|
+
}
|
|
9063
|
+
}
|
|
9064
|
+
}
|
|
9065
|
+
},
|
|
9066
|
+
"delete": {
|
|
9067
|
+
"tags": [
|
|
9068
|
+
"Gemini Resources"
|
|
9069
|
+
],
|
|
9070
|
+
"operationId": "geminiDeleteCachedContent",
|
|
9071
|
+
"summary": "Delete Gemini cached content",
|
|
9072
|
+
"description": "Deletes cached content. It cannot be used by subsequent generation after deletion. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
9073
|
+
"security": [
|
|
9074
|
+
{
|
|
9075
|
+
"BearerAuth": []
|
|
9076
|
+
},
|
|
9077
|
+
{
|
|
9078
|
+
"GeminiApiKey": []
|
|
9079
|
+
}
|
|
9080
|
+
],
|
|
9081
|
+
"parameters": [
|
|
9082
|
+
{
|
|
9083
|
+
"name": "cacheId",
|
|
9084
|
+
"in": "path",
|
|
9085
|
+
"required": true,
|
|
9086
|
+
"schema": {
|
|
9087
|
+
"type": "string"
|
|
9088
|
+
}
|
|
9089
|
+
},
|
|
9090
|
+
{
|
|
9091
|
+
"name": "key",
|
|
9092
|
+
"in": "query",
|
|
9093
|
+
"required": false,
|
|
9094
|
+
"schema": {
|
|
9095
|
+
"type": "string"
|
|
9096
|
+
},
|
|
9097
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
9098
|
+
}
|
|
9099
|
+
],
|
|
9100
|
+
"responses": {
|
|
9101
|
+
"200": {
|
|
9102
|
+
"description": "Success",
|
|
9103
|
+
"content": {
|
|
9104
|
+
"application/json": {
|
|
9105
|
+
"schema": {
|
|
9106
|
+
"type": "object",
|
|
9107
|
+
"additionalProperties": true
|
|
9108
|
+
}
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
},
|
|
9112
|
+
"400": {
|
|
9113
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9114
|
+
},
|
|
9115
|
+
"401": {
|
|
9116
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9117
|
+
},
|
|
9118
|
+
"403": {
|
|
9119
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9120
|
+
},
|
|
9121
|
+
"404": {
|
|
9122
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9123
|
+
},
|
|
9124
|
+
"409": {
|
|
9125
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9126
|
+
},
|
|
9127
|
+
"429": {
|
|
9128
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9129
|
+
},
|
|
9130
|
+
"502": {
|
|
9131
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9132
|
+
},
|
|
9133
|
+
"503": {
|
|
9134
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9135
|
+
}
|
|
9136
|
+
}
|
|
9137
|
+
}
|
|
9138
|
+
},
|
|
9139
|
+
"/upload/v1beta/files": {
|
|
9140
|
+
"post": {
|
|
9141
|
+
"tags": [
|
|
9142
|
+
"Gemini Resources"
|
|
9143
|
+
],
|
|
9144
|
+
"operationId": "geminiUploadFile",
|
|
9145
|
+
"summary": "Upload Gemini file",
|
|
9146
|
+
"description": "Uploads bytes or starts a resumable upload. For resumable start, send metadata and read X-Goog-Upload-URL. Continue only at that returned URL. The upload URL grants access to that upload, expires after one hour, and must be kept private. Resources can only be read, referenced, changed, or deleted in their owning Workspace. Missing, expired, or inaccessible resources return a Gemini-format error.",
|
|
9147
|
+
"security": [
|
|
9148
|
+
{
|
|
9149
|
+
"BearerAuth": []
|
|
9150
|
+
},
|
|
9151
|
+
{
|
|
9152
|
+
"GeminiApiKey": []
|
|
9153
|
+
}
|
|
9154
|
+
],
|
|
9155
|
+
"parameters": [
|
|
9156
|
+
{
|
|
9157
|
+
"name": "key",
|
|
9158
|
+
"in": "query",
|
|
9159
|
+
"required": false,
|
|
9160
|
+
"schema": {
|
|
9161
|
+
"type": "string"
|
|
9162
|
+
},
|
|
9163
|
+
"description": "API key alternative to Bearer or x-goog-api-key."
|
|
9164
|
+
},
|
|
9165
|
+
{
|
|
9166
|
+
"name": "Idempotency-Key",
|
|
9167
|
+
"in": "header",
|
|
9168
|
+
"required": false,
|
|
9169
|
+
"schema": {
|
|
9170
|
+
"type": "string"
|
|
9171
|
+
},
|
|
9172
|
+
"description": "Reuse the same key and request body when recovering a create response. A different body with the same key returns a conflict."
|
|
9173
|
+
},
|
|
9174
|
+
{
|
|
9175
|
+
"name": "X-Goog-Upload-Protocol",
|
|
9176
|
+
"in": "header",
|
|
9177
|
+
"required": false,
|
|
9178
|
+
"schema": {
|
|
9179
|
+
"type": "string"
|
|
9180
|
+
},
|
|
9181
|
+
"description": "Upload protocol such as resumable."
|
|
9182
|
+
},
|
|
9183
|
+
{
|
|
9184
|
+
"name": "X-Goog-Upload-Command",
|
|
9185
|
+
"in": "header",
|
|
9186
|
+
"required": false,
|
|
9187
|
+
"schema": {
|
|
9188
|
+
"type": "string"
|
|
9189
|
+
},
|
|
9190
|
+
"description": "Upload command such as start or upload, finalize."
|
|
9191
|
+
},
|
|
9192
|
+
{
|
|
9193
|
+
"name": "X-Goog-Upload-Header-Content-Length",
|
|
9194
|
+
"in": "header",
|
|
9195
|
+
"required": false,
|
|
9196
|
+
"schema": {
|
|
9197
|
+
"type": "string"
|
|
9198
|
+
},
|
|
9199
|
+
"description": "Expected file byte length when starting a resumable upload."
|
|
9200
|
+
},
|
|
9201
|
+
{
|
|
9202
|
+
"name": "X-Goog-Upload-Header-Content-Type",
|
|
9203
|
+
"in": "header",
|
|
9204
|
+
"required": false,
|
|
9205
|
+
"schema": {
|
|
9206
|
+
"type": "string"
|
|
9207
|
+
},
|
|
9208
|
+
"description": "File MIME type when starting a resumable upload."
|
|
9209
|
+
}
|
|
9210
|
+
],
|
|
9211
|
+
"responses": {
|
|
9212
|
+
"200": {
|
|
9213
|
+
"description": "Success",
|
|
9214
|
+
"content": {
|
|
9215
|
+
"application/json": {
|
|
9216
|
+
"schema": {
|
|
9217
|
+
"type": "object",
|
|
9218
|
+
"properties": {
|
|
9219
|
+
"file": {
|
|
9220
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
9221
|
+
}
|
|
9222
|
+
},
|
|
9223
|
+
"additionalProperties": true
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
},
|
|
9227
|
+
"headers": {
|
|
9228
|
+
"X-Goog-Upload-URL": {
|
|
9229
|
+
"description": "Private resumable upload URL; returned for resumable start. Use it as supplied.",
|
|
9230
|
+
"schema": {
|
|
9231
|
+
"type": "string",
|
|
9232
|
+
"format": "uri"
|
|
9233
|
+
}
|
|
9234
|
+
}
|
|
9235
|
+
}
|
|
9236
|
+
},
|
|
9237
|
+
"400": {
|
|
9238
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9239
|
+
},
|
|
9240
|
+
"401": {
|
|
9241
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9242
|
+
},
|
|
9243
|
+
"403": {
|
|
9244
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9245
|
+
},
|
|
9246
|
+
"404": {
|
|
9247
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9248
|
+
},
|
|
9249
|
+
"409": {
|
|
9250
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9251
|
+
},
|
|
9252
|
+
"429": {
|
|
9253
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9254
|
+
},
|
|
9255
|
+
"502": {
|
|
9256
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9257
|
+
},
|
|
9258
|
+
"503": {
|
|
9259
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9260
|
+
}
|
|
9261
|
+
},
|
|
9262
|
+
"requestBody": {
|
|
9263
|
+
"required": false,
|
|
9264
|
+
"content": {
|
|
9265
|
+
"application/json": {
|
|
9266
|
+
"schema": {
|
|
9267
|
+
"$ref": "#/components/schemas/GeminiFileCreateRequest"
|
|
9268
|
+
}
|
|
9269
|
+
},
|
|
9270
|
+
"application/octet-stream": {
|
|
9271
|
+
"schema": {
|
|
9272
|
+
"type": "string",
|
|
9273
|
+
"format": "binary"
|
|
9274
|
+
}
|
|
9275
|
+
},
|
|
9276
|
+
"*/*": {
|
|
9277
|
+
"schema": {
|
|
9278
|
+
"type": "string",
|
|
9279
|
+
"format": "binary"
|
|
8160
9280
|
}
|
|
8161
9281
|
}
|
|
8162
9282
|
}
|
|
8163
9283
|
},
|
|
8164
9284
|
"x-mint": {
|
|
8165
9285
|
"metadata": {
|
|
8166
|
-
"playground": "
|
|
9286
|
+
"playground": "none"
|
|
8167
9287
|
}
|
|
8168
|
-
}
|
|
9288
|
+
}
|
|
9289
|
+
}
|
|
9290
|
+
},
|
|
9291
|
+
"/upload/v1beta/files/session/{sessionId}": {
|
|
9292
|
+
"post": {
|
|
9293
|
+
"tags": [
|
|
9294
|
+
"Gemini Resources"
|
|
9295
|
+
],
|
|
9296
|
+
"operationId": "geminiContinueFileUpload",
|
|
9297
|
+
"summary": "Continue Gemini file upload",
|
|
9298
|
+
"description": "Sends bytes or commands to the exact URL returned by resumable start. The session in the URL authorizes this upload; an API key is not required. Keep the URL private. A missing or expired session returns 404; a session that can no longer be continued returns 410. A nonterminal chunk can return 308, so do not treat that response as a page redirect.",
|
|
9299
|
+
"security": [],
|
|
8169
9300
|
"parameters": [
|
|
8170
9301
|
{
|
|
8171
|
-
"name": "
|
|
9302
|
+
"name": "sessionId",
|
|
8172
9303
|
"in": "path",
|
|
8173
9304
|
"required": true,
|
|
8174
9305
|
"schema": {
|
|
8175
|
-
"type": "string"
|
|
8176
|
-
"minLength": 1,
|
|
8177
|
-
"maxLength": 128
|
|
9306
|
+
"type": "string"
|
|
8178
9307
|
}
|
|
8179
|
-
}
|
|
8180
|
-
]
|
|
8181
|
-
}
|
|
8182
|
-
},
|
|
8183
|
-
"/v1/management/webhooks/{webhookId}/deliveries": {
|
|
8184
|
-
"get": {
|
|
8185
|
-
"tags": [
|
|
8186
|
-
"Webhooks"
|
|
8187
|
-
],
|
|
8188
|
-
"summary": "List webhook deliveries",
|
|
8189
|
-
"description": "Requires a workspace Management Token (mt-...), created at Dashboard > API > Management Tokens. Send Authorization: Bearer mt-.... Inference API keys (sk-...) and webhook signing secrets (whsec_...) are not accepted. Only the token workspace is accessible. Returns cumulative attempts and latest outcome per event and endpoint. A previously confirmed delivery remains delivered even if a duplicate fails. History contains no payloads or signing secrets; no manual replay operation is provided.",
|
|
8190
|
-
"operationId": "listWebhookDeliveries",
|
|
8191
|
-
"security": [
|
|
9308
|
+
},
|
|
8192
9309
|
{
|
|
8193
|
-
"
|
|
9310
|
+
"name": "X-Goog-Upload-Command",
|
|
9311
|
+
"in": "header",
|
|
9312
|
+
"required": false,
|
|
9313
|
+
"schema": {
|
|
9314
|
+
"type": "string"
|
|
9315
|
+
},
|
|
9316
|
+
"description": "Upload command such as upload, finalize."
|
|
9317
|
+
},
|
|
9318
|
+
{
|
|
9319
|
+
"name": "X-Goog-Upload-Offset",
|
|
9320
|
+
"in": "header",
|
|
9321
|
+
"required": false,
|
|
9322
|
+
"schema": {
|
|
9323
|
+
"type": "string"
|
|
9324
|
+
},
|
|
9325
|
+
"description": "Zero-based byte offset of the chunk."
|
|
8194
9326
|
}
|
|
8195
9327
|
],
|
|
8196
9328
|
"responses": {
|
|
8197
9329
|
"200": {
|
|
8198
|
-
"description": "
|
|
9330
|
+
"description": "Success",
|
|
8199
9331
|
"content": {
|
|
8200
9332
|
"application/json": {
|
|
8201
9333
|
"schema": {
|
|
8202
|
-
"
|
|
9334
|
+
"type": "object",
|
|
9335
|
+
"properties": {
|
|
9336
|
+
"file": {
|
|
9337
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
9338
|
+
}
|
|
9339
|
+
},
|
|
9340
|
+
"additionalProperties": true
|
|
8203
9341
|
}
|
|
8204
9342
|
}
|
|
8205
9343
|
}
|
|
8206
9344
|
},
|
|
9345
|
+
"308": {
|
|
9346
|
+
"description": "Upload chunk accepted; more data or finalization is needed."
|
|
9347
|
+
},
|
|
8207
9348
|
"400": {
|
|
8208
|
-
"$ref": "#/components/responses/
|
|
9349
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8209
9350
|
},
|
|
8210
9351
|
"401": {
|
|
8211
|
-
"$ref": "#/components/responses/
|
|
9352
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8212
9353
|
},
|
|
8213
9354
|
"403": {
|
|
8214
|
-
"$ref": "#/components/responses/
|
|
9355
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8215
9356
|
},
|
|
8216
9357
|
"404": {
|
|
8217
|
-
"
|
|
8218
|
-
"content": {
|
|
8219
|
-
"application/json": {
|
|
8220
|
-
"schema": {
|
|
8221
|
-
"$ref": "#/components/schemas/ApiError"
|
|
8222
|
-
}
|
|
8223
|
-
}
|
|
8224
|
-
}
|
|
9358
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
8225
9359
|
},
|
|
8226
9360
|
"409": {
|
|
8227
|
-
"
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
9361
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9362
|
+
},
|
|
9363
|
+
"410": {
|
|
9364
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9365
|
+
},
|
|
9366
|
+
"429": {
|
|
9367
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9368
|
+
},
|
|
9369
|
+
"502": {
|
|
9370
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9371
|
+
},
|
|
9372
|
+
"503": {
|
|
9373
|
+
"$ref": "#/components/responses/GeminiResourceError"
|
|
9374
|
+
}
|
|
9375
|
+
},
|
|
9376
|
+
"requestBody": {
|
|
9377
|
+
"required": false,
|
|
9378
|
+
"content": {
|
|
9379
|
+
"application/octet-stream": {
|
|
9380
|
+
"schema": {
|
|
9381
|
+
"type": "string",
|
|
9382
|
+
"format": "binary"
|
|
9383
|
+
}
|
|
9384
|
+
},
|
|
9385
|
+
"*/*": {
|
|
9386
|
+
"schema": {
|
|
9387
|
+
"type": "string",
|
|
9388
|
+
"format": "binary"
|
|
8233
9389
|
}
|
|
8234
9390
|
}
|
|
8235
9391
|
}
|
|
8236
9392
|
},
|
|
8237
9393
|
"x-mint": {
|
|
8238
9394
|
"metadata": {
|
|
8239
|
-
"playground": "
|
|
8240
|
-
}
|
|
8241
|
-
},
|
|
8242
|
-
"parameters": [
|
|
8243
|
-
{
|
|
8244
|
-
"name": "webhookId",
|
|
8245
|
-
"in": "path",
|
|
8246
|
-
"required": true,
|
|
8247
|
-
"schema": {
|
|
8248
|
-
"type": "string",
|
|
8249
|
-
"minLength": 1,
|
|
8250
|
-
"maxLength": 128
|
|
8251
|
-
}
|
|
8252
|
-
},
|
|
8253
|
-
{
|
|
8254
|
-
"name": "page",
|
|
8255
|
-
"in": "query",
|
|
8256
|
-
"schema": {
|
|
8257
|
-
"type": "integer",
|
|
8258
|
-
"minimum": 1,
|
|
8259
|
-
"default": 1
|
|
8260
|
-
}
|
|
8261
|
-
},
|
|
8262
|
-
{
|
|
8263
|
-
"name": "limit",
|
|
8264
|
-
"in": "query",
|
|
8265
|
-
"schema": {
|
|
8266
|
-
"type": "integer",
|
|
8267
|
-
"minimum": 1,
|
|
8268
|
-
"maximum": 100,
|
|
8269
|
-
"default": 50
|
|
8270
|
-
}
|
|
9395
|
+
"playground": "none"
|
|
8271
9396
|
}
|
|
8272
|
-
|
|
9397
|
+
}
|
|
8273
9398
|
}
|
|
8274
9399
|
}
|
|
8275
9400
|
},
|
|
@@ -8286,6 +9411,12 @@
|
|
|
8286
9411
|
"scheme": "bearer",
|
|
8287
9412
|
"bearerFormat": "Management Token",
|
|
8288
9413
|
"description": "Management token authentication. Create or manage Management Tokens in [Dashboard > API > Management Tokens](https://tokenlab.sh/dashboard/api?tab=tokens)."
|
|
9414
|
+
},
|
|
9415
|
+
"GeminiApiKey": {
|
|
9416
|
+
"type": "apiKey",
|
|
9417
|
+
"in": "header",
|
|
9418
|
+
"name": "x-goog-api-key",
|
|
9419
|
+
"description": "TokenLab API key for Gemini requests."
|
|
8289
9420
|
}
|
|
8290
9421
|
},
|
|
8291
9422
|
"schemas": {
|
|
@@ -16269,6 +17400,157 @@
|
|
|
16269
17400
|
"additionalProperties": false
|
|
16270
17401
|
}
|
|
16271
17402
|
]
|
|
17403
|
+
},
|
|
17404
|
+
"GeminiFileResource": {
|
|
17405
|
+
"type": "object",
|
|
17406
|
+
"description": "A Gemini file in the current Workspace. Fields are returned when available.",
|
|
17407
|
+
"properties": {
|
|
17408
|
+
"name": {
|
|
17409
|
+
"type": "string",
|
|
17410
|
+
"description": "File resource name such as files/{fileId}."
|
|
17411
|
+
},
|
|
17412
|
+
"displayName": {
|
|
17413
|
+
"type": "string",
|
|
17414
|
+
"description": "Human-readable file name."
|
|
17415
|
+
},
|
|
17416
|
+
"mimeType": {
|
|
17417
|
+
"type": "string",
|
|
17418
|
+
"description": "Media MIME type."
|
|
17419
|
+
},
|
|
17420
|
+
"sizeBytes": {
|
|
17421
|
+
"type": "string",
|
|
17422
|
+
"description": "File byte size as a decimal string."
|
|
17423
|
+
},
|
|
17424
|
+
"uri": {
|
|
17425
|
+
"type": "string",
|
|
17426
|
+
"description": "File URI to use in Gemini content parts."
|
|
17427
|
+
},
|
|
17428
|
+
"state": {
|
|
17429
|
+
"type": "string",
|
|
17430
|
+
"description": "Processing state reported by the service. Wait until the file is ready before generation."
|
|
17431
|
+
},
|
|
17432
|
+
"createTime": {
|
|
17433
|
+
"type": "string",
|
|
17434
|
+
"format": "date-time"
|
|
17435
|
+
},
|
|
17436
|
+
"updateTime": {
|
|
17437
|
+
"type": "string",
|
|
17438
|
+
"format": "date-time"
|
|
17439
|
+
},
|
|
17440
|
+
"expirationTime": {
|
|
17441
|
+
"type": "string",
|
|
17442
|
+
"format": "date-time"
|
|
17443
|
+
},
|
|
17444
|
+
"error": {
|
|
17445
|
+
"type": "object",
|
|
17446
|
+
"additionalProperties": true
|
|
17447
|
+
}
|
|
17448
|
+
},
|
|
17449
|
+
"additionalProperties": true
|
|
17450
|
+
},
|
|
17451
|
+
"GeminiFileCreateRequest": {
|
|
17452
|
+
"type": "object",
|
|
17453
|
+
"description": "Gemini file metadata request. Supported fields and values are validated by the service. File bytes are uploaded through /upload/v1beta/files.",
|
|
17454
|
+
"properties": {
|
|
17455
|
+
"file": {
|
|
17456
|
+
"$ref": "#/components/schemas/GeminiFileResource"
|
|
17457
|
+
}
|
|
17458
|
+
},
|
|
17459
|
+
"additionalProperties": true
|
|
17460
|
+
},
|
|
17461
|
+
"GeminiFileRegisterRequest": {
|
|
17462
|
+
"type": "object",
|
|
17463
|
+
"description": "Gemini file registration request. Use only sources and fields accepted by the service; registration does not upload local bytes.",
|
|
17464
|
+
"additionalProperties": true
|
|
17465
|
+
},
|
|
17466
|
+
"GeminiCachedContentRequest": {
|
|
17467
|
+
"type": "object",
|
|
17468
|
+
"required": [
|
|
17469
|
+
"model"
|
|
17470
|
+
],
|
|
17471
|
+
"properties": {
|
|
17472
|
+
"model": {
|
|
17473
|
+
"type": "string",
|
|
17474
|
+
"minLength": 1,
|
|
17475
|
+
"description": "Current TokenLab model ID that supports Gemini cached content."
|
|
17476
|
+
},
|
|
17477
|
+
"displayName": {
|
|
17478
|
+
"type": "string",
|
|
17479
|
+
"description": "Human-readable cache name."
|
|
17480
|
+
},
|
|
17481
|
+
"ttl": {
|
|
17482
|
+
"type": "string",
|
|
17483
|
+
"description": "Positive duration such as 3600s. Supported lifetime is validated by the service."
|
|
17484
|
+
},
|
|
17485
|
+
"expireTime": {
|
|
17486
|
+
"type": "string",
|
|
17487
|
+
"format": "date-time",
|
|
17488
|
+
"description": "Requested expiration time; use ttl or expireTime as supported by the service."
|
|
17489
|
+
},
|
|
17490
|
+
"contents": {
|
|
17491
|
+
"$ref": "#/components/schemas/GeminiRequest/properties/contents"
|
|
17492
|
+
},
|
|
17493
|
+
"systemInstruction": {
|
|
17494
|
+
"$ref": "#/components/schemas/GeminiRequest/properties/systemInstruction"
|
|
17495
|
+
},
|
|
17496
|
+
"tools": {
|
|
17497
|
+
"$ref": "#/components/schemas/GeminiRequest/properties/tools"
|
|
17498
|
+
},
|
|
17499
|
+
"toolConfig": {
|
|
17500
|
+
"$ref": "#/components/schemas/GeminiRequest/properties/toolConfig"
|
|
17501
|
+
}
|
|
17502
|
+
},
|
|
17503
|
+
"additionalProperties": true
|
|
17504
|
+
},
|
|
17505
|
+
"GeminiCachedContentResource": {
|
|
17506
|
+
"type": "object",
|
|
17507
|
+
"description": "Cached content belonging to the current Workspace. Use the returned name as cachedContent in Gemini generation.",
|
|
17508
|
+
"properties": {
|
|
17509
|
+
"name": {
|
|
17510
|
+
"type": "string",
|
|
17511
|
+
"description": "Resource name such as cachedContents/{cacheId}."
|
|
17512
|
+
},
|
|
17513
|
+
"model": {
|
|
17514
|
+
"type": "string",
|
|
17515
|
+
"description": "TokenLab model ID associated with the cached content."
|
|
17516
|
+
},
|
|
17517
|
+
"displayName": {
|
|
17518
|
+
"type": "string",
|
|
17519
|
+
"description": "Human-readable cache name."
|
|
17520
|
+
},
|
|
17521
|
+
"createTime": {
|
|
17522
|
+
"type": "string",
|
|
17523
|
+
"format": "date-time"
|
|
17524
|
+
},
|
|
17525
|
+
"updateTime": {
|
|
17526
|
+
"type": "string",
|
|
17527
|
+
"format": "date-time"
|
|
17528
|
+
},
|
|
17529
|
+
"expireTime": {
|
|
17530
|
+
"type": "string",
|
|
17531
|
+
"format": "date-time"
|
|
17532
|
+
},
|
|
17533
|
+
"usageMetadata": {
|
|
17534
|
+
"type": "object",
|
|
17535
|
+
"additionalProperties": true
|
|
17536
|
+
}
|
|
17537
|
+
},
|
|
17538
|
+
"additionalProperties": true
|
|
17539
|
+
},
|
|
17540
|
+
"GeminiCachedContentUpdateRequest": {
|
|
17541
|
+
"type": "object",
|
|
17542
|
+
"description": "Update cached content lifetime using the fields accepted by the service.",
|
|
17543
|
+
"properties": {
|
|
17544
|
+
"ttl": {
|
|
17545
|
+
"type": "string",
|
|
17546
|
+
"description": "Positive duration such as 3600s."
|
|
17547
|
+
},
|
|
17548
|
+
"expireTime": {
|
|
17549
|
+
"type": "string",
|
|
17550
|
+
"format": "date-time"
|
|
17551
|
+
}
|
|
17552
|
+
},
|
|
17553
|
+
"additionalProperties": true
|
|
16272
17554
|
}
|
|
16273
17555
|
},
|
|
16274
17556
|
"responses": {
|
|
@@ -16494,6 +17776,16 @@
|
|
|
16494
17776
|
}
|
|
16495
17777
|
}
|
|
16496
17778
|
}
|
|
17779
|
+
},
|
|
17780
|
+
"GeminiResourceError": {
|
|
17781
|
+
"description": "Gemini-format resource error",
|
|
17782
|
+
"content": {
|
|
17783
|
+
"application/json": {
|
|
17784
|
+
"schema": {
|
|
17785
|
+
"$ref": "#/components/schemas/GeminiErrorResponse"
|
|
17786
|
+
}
|
|
17787
|
+
}
|
|
17788
|
+
}
|
|
16497
17789
|
}
|
|
16498
17790
|
},
|
|
16499
17791
|
"parameters": {
|