Documentation

Create an API key linked to a list of models

POST
/api/v1/external/keys/model

Scope requis : write:keys.

AutorisationBearer <jeton>

JWT d'organisation obtenu via le flow OIDC. Voir le guide d'intégration.

Dans: header

Corps de requête

application/json

Définitions TypeScript

Utilisez le type request body en TypeScript.

name*string

Name given to the API key

modelIds*array<string>

Models the key gives access to

Corps de réponse

application/json

application/json

curl -X POST "https://example.com/api/v1/external/keys/model" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "modelIds": [      "string"    ]  }'
{  "id": "string",  "name": "string",  "displayableKey": "string",  "fullKey": "string",  "createdBy": {    "id": "string",    "givenName": "string",    "familyName": "string",    "avatarUrl": "string"  },  "lastUsed": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "agents": [    {      "id": "string",      "name": "string"    }  ],  "models": [    {      "id": "string",      "name": "string"    }  ]}