NylorunDocsBeta
Management APIModels

Set a model provider's credentials

PUT
/v1/tenant/model

Authorization

managementKey
headerAuthorizationBearer <token>

A management key of the Tenant (role management): it reaches the Management API (/v1/tenant/*) and /v1/me, as itself, never for a subject. Issued only on the Tenant's machine (nylorun-operate keys put <id> --role management) or from NYLORUN_MANAGEMENT_KEY_FILE. Never accepted from a browser (Origin).

Header Parameters

Nylorun-Protocol*string

The protocol version, 8

Request Body

application/json
  1. body
requestId*string
Length1 <= length
idempotencyKey*string
Length1 <= length <= 256
provider*string
Length1 <= length
model*string
Length1 <= length
baseUrl?string
Length1 <= length
settings?
auth*|

Response Body

The model now in force

application/json
  1. response
configured*false
Value infalse
import { createAdmin } from "@nylorun/admin";const admin = createAdmin();await admin.models.put({  idempotencyKey: "model-openai",  provider: "openai",  model: "gpt-4.1",  auth: { type: "api_key", key: process.env.OPENAI_API_KEY! },});
{  "configured": false}