GoRouter
Справочник APIManagement A P I

Создать inference-ключ

POST
/keys

Секрет key возвращается только в ответе на создание.

AuthorizationBearer <ключ>

Inference key для запросов к моделям, management key для Management API.

In: header

Тело запроса

application/json

Типы TypeScript

Use the request body type in TypeScript.

Ответ

application/json

application/json

application/json

curl -X POST "https://example.com/keys" \  -H "Content-Type: application/json" \  -d '{    "name": "Production",    "limit": 500,    "limit_reset": "monthly",    "sensitive_data": {      "enabled": true,      "action": "replace",      "categories": [        "email",        "phone",        "credential"      ],      "dictionary": [        {          "term": "CLIENT-42",          "substitute": "CLIENT-TEST"        }      ]    }  }'
{  "data": {    "hash": "string",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",    "member_id": "string",    "privacy": {      "version": 1,      "blockLogging": true,      "blockTraining": true,      "allowedProviders": [        "string"      ],      "ignoredProviders": [        "string"      ]    },    "label": "string",    "name": "string",    "disabled": true,    "limit": 0,    "limit_remaining": 0,    "limit_reset": "daily",    "usage": 0,    "usage_daily": 0,    "usage_weekly": 0,    "usage_monthly": 0,    "currency": "RUB",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "sensitive_data": {      "enabled": false,      "action": "replace",      "categories": [        "email"      ],      "dictionary": [        {          "term": "string",          "substitute": "string"        }      ]    },    "key": "string"  }}